diff --git a/Mngmt_frames/SAE.py b/Mngmt_frames/SAE.py index 2c64ffd..107260b 100644 --- a/Mngmt_frames/SAE.py +++ b/Mngmt_frames/SAE.py @@ -1,4 +1,3 @@ -#!/usr/bin/python from scapy.all import * import sys diff --git a/dos-sae.py b/dos-sae.py index 663f650..93daf4f 100644 --- a/dos-sae.py +++ b/dos-sae.py @@ -1,4 +1,3 @@ -#!/usr/bin/python from scapy.all import * import sys, select diff --git a/src/saee.py b/src/saee.py index afb52ab..f29365c 100644 --- a/src/saee.py +++ b/src/saee.py @@ -1,7 +1,4 @@ -#!/usr/bin/python from scapy.all import * - - import string import random import subprocess diff --git a/src/utils.py b/src/utils.py index 82143d6..5dd18d0 100644 --- a/src/utils.py +++ b/src/utils.py @@ -18,7 +18,7 @@ def argumentsValidation(ip, port, aliveness, dos, type, subtype, generator, mode print(bcolors.FAIL + "\n\t\tCannot provide other arguments when -d (--dos) argument is set." + bcolors.ENDC) os._exit(0) elif dos: - subprocess.call(['sudo python3 mage.py'], shell=True) + subprocess.call(['sudo', sys.executable,'mage.py'], shell=True) if scan: network_scan(interface) @@ -137,8 +137,9 @@ def update_config(mac_address, ap_mac, interface): json.dump(config, file, indent=4) def network_scan(interface): - network_scan = subprocess.run([f'./src/network_scan.sh {interface}'], capture_output=True, text=True) - if(network_scan.returncode == 1): + script_path = os.path.join(os.path.dirname(__file__), 'network_scan.sh') + network_scan = subprocess.run([script_path, interface], capture_output=True, text=True) + if network_scan.returncode == 1: os._exit(0) elif network_scan.returncode == 2: prompt = network_scan.stdout.strip().split('\n')[6] + '\n' + network_scan.stdout.strip().split('\n')[7]