Mercurial > dropbear-fuzzcorpus
annotate make_fuzzinput.py @ 19:e1aa13f2be49
Add a dictionary for postauth_nomaths, symlink to client
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 07 Mar 2021 14:59:13 +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) |