File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ make xdp.o
4646## Usage
4747
4848``` sh
49- sudo lunatik spawn hexdump/hook # runs the Lua kernel script
49+ sudo lunatik start hexdump/hook false # runs the Lua kernel script
5050sudo xdp-loader load -m skb eth0 xdp.o # if using XDP: replace eth0 by your interface.
5151sudo journalctl -ft kernel # or use dmesg
5252sudo xdp-loader unload eth0 --all # unloads the XDP helper
Original file line number Diff line number Diff line change 11DEBUG = true
2- XDP = true
3- -- NETFILTER = true
2+ XDP = false
3+ NETFILTER = not XDP
44
55xdp = require " xdp"
66nf = require " netfilter"
@@ -18,7 +18,7 @@ protocols =
1818 [ UDP . protocol_type] : " UDP"
1919
2020dump = =>
21- return if not @
21+ return nil if not @
2222 if @is_fragment !
2323 print " Fragment detected: #{@length}" if DEBUG
2424 f_ip = collect @
@@ -27,7 +27,7 @@ dump = =>
2727 @ = f_ip
2828 pkt = UDP ( @data )
2929 print " \n\n #{@src} #{pkt.sport} #{@dst} #{pkt.dport} #{protocols[@protocol] or @protocol}\n "
30- print l for l in * @hexdump
30+ print l for l in @hexdump !
3131
3232if XDP
3333 PASS = xdp. action. PASS
You can’t perform that action at this time.
0 commit comments