Created
April 23, 2012 00:17
-
-
Save kjmkznr/2467701 to your computer and use it in GitHub Desktop.
test "(103)Software caused connection abort: cache: error returned while trying to return disk cached data"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import socket | |
import struct | |
host = 'target' | |
port = 80 | |
clientsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
l_onoff = 1 | |
l_linger = 0 | |
clientsock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', l_onoff, l_linger)) | |
clientsock.connect((host,port)) | |
# while True: | |
# clientsock.sendall("GET / HTTP/1.0\n\n") | |
# rcvmsg = clientsock.recv(128) | |
# print 'Received -> %s' % (rcvmsg) | |
# break | |
clientsock.sendall("GET / HTTP/1.0\n\n") | |
clientsock.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment