Hi Vivek,
well that problem was fixed and now I have a new problem. I haven't been able to get any of the example scripts to work. I have registered all DLLs in the bin directory. The scipts I am using are on the pages
www.unleashnetworks.com/blog/?p=467
and this one...
require 'win32ole'
USAGE = "prpidx <capture-filename>"
#
# function: print the description
#
def printPacket(packet)
$stdout << packet.Description << "\n"
end
#
# check arguments
#
if ARGV.length != 1
puts USAGE
exit 1
end
def MethodExists(obj, methodName)
obj.ole_methods.each{|method|
if (
method.name == methodName)
return true
end
}
return false
end
UnsniffDB = WIN32OLE.new("Unsniff.Database")
UnsniffDB.Open(ARGV[0])
Count = UnsniffDB.PacketCount
PacketStore = UnsniffDB
(0..Count-1).each{ |idx| printPacket(PacketStore.Item(idx)) }
UnsniffDB.Close()
The one I have copy and pasted in results in the following message:
c:\Users\PeterPan\unsniff>ruby
test2.rb Untitled1.usnf
test2.rb:30:in `[]': (in OLE method `PacketIndex': ) (WIN32OLERuntimeError)
OLE error code:0 in <Unknown>
<No Description>
HRESULT error code:0x80020003
Member not found.
from test2.rb:30:in `<main>'
Line 30 is the PacketStore = UnsniffDB entry.
The first file results in this:
c:\Users\PeterPan\unsniff>ruby
xuo.rb 2.usnf output
xuo.rb:19:in `method_missing': (in OLE method `Import': ) (WIN32OLERuntimeError)
OLE error code:80004005 in Unsniff.Database.1
Import: Cannot open file (pcap error)
HRESULT error code:0x80020009
Exception occurred.
from xuo.rb:19:in `<main>'
Can you help resolve this for me please?
Kind regards
Peter