Metasploit mailing list archives

Using Scapy dissectors in Metasploit


From: hdm at metasploit.com (H D Moore)
Date: Sat, 29 Sep 2007 03:43:09 -0500

I hacked on the source until it became class-wrapper friendly. The new 
code can be used in three distinct ways:

# boring class mode
scruby = ScrubyBasic.new
pkt = scruby.Ether()/scruby.IP()/scruby.TCP()/"AAAA"
scruby.sendp(pkt)

# old mode, constrained within a class
class MyScruby 
  include Scruby
  def wee
    sendp(Ether()/IP()/TCP()/"AAAA")
  end
end

# old mode (needs @conf to be initialized)
include Scruby
@conf = Conf.new
sendp(Ether()/IP()/TCP()/"AAAA")

Tarball available:
http://metasploit.com/users/hdm/tools/scruby-0.2.1-hdm.tgz

-HD

PS.  I converted it all to tab indents. Easy to convert back, but a pain  
to go the other direction.



Current thread: