# --------------------------------------------------------------- # export1.rb - Export an Unsniff capture file to a libpcap file # # usage : export1 <unsniff file> <libpcap file> #---------------------------------------------------------------- require 'win32ole' USAGE = "export1 <unsniff-file> <to-libpcap-file>" if ARGV.length != 2 puts USAGE exit 1 end FromFile = ARGV[0] ToFile = ARGV[1] UnsniffDB = WIN32OLE.new("Unsniff.Database") UnsniffDB.Open(FromFile) UnsniffDB.Export("libpcap",ToFile) UnsniffDB.Close print "Exported libpcap/tcpdump Filename is #{ToFile}"