From fa53cc62e14e9c235bffe64e22d383b95d59ce35 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sun, 25 May 2014 15:50:09 -0400 Subject: [PATCH] [test suite] SPA packet fuzzer minor comment additions to clearly define SPA packet types --- test/spa_fuzzing.py | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/test/spa_fuzzing.py b/test/spa_fuzzing.py index e81735f5..c39ec494 100755 --- a/test/spa_fuzzing.py +++ b/test/spa_fuzzing.py @@ -7,9 +7,9 @@ # # # -# SPA payload format (before: +# SPA payload formats: # -# :::::::::: # # Example SPA payload (after inner base64 encoding): # @@ -33,15 +33,44 @@ def main(): print_hdr() spa_payloads = [ + + # type 1: normal access request + # : root : ts : ver :1: 127.0.0.2,tcp/23 "1716411011200157:cm9vdA:1397329899:2.0.1:1:MTI3LjAuMC4yLHRjcC8yMw", + + # type 1: normal access request (with multi-port access request) + # : root : ts : ver :1: 127.0.0.2,tcp/60001,udp/60001 "9129760493055133:cm9vdA:1399176256:2.0.1:1:MTI3LjAuMC4yLHRjcC82MDAwMSx1ZHAvNjAwMDE", + + # type 1: normal access request (with optional server_auth field) + # : root : ts : ver :1: 127.0.0.2,tcp/23 : passwd "1716411011200157:cm9vdA:1397329899:2.0.1:1:MTI3LjAuMC4yLHRjcC8yMw:cGFzc3dk", + + # type 0: command mode + # : root : ts : ver :0: 127.0.0.2,echo fwknoptest > /tmp/fwknoptest "3145808919615481:cm9vdA:1397329998:2.0.1:0:MTI3LjAuMC4yLGVjaG8gZndrbm9wdGVzdCA+IC90bXAvZndrbm9wdGVzdA", + + # type 2: NAT access request + # : root : ts : ver :2: 127.0.0.2,tcp/22 : 192.168.1.2,22 "1642197848921959:cm9vdA:1397329740:2.0.1:2:MTI3LjAuMC4yLHRjcC8yMg:MTkyLjE2OC4xLjIsMjI", + + # type 3: normal access request with client timeout + # : root : ts : ver :3: 127.0.0.2,tcp/22 : fw timeout 2 "1548062350109656:cm9vdA:1397330450:2.0.1:3:MTI3LjAuMC4yLHRjcC8yMg:2", + + # type 4: NAT mode with client timeout + # : root : ts : ver :4: 127.0.0.2,tcp/22 : 192.168.10.1,12345 : fw timeout 1234 "1414212790438062:cm9vdA:1397329054:2.0.1:4:MTI3LjAuMC4yLHRjcC8yMg:MTkyLjE2OC4xMC4xLDEyMzQ1:1234", + + # this one is kind of bogus (the final field decodes to non-printable data) "3184260168681452:c29tZXVzZXI:1397330288:2.0.1:4:MS4xLjEuMSx0Y3AvMjI:MS4yLjMuNCwxMjM0:10:GboVlHuyiwjxmHbH16vGvlKF", + + # type 5: local NAT request + # : root : ts : ver :5: 127.0.0.2,tcp/37172 : 127.0.0.1,22 "8148229791462660:cm9vdA:1397331007:2.0.1:5:MTI3LjAuMC4yLHRjcC8zNzE3Mg:MTI3LjAuMC4xLDIy", + + # type 6: local NAT request with client timeout + # : root : ts : ver :6: 127.0.0.2,tcp/22 : 127.0.0.1,22 : fw timeout 1234 "1918702109191551:cm9vdA:1397329052:2.0.1:6:MTI3LjAuMC4yLHRjcC8yMg:MTI3LjAuMC4xLDIy:1234" ] @@ -320,7 +349,8 @@ def embedded_chars(args, spa_payload, payload_num, pkt_id): return pkt_id def print_hdr(): - print "# " + print "#\n# This file was generated by the fwknop SPA packet fuzzer test/spa_fuzzing.py...\n#\n" \ + "# \n#\n" return def parse_cmdline():