Mercurial > dropbear-fuzzcorpus
annotate make_fuzzinput.py @ 10:6c2390aaecb9
add new dictionary words
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 27 May 2020 21:56:26 +0800 |
parents | ec5e2b121e57 |
children |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env python3 |
2 | |
3 # A fuzz input consists of a SSH-string header followed by the SSH stream. | |
4 # This program prepends a basic prefix. | |
5 | |
6 import struct | |
7 import sys | |
8 | |
9 stream = sys.stdin.buffer.read() | |
10 | |
11 header = b'' | |
12 # uint32 wrapfd random seed | |
13 header += struct.pack(">I", 0xafaf1234) | |
14 | |
15 # prepend length | |
16 header = struct.pack(">I", len(header)) + header | |
17 sys.stdout.buffer.write(header) | |
18 sys.stdout.buffer.write(stream) |