mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Switch packet dcoding from scruby to packetfu
git-svn-id: file:///home/svn/framework3/trunk@5728 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
10619f3af0
commit
929ba19cc7
@ -40,24 +40,20 @@ class Metasploit3 < Msf::Auxiliary
|
||||
def run
|
||||
print_status("Opening the network interface...")
|
||||
open_pcap()
|
||||
|
||||
print_status("Sniffing HTTP requests...")
|
||||
each_packet() do |decoded, pkt|
|
||||
data = ''
|
||||
each_packet() do |pkt|
|
||||
next if not pkt.tcp?
|
||||
|
||||
if(not decoded)
|
||||
data = pkt.to_s
|
||||
else
|
||||
if(pkt.has_layer(Scruby::TCP))
|
||||
data = pkt.last_layer.to_net
|
||||
end
|
||||
end
|
||||
|
||||
if (data =~ /GET\s+([^\s]+)\s+HTTP/smi)
|
||||
if (pkt.payload =~ /GET\s+([^\s]+)\s+HTTP/smi)
|
||||
print_status("GET #{$1}")
|
||||
p pkt.payload
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
print_status("Finished sniffing")
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user