FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pcap-lua/pcap-split at master · sam-github/pcap-lua · GitHub
sam-github
/
pcap-lua
Public
Notifications
You must be signed in to change notification settings
Fork
12
Star
44
Code
Issues
0
Pull requests
2
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
pcap-lua
/
pcap-split
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
15 lines (11 loc) · 363 Bytes
Breadcrumbs
pcap-lua
/
pcap-split
Copy path
File metadata and controls
executable file
·
15 lines (11 loc) · 363 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env lua5.1
local pcap = require"pcap"
file = assert(arg[1])
cap = assert(pcap.open_offline(file))
for pkt, time, len in cap.next, cap do
i = (i or 0) + 1
print("packet", i, "wirelen", len, "timestamp", time, os.date("!%c", time))
dumper = assert(cap:dump_open(i..".pcap"))
assert(dumper:dump(pkt, time, len))
dumper:close()
end
Back
|
FazBrowse Home
|
New Git URL