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