Fuck o matik

parent 24d4b136
...@@ -19,14 +19,46 @@ auto=False ...@@ -19,14 +19,46 @@ auto=False
NETPATH='/etc/fuswin/networks' NETPATH='/etc/fuswin/networks'
class colors: class colors:
RED = '\033[31m'
ENDC = '\033[m' ENDC = '\033[m'
GREEN = '\033[32m' BLACK='\033[0;30m'
YELLOW = '\033[33m' RED='\033[0;31m'
BLUE = '\033[34m' GREEN='\033[0;32m'
CYAN = '\033[36m' YELLOW='\033[0;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
WHITE='\033[0;37m'
EBLACK='\033[1;30m'
ERED='\033[1;31m'
EGREEN='\033[1;32m'
EYELLOW='\033[1;33m'
EBLUE='\033[1;34m'
EMAGENTA='\033[1;35m'
ECYAN='\033[1;36m'
EWHITE='\033[1;37m'
UBLACK='\033[4;30m'
URED='\033[4;31m'
UGREEN='\033[4;32m'
UYELLOW='\033[4;33m'
UBLUE='\033[4;34m'
UMAGENTA='\033[4;35m'
UCYAN='\033[4;36m'
UWHITE='\033[4;37m'
BBLACK='\033[40m'
BRED='\033[41m'
BGREEN='\033[42m'
BYELLOW='\033[43m'
BBLUE='\033[44m'
BMAGENTA='\033[45m'
BCYAN='\033[46m'
BWHITE='\033[47m'
def print_error(err):
print(colors.ERED+"\n"+err+"\n"+colors.ENDC)
def print_msg(msg):
print(colors.EWHITE+msg+colors.ENDC)
def sigcol(qual): def sigcol(qual):
sigcol={ sigcol={
...@@ -41,6 +73,7 @@ def sigcol(qual): ...@@ -41,6 +73,7 @@ def sigcol(qual):
return rcol return rcol
def detect_ifaces(): def detect_ifaces():
iplinks=sh("/sbin/ip link show").split() iplinks=sh("/sbin/ip link show").split()
j, interfaces = 1,[] j, interfaces = 1,[]
...@@ -60,7 +93,7 @@ def checkYN(res, default='N'): ...@@ -60,7 +93,7 @@ def checkYN(res, default='N'):
return True return True
elif res.lower()=='n' or res.lower()=='fuck no!': elif res.lower()=='n' or res.lower()=='fuck no!':
return False return False
print(colors.RED+'WHAT? "'+res+'"? WHAT THE FUCK? I take it as a fuck no!'+colors.ENDC) print_error('WHAT? "'+res+'"? WHAT THE FUCK? I take it as a fuck no!')
return False return False
...@@ -111,7 +144,7 @@ def start_wpa(interface): ...@@ -111,7 +144,7 @@ def start_wpa(interface):
def show_fuck_list(nets): def show_fuck_list(nets):
print('\nHere it is your fucking networks...:\n') print_msg('\nHere it is your fucking networks...:\n')
i=0 i=0
netind={} netind={}
for net in nets.keys(): for net in nets.keys():
...@@ -129,26 +162,27 @@ def show_fuck_list(nets): ...@@ -129,26 +162,27 @@ def show_fuck_list(nets):
nauto = 'YES' nauto = 'YES'
netconf="AUTO: "+nauto+", PRIO: "+str(nconf['prio']) netconf="AUTO: "+nauto+", PRIO: "+str(nconf['prio'])
print(" "+str(i)+": "+colors.BLUE+net+colors.ENDC+" ("+sigcol(qual)+"sig: "+sig+", qual: "+qual+", freq: "+freq+", enc: "+enc+colors.ENDC+") "+netconf) print(" "+str(i)+": "+colors.EBLUE+net+colors.ENDC+" ("+sigcol(qual)+"sig: "+sig+", qual: "+qual+", freq: "+freq+", enc: "+enc+colors.ENDC+") "+netconf)
netind[str(i)] = nets[net] netind[str(i)] = nets[net]
i=i+1 i=i+1
return netind return netind
def nofuck(fuck): def nofuck(fuck):
if not fuck or fuck!='none': if not fuck or fuck!='none':
print("\n "+colors.RED+"FUCK YOU! MAKE A FUCKING CHOICE!"+colors.ENDC) print_error("FUCK YOU! MAKE A FUCKING CHOICE!")
def fuckquit(fuck): def fuckquit(fuck):
if fuck.lower()=='q': if fuck.lower()=='q':
print(colors.RED+"\n I'M FUCKING KILLING MYSELF!\n"+colors.ENDC) print_error("I'M FUCKING KILLING MYSELF!")
sys.exit(0) sys.exit(0)
if len(sys.argv) > 1 and sys.argv[1] == 'boot': if len(sys.argv) > 1 and sys.argv[1] == 'boot':
print(' * start to fucking with your wireless... ') print_msg(' * start to fucking with your wireless... ')
boot=True boot=True
auto=True auto=True
else: else:
print(colors.GREEN+sh("figlet FUSWIM")) os.system('clear')
print(colors.BGREEN+sh("figlet FUSWIM"))
print("FUcking Simple Wireless Interface Manager\n"+colors.ENDC) print("FUcking Simple Wireless Interface Manager\n"+colors.ENDC)
if len(sys.argv) > 1 and sys.argv[1] == 'auto': if len(sys.argv) > 1 and sys.argv[1] == 'auto':
...@@ -160,7 +194,7 @@ if sys.argv[-1] not in ['auto','boot',sys.argv[0]]: ...@@ -160,7 +194,7 @@ if sys.argv[-1] not in ['auto','boot',sys.argv[0]]:
if not interface in detect_ifaces(): if not interface in detect_ifaces():
print(colors.RED+"OH FUCK! Interface "+interface+" doesn't exists. Exiting..."+colors.ENDC) print_error("OH FUCK! Interface "+interface+" doesn't exists. Exiting...")
sys.exit(1) sys.exit(1)
...@@ -209,7 +243,7 @@ while not EXIT: ...@@ -209,7 +243,7 @@ while not EXIT:
elif SM=="detect": elif SM=="detect":
# detect all networks... # detect all networks...
print(colors.GREEN+"\n LET'S FUCKING SCAN AND SEE WHO IS AROUND... \n"+colors.ENDC) print(colors.UGREEN+"\n LET'S FUCKING SCAN AND SEE WHO IS AROUND... \n"+colors.ENDC)
netw = iw_parse.get_interfaces(interface="wlan0") netw = iw_parse.get_interfaces(interface="wlan0")
i=1 i=1
nets={} nets={}
...@@ -223,7 +257,15 @@ while not EXIT: ...@@ -223,7 +257,15 @@ while not EXIT:
i=i+1 i=i+1
nets[name] = net nets[name] = net
nets[name]['Name'] == name.replace("/", "").replace("..","") nets[name]['Name'] == name.replace("/", "").replace("..","")
SM="main" if auto or boot:
SM="autoselect"
else:
SM="main"
elif SM=="autoselect":
print_msg("\n ** FUCK-O-MATIK Mode Selected ** \n")
sys.exit(0)
elif SM=="main": elif SM=="main":
netind = {} netind = {}
...@@ -238,7 +280,7 @@ while not EXIT: ...@@ -238,7 +280,7 @@ while not EXIT:
elif fuck.lower()=='s': elif fuck.lower()=='s':
SM="detect" SM="detect"
elif fuck.lower()=='m': elif fuck.lower()=='m':
print(sh("/usr/games/cowsay 'moo'")) print(colors.EMAGENTA+sh("/usr/games/cowsay 'moo'")+colors.ENDC)
time.sleep(1) time.sleep(1)
elif fuck.lower()=='e': elif fuck.lower()=='e':
SM="editor" SM="editor"
...@@ -260,9 +302,9 @@ while not EXIT: ...@@ -260,9 +302,9 @@ while not EXIT:
try: try:
sh("rm -f "+'/'.join([NETPATH, netind[fuck]['Name']])+" > /dev/null 2&1") sh("rm -f "+'/'.join([NETPATH, netind[fuck]['Name']])+" > /dev/null 2&1")
except: except:
print(colors.RED+"\nFUCK i can't Fucking removing "+netind[fuck]['Name']+"!!!\n"+colors.ENDC) print_error("FUCK i can't Fucking removing "+netind[fuck]['Name']+"!!!")
else: else:
print(colors.RED+"\n Are you serious? you can't remove what isn't there, CUNT!\n"+colors.ENDC) print_error("\n Are you serious? you can't remove what isn't there, CUNT!")
time.sleep(1) time.sleep(1)
...@@ -278,6 +320,6 @@ while not EXIT: ...@@ -278,6 +320,6 @@ while not EXIT:
if fuck.lower()=='b': if fuck.lower()=='b':
SM="main" SM="main"
if not auto and not boot:
os.system("clear") os.system("clear")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment