diff options
| author | comex <comexk@gmail.com> | 2009-01-29 18:11:52 -0500 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2009-01-29 18:11:52 -0500 |
| commit | 8edaf638429568b8f2dc1b0f2a806ba7847dbd53 (patch) | |
| tree | bf99cebaba4a25d832857e25c5f7689aaf571815 /write-brlan.py | |
| parent | f173c743d3d435fb96a6e12c83b45726c1beeae9 (diff) | |
Support for stuff. A brlan writer that can only write an empty file. (Genius.)
Diffstat (limited to '')
| -rw-r--r-- | write-brlan.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/write-brlan.py b/write-brlan.py new file mode 100644 index 0000000..a79bcc6 --- /dev/null +++ b/write-brlan.py @@ -0,0 +1,18 @@ +import sys, struct, re +from ethyl import * + +f = open(sys.argv[1], 'r') +chunks = eval(f.read()) +f.close() + +assert len(chunks) == 0 # :/ + +rlan = 'RLAN\xfe\xff\x00\x08\x00\x00\x00\x00' # size later +rlan += struct.pack('>hh', 0x10, len(chunks)) + +rlan = rlan[:8] + struct.pack('>I', len(rlan)) + rlan[0xc:] + + +g = open(sys.argv[2], 'wb') +g.write(rlan) +g.close()
\ No newline at end of file |
