Ethereal-users: RE: [Ethereal-users] Non-binary Snoop-file

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Mon, 3 Mar 2003 22:14:08 -0000
> -----Original Message-----
> From: Martin Regner [mailto:martin.regner@xxxxxxxxx] 
> Sent: 28 February 2003 22:03
> To: ethereal-users@xxxxxxxxxxxx
> Subject: [Ethereal-users] Non-binary Snoop-file
> 
> 
> Is there any easy way of converting a non-binary snoop-file 
> so that it can be readable by Ethereal? 

I've no idea what the in-between frames text looks like. But the following
Perl script worked for me on your source data.

open OUT, "| text2pcap.exe - $ARGV[0]" or die "Cannot create pipe $!";
while(<DATA>) {
	s/([0-9a-f]{2})([0-9a-f]{2}) /$1 $2 /g;
	s/^\s*(\d+)\:/sprintf(qq(%04x),$1)/e;
	print OUT $_
}
close OUT;

__DATA__
    0: 0001 7151 ffe7 8811 22fa dd38 0800 4500    ..PPq... .-8..E.
   16: 0028 9911 4000 3c66 8880 ee1e 03cf ee10    .(..@.<.........
   32: 01ce 


-----------------------------------------------------------------------


Registered Office:
Marks & Spencer p.l.c
Michael House, Baker Street,
London, W1U 8EP
Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422 
Facsimile (020) 7487 2670

www.marksandspencer.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful.

The registered office of Marks and Spencer Financial Services PLC, Marks and Spencer Unit Trust Management Limited, Marks and Spencer Life Assurance Limited and Marks and Spencer Savings and Investments Limited is Kings Meadow, Chester, CH99 9FB.