Better display

parent a577f64d
......@@ -4,6 +4,7 @@ from pprint import pprint
import psutil
import sys, os
from shell_cmd import sh
import time
try:
from setproctitle import setproctitle
......@@ -198,6 +199,7 @@ SM="init"
EXIT=False
while not EXIT:
if SM=="init":
SM="detect"
nets={}
......@@ -212,10 +214,12 @@ while not EXIT:
if 'Mode' in net.keys() and net['Mode'] == 'Master':
if 'Name' in net.keys() and net['Name']:
nets[net['Name']] = net
name = net['Name']
else:
name='NoEssid_'+str(i)
i=i+1
nets[name] = net
nets[name]['Name'] == name.replace("/", "").replace("..","")
SM="main"
elif SM=="main":
......@@ -232,9 +236,10 @@ while not EXIT:
SM="detect"
elif fuck.lower()=='m':
print(sh("/usr/games/cowsay 'moo'"))
time.sleep(1)
elif fuck.lower()=='e':
SM="editor"
elif SM=="remove":
print("\n FOR FUCK SAKE, are you too lazy to do a rm by hand in "+NETPATH+"?\n")
netind = {}
......@@ -246,5 +251,30 @@ while not EXIT:
fuckquit(fuck)
if fuck.lower()=='b':
SM="main"
elif fuck in netind.keys():
if os.path.isfile("/".join([NETPATH, netind[fuck]['Name']])):
print(colors.RED+"\n Fucking removing "+netind[fuck]['Name']+"...\n"+colors.ENDC)
try:
sh("rm -f "+'/'.join([NETPATH, netind[fuck]['Name']])+" > /dev/null 2&1")
except:
print(colors.RED+"\nFUCK i can't Fucking removing "+netind[fuck]['Name']+"!!!\n"+colors.ENDC)
else:
print(colors.RED+"\n Are you serious? you can't remove what isn't there, CUNT!\n"+colors.ENDC)
time.sleep(1)
elif SM=="editor":
print("\n FOR FUCK SAKE, are you too lazy to launch an editor by hand in "+NETPATH+"?\n")
netind = {}
fuck = "none"
while fuck not in netind.keys() and fuck.lower() not in ['b', 'q']:
nofuck(fuck)
netind = show_fuck_list(nets)
fuck = input("\n Choose a fucking one by index, or press B for back, Q do shit the hell out: ")
fuckquit(fuck)
if fuck.lower()=='b':
SM="main"
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