From 44b32c31eb575ec20b8bb2f0b1642c78d556cb91 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 21 Jan 2019 17:00:35 +0100 Subject: fuzzer.py: build pt icmp pkt Signed-off-by: Toni Uhlig --- test/fuzzer.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/fuzzer.py b/test/fuzzer.py index 3778952..766122c 100755 --- a/test/fuzzer.py +++ b/test/fuzzer.py @@ -254,22 +254,25 @@ class PingQuery(asyncore.dispatcher): def handle_close(self): self.close() +def build_pt_pkt(ip, port, state, ack, seq, rsv, data): + if type(ip) is int: + dst_ip = ip + elif type(ip) is str: + dst_ip = struct.unpack('