Mercurial > dropbear-fuzzcorpus
view make_fuzzinput.py @ 21:1a22de6a6b1a
Script to fetch new corpus and update the repository
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 07 Mar 2021 16:06:25 +0800 |
parents | ec5e2b121e57 |
children |
line wrap: on
line source
#!/usr/bin/env python3 # A fuzz input consists of a SSH-string header followed by the SSH stream. # This program prepends a basic prefix. import struct import sys stream = sys.stdin.buffer.read() header = b'' # uint32 wrapfd random seed header += struct.pack(">I", 0xafaf1234) # prepend length header = struct.pack(">I", len(header)) + header sys.stdout.buffer.write(header) sys.stdout.buffer.write(stream)