from sulley import * s_initialize("tftp") s_group("opcode", values=["\x00\x01","\x00\x02","\x00\x03","\x00\x04","\x00\x05"]) if s_block_start("filerequest", group="opcode"): # filename s_string("ABCDABCD") # terminator s_static("\x00") # transfertype s_group("transfertype", values=["netascii","octet","mail","abcdabcd"]) s_block_end("filerequest") if s_block_start("transtype", group="transfertype"): s_string(" ") s_static("\x00") s_block_end()