- import1.rb
# ---------------------------------------------------------------
# import1.rb - Import a single file in libpcap/tcpdump format
#
# usage : import1 <libpcap file> <unsniff file>
#----------------------------------------------------------------
require 'win32ole'
USAGE = "import1 <from-libpcap-file> <unsniff-file>"
if ARGV.length != 2
puts USAGE
exit 1
end
FromFile = ARGV[0]
ToFile = ARGV[1]
UnsniffDB = WIN32OLE.new("Unsniff.Database")
UnsniffDB.New(ToFile)
UnsniffDB.Import("libpcap",FromFile)
UnsniffDB.Save
print "Unsniff Filename is #{ToFile}"