Switch packet dcoding from scruby to packetfu

git-svn-id: file:///home/svn/framework3/trunk@5728 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-10-10 02:26:05 +00:00
parent 10619f3af0
commit 929ba19cc7
1 changed files with 7 additions and 11 deletions

View File

@ -40,24 +40,20 @@ class Metasploit3 < Msf::Auxiliary
def run def run
print_status("Opening the network interface...") print_status("Opening the network interface...")
open_pcap() open_pcap()
print_status("Sniffing HTTP requests...") print_status("Sniffing HTTP requests...")
each_packet() do |decoded, pkt| each_packet() do |pkt|
data = '' next if not pkt.tcp?
if(not decoded) if (pkt.payload =~ /GET\s+([^\s]+)\s+HTTP/smi)
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)
print_status("GET #{$1}") print_status("GET #{$1}")
p pkt.payload
end end
true true
end end
print_status("Finished sniffing")
end end
end end