TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: Maurice Kinal
from: andrew clarke
date: 2016-06-06 12:15:58
subject: pktinfo for everyone

05 Jun 16 14:16, you wrote to Jeff Smith:

 >> I have been looking for a packet file viewer that works on Linux for
 >> awhile now. I considered Husky's PKTINFO but didn't really want to
 >> install Husky if I didn't need to. It's a pain to have to copy files
 >> that I need to look at over to a Win32 machine.

 MK filename.pkt | \
 MK>){{at}pktHeader =
unpack("S12C10S4C2S7", $_);};\
 MK>            print join("\n",{at}pktHeader),"\n";'

FWIW I think this output is only suitable for people with robot brains.
It's only fractionally better than using a hex viewer.

Among other things it shows the header password as numerical values (120
120 120 is xxx), which is not very useful.

Also obviously it only dumps the packet header using the first 58 bytes,
not the message headers within.

I suppose it's better than nothing, but I'm not sure why you'd suggest
using a one-liner when there were far better solutions already offered!

$ head -c 58 < test.pkt | perl -e 'while(<>){{at}pktHeader =
unpack("S12C10S4C2S7", $_);};\
  print join("\n",{at}pktHeader),"\n";'
605
605
2012
0
4
1
39
12
0
2
2432
2432
255
1
120
120
120
0
0
0
0
0
2
2
0
256
16
4
1
2
2
0
14
0
0


pktlist or pktdump are a lot friendlier:

$ pktlist.py test.pkt
Dump of packet header
==============================================================================

Packet         : test.pkt
OrigAddr       : 2:2432/605.0
DestAddr       : 2:2432/605.14
DateCreation   : 2012-01-04  01:39:12
BaudRate       : 0
PktType        : 0x0002
Password       : "xxx"
AuxNet         : 0
CapWord        : 0x0001
CapValid       : 0x0100
Fill           : ""

Dump of packed message header
------------------------------------------------------------------------------

PktType        : 0x0002
From           : edde
To             : arix
Subject        : xxx
DateTime       : 04 Jan 12  01:39:12
OrigAddr       : 2432/605
DestAddr       : 2432/603
Cost           : 0
Attr           : 0x0001
AreaTag        : test.ger

-- Messages in packet:     1

-- Total messages:     1


$ pktdump test.pkt
pktdump rev 1.8 - Dump FidoNet Packets

Opening test.pkt
test.pkt Packet Type 2+ (prod: 10FF, rev: 1.4) from 2:2432/605 to 2:2432/605.14
Password: 'xxx'
0000003A
test.pkt 00003A Packed Message Type: 2 from 2432/605 to 2432/603
Attribute: 0001
Date/Time: 04 Jan 12  01:39:12
To   : arix
From : edde
Subj : xxx
000000A6

--- GoldED+/BSD 1.1.5-b20160201
* Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
SEEN-BY: 633/267 712/848
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.