Python lover : IT & hacking ético. Esta es la última aplicación que he desarrollado, se llamaba alas, pero lo deje a medias. Fue solo para ensayar pero ahora pienso a lo grande. dentro del movimiento informático que ha revolucionado el mundo tengo cuatro perfiles distintos aunque soy u
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import tkinter import youtube_dl os.system("pip install sys") os.system("pip install tkinter") os.system("pip install youtube_dl") os.system("pip install ffmpeg") os.system("pip install pygame") os.system("pip install wave") import youtube_dl ydl_opts = {'outtmpl': 'matrix1'} with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download(['https://www.youtube.com/watch?v=1qCVcFBH4ew']) os.system("ffmpeg -i matrix1.mkv matrix.wav") import wave import pygame file_path = 'matrix.wav' file_wav = wave.open(file_path) frequency = file_wav.getframerate() pygame.mixer.init(frequency=frequency) pygame.mixer.music.load(file_path) pygame.mixer.music.play() 000 i = 1 while i == 1: banner =''' ll aaaaaaaa ll aaaaaaa sssssss aa aa ll aa aa ss aa ll aa aa sssssss aa aa ll aa aa ss aa aa ll aa aa ssssssss negras aa aa aa aa aa breVe introduccion al caos by mo0n rumba. \n''' print (banner) print ("1. Nmap banner grabbing") print ("2. Nmap DNS servicios") print ("3. Nmap DNS brute - hostname servidores") print ("4. Nmap Waf - detect") print ("5. Nmap Waf - fingerprint") print ("6. Dns Enumeracion dnsrecon") print ("7. Dns python") print ("8. Python whois") print ("9. Shodan") print ("99. Salir") acceso = input("Opcion: ") if acceso == 1: target = raw_input("Target : ") os.system("nmap -sV --script=banner -oN txt.txt %s" % target) from time import sleep import os import sys from math import ceil l = list(map(int,os.popen('stty size','r').read().split())) col = l[1] col = col - 6 for i in range(col): sys.stdout.write('\r') getStr = "[%s " % ('='*i) sys.stdout.write(getStr.ljust(col)+"]"+"%d%%" % (ceil((100/col)*i))) sys.stdout.flush() sleep(0.01) print("") from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f = open("txt.txt").read() Label(root, text=f, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() i = 1 if acceso == 2: target = raw_input("Target : ") os.system("nmap --script=broadcast-dns-service-discovery -oN txt.txt %s" % target) from time import sleep import os import sys from math import ceil l = list(map(int,os.popen('stty size','r').read().split())) col = l[1] col = col - 6 for i in range(col): sys.stdout.write('\r') getStr = "[%s " % ('='*i) sys.stdout.write(getStr.ljust(col)+"]"+"%d%%" % (ceil((100/col)*i))) sys.stdout.flush() sleep(0.01) print("") from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f = open("txt.txt").read() Label(root, text=f, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() i = 1 if acceso == 3: target = raw_input("Target : ") os.system("nmap -T4-p 53 --script dns-brute -oN txt.txt %s" % target) from time import sleep import os import sys from math import ceil l = list(map(int,os.popen('stty size','r').read().split())) col = l[1] col = col - 6 for i in range(col): sys.stdout.write('\r') getStr = "[%s " % ('='*i) sys.stdout.write(getStr.ljust(col)+"]"+"%d%%" % (ceil((100/col)*i))) sys.stdout.flush() sleep(0.01) print("") from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f = open("txt.txt").read() Label(root, text=f, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() i = 1 if acceso == 4: target = raw_input("Target : ") os.system("nmap -p80 --script http-waf-detect -oN txt.txt %s" % target) from time import sleep import os import sys from math import ceil l = list(map(int,os.popen('stty size','r').read().split())) col = l[1] col = col - 6 for i in range(col): sys.stdout.write('\r') getStr = "[%s " % ('='*i) sys.stdout.write(getStr.ljust(col)+"]"+"%d%%" % (ceil((100/col)*i))) sys.stdout.flush() sleep(0.01) print("") from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f = open("txt.txt").read() Label(root, text=f, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() i = 1 if acceso == 5: target = raw_input("Target : ") os.system("nmap --script=http-waf-fingerprint -oN txt.txt %s" % target) from time import sleep import os import sys from math import ceil l = list(map(int,os.popen('stty size','r').read().split())) col = l[1] col = col - 6 for i in range(col): sys.stdout.write('\r') getStr = "[%s " % ('='*i) sys.stdout.write(getStr.ljust(col)+"]"+"%d%%" % (ceil((100/col)*i))) sys.stdout.flush() sleep(0.01) print("") from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f = open("txt.txt").read() Label(root, text=f, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() i = 1 if acceso == 6: target = raw_input("Target : ") from time import sleep import os import sys from math import ceil l = list(map(int,os.popen('stty size','r').read().split())) col = l[1] col = col - 6 for i in range(col): sys.stdout.write('\r') getStr = "[%s " % ('='*i) sys.stdout.write(getStr.ljust(col)+"]"+"%d%%" % (ceil((100/col)*i))) sys.stdout.flush() sleep(0.01) print("") os.system("dnsrecon -d %s" % target) i = 1 if acceso == 7: os.system("python3 dnspython.py") i = 1 if acceso == 8: os.system("python whoispython.py") i = 1 if acceso == 9: os.system("python shodanpython.py") i = 1 if acceso == 99: sys.exit() else: i = 1 ARCHIVO dnspython.py #!/usr/bin/env python # -*- coding: utf-8 -*- import dns import dns.resolver import os import tkinter target = input("Ingrese el nombre de dominio para buscar #: ") verdad = 1 if verdad == 1: a= dns.resolver.query(target,'A') print (a.response.to_text()) archivo = open('test1.txt',"w") archivo.write(a.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f1 = open("test1.txt").read() Label(root, text=f1, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 2 if verdad == 2: aaaa= dns.resolver.query(target,'AAAA') print (aaaa.response.to_text()) archivo = open('test2.txt',"w") archivo.write(aaaa.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f2 = open("test2.txt").read() Label(root, text=f2, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 3 if verdad == 3: mx= dns.resolver.query(target,'MX') print (mx.response.to_text()) archivo = open('test3.txt',"w") archivo.write(mx.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f3 = open("test3.txt").read() Label(root, text=f3, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 4 if verdad == 4: cname= dns.resolver.query(target,'CNAME') print (cname.response.to_text()) archivo = open('test4.txt',"w") archivo.write(cname.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f4 = open("test4.txt").read() Label(root, text=f4, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 5 if verdad == 5: ns= dns.resolver.query(target,'NS') print (ns.response.to_text()) archivo = open('test5.txt',"w") archivo.write(ns.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f5 = open("test5.txt").read() Label(root, text=f5, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 6 if verdad == 6: ptr= dns.resolver.query(target,'PTR') print (ptr.response.to_text()) archivo = open('test6.txt',"w") archivo.write(ptr.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f6 = open("test6.txt").read() Label(root, text=f6, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 7 if verdad == 7: soa= dns.resolver.query(target,'SOA') print (soa.response.to_text()) archivo = open('test7.txt',"w") archivo.write(soa.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f7 = open("test7.txt").read() Label(root, text=f7, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 8 if verdad == 8: any= dns.resolver.query(target,'ANY') print (any.response.to_text()) archivo = open('test8.txt',"w") archivo.write(any.response.to_text() + os.linesep) archivo.close() from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f8 = open("test8.txt").read() Label(root, text=f8, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() else : verdad = 9 #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import shodan import tkinter i = 1 while i == 1: banner =''' aaa ssssss hh hh oo dddd aaaaaaa nnnnnn ss hh hh oo oo dd dd aa aa nn nn ssssss hh hh oo oo dd dd aa aa nn nn ss hhhhhh oo oo dd dd aa a aa nn nn ss hh h oo oo dd dd aa aa nn nn ssssss hh h oo dd dd aa aa nn nn python. aa aa alas negras \n''' print (banner) print ("1. Shodan search") print ("2. Shodan facetas") print ("3. Shodan search host") print ("99. Volver") acceso = input("Opcion: ") if acceso == 1: busqueda = raw_input("Filtro de búsqueda: ") apikey = "" api = shodan.Shodan(apikey) try: results = api.search(busqueda) print('Results found: {}'.format(results['total'])) for result in results['matches']: print('IP: {}'.format(result['ip_str'])) print(result['data']) print('') with open('shodan.txt',"w") as host: for service in results['matches']: host.write(service['ip_str']+ ":" + str(service['port'])) host.write("\n") from tkinter import * root = Tk() root.title("Alejandro merisi #root") root.config(bg="darkblue") f = open("shodan.txt").read() Label(root, text=f, bg="darkblue", fg="white", justify="left") .grid(row=0) root.mainloop() except shodan.APIError, e: print('Error: {}'.format(e)) i = 1 i = 1 if acceso == 2: if acceso == 99: os.system("python alas.py")
No hay comentarios:
Publicar un comentario