File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
lib/packetfu/packetfu/protos Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class ICMPPacket < Packet
124
124
attr_accessor :eth_header , :ip_header , :icmp_header
125
125
126
126
def self . can_parse? ( str )
127
- return false unless str . size >= 54
127
+ return false unless str . size >= 38
128
128
return false unless EthPacket . can_parse? str
129
129
return false unless IPPacket . can_parse? str
130
130
return false unless str [ 23 , 1 ] == "\x01 "
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def initialize
34
34
'References' =>
35
35
[
36
36
# packetfu
37
- [ 'URL' , 'http ://code.google. com/p /packetfu/ ' ] ,
37
+ [ 'URL' , 'https ://github. com/todb /packetfu' ] ,
38
38
# nping
39
39
[ 'URL' , 'http://nmap.org/book/nping-man.html' ] ,
40
40
# simple icmp
@@ -98,6 +98,7 @@ def run
98
98
99
99
def icmp_listener
100
100
# start icmp listener
101
+ $stderr. puts "Starting for real"
101
102
102
103
print_status ( "ICMP Listener started on #{ @interface } (#{ @iface_ip } ). Monitoring for trigger packet containing #{ datastore [ 'START_TRIGGER' ] } " )
103
104
if datastore [ 'FNAME_IN_PACKET' ]
@@ -114,6 +115,8 @@ def icmp_listener
114
115
cap . stream . each do | pkt |
115
116
packet = PacketFu ::Packet . parse ( pkt )
116
117
data = packet . payload [ 4 ..-1 ]
118
+ $stderr. puts packet . inspect
119
+ $stderr. puts packet . inspect_hex
117
120
118
121
if packet . is_icmp? and data =~ /#{ datastore [ 'START_TRIGGER' ] } /
119
122
# start of new file detected
You can’t perform that action at this time.
0 commit comments