diff --git a/hackingtoolkit b/hackingtoolkit index 23f135a..cb98485 100644 --- a/hackingtoolkit +++ b/hackingtoolkit @@ -1,10 +1,85 @@ #!/usr/bin/env python3 +import socket +import requests import subprocess from subprocess import Popen from scapy.all import * import argparse import time +def utilities(): + print(''' +[1] Netcat +[2] Start an Apache Web server +[3] Start a PostgreSQL server +[BACK] Back to main menu +''') + utilitiesOption=input('Select an option: ') + if utilitiesOption=='1': + netcat() + elif utilitiesOption=='2': + apache() + elif utilitiesOption=='3': + postgresql() + elif utilitiesOption=='BACK': + main() + else: + print('Invalid option.') +def public_ip(): + try: + response = requests.get('https://api.ipify.org?format=json') + public_ip = response.json()['ip'] + return public_ip + except requests.RequestException as error: + print('Error fetching public IP:',str(error)) + return None +def private_ip(): + hostname = socket.gethostname() + private_ip = socket.gethostbyname(hostname) + return private_ip +def apache(): + try: + subprocess.Popen(['sudo','service','apache2','start'],text=True,check=True) + private_ip = private_ip() + public_ip = public_ip() + print('Apache server started.') + print('Private IP:',str(private_ip)) + if public_ip: + print('Public IP:',str(public_ip)) + except subprocess.SubprocessError as error: + print('Encountered an error: ',str(error)) +def beef_framework(): + try: + subprocess.Popen(['sudo','beef-xss'],text=True,check=True) + except subprocess.SubprocessError as error: + print('Encountered an error: ',str(error)) +def setoolkit(): + try: + subprocess.Popen(['sudo','setoolkit'],text=True,check=True) + except subprocess.SubprocessError as error: + print('Encountered an error: ',str(error)) + +def socialEngineering(): + while True: + print(''' +[1] Use the Social-Engineering Toolkit +[2] Use BeEF +[3] Set up an Apache web server to serve pages + +[BACK] Back to main menu + +''') + socEngineeringOption=input('Select an option: ') + if socEngineeringOption=='1': + setoolkit() + elif socEngineeringOption=='2': + beef_framework() + elif socEngineeringOption=='3': + apache() + elif socEngineeringOption=='BACK': + main() + else: + print('Invalid option.') def nikto(host,port,if_ssl,output): if if_ssl=='-ssl': try: @@ -578,6 +653,8 @@ def main(): passwdAttacks() elif choice1=='6': wordlist() + elif choice1=='7': + utilities() else: print('Invalid option') #-----------------------------------