diff options
| author | comex <comexk@gmail.com> | 2009-02-17 23:46:31 -0500 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2009-02-17 23:46:31 -0500 |
| commit | 5089b4a5cd8b40a02187b4969bd97fba81f9d8f1 (patch) | |
| tree | 6bf871dfc15f02975e49b00997432ee3c4ad04c6 /parse-brlan.py | |
| parent | 8504fb221559b57e38650be3a88bfafa02bf0998 (diff) | |
Helpfulness.
Diffstat (limited to '')
| -rw-r--r-- | parse-brlan.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/parse-brlan.py b/parse-brlan.py index 2320e42..a2e57e9 100644 --- a/parse-brlan.py +++ b/parse-brlan.py @@ -1,6 +1,10 @@ import sys, struct, re from ethyl import * +if len(sys.argv) != 2: + print 'Usage: python parse-brlan.py something.brlan' + sys.exit(1) + f = open(sys.argv[1], 'rb') rlan = f.read() f.close() @@ -35,7 +39,9 @@ for typ, chunk in ch: offs = struct.unpack('>I', chunk[pos:pos+4])[0] - 8 name = chunk[offs:offs + 0x14].rstrip('\0') + aunk, aoffs = struct.unpack('>II', chunk[offs + 0x14:offs + 0x1c]) + print name, hex(aoffs) aoffs += offs atyp = chunk[aoffs:aoffs+4] #print hex(aoffs), hex(offs), name |
