Commit a0177509 authored by root's avatar root

Fucking cycle

parent 84fc8321
......@@ -73,7 +73,8 @@ def read_netconf(net):
'dhcp': True,
'ip': '192.168.42.42',
'nmask': '255.255.255.0',
'gw': '192.168.42.1'
'gw': '192.168.42.1',
'saved': False
}
if os.path.isfile(p):
try:
......@@ -85,11 +86,12 @@ def read_netconf(net):
if k in ['auto', 'dhcp']:
v=checkYN(v)
conf[k] = v
conf['saved'] = True
return conf
except:
pass
return False
return conf
def kill_proc(name, ops=False):
......@@ -169,9 +171,11 @@ for net in netw:
print('Here it is your fucking networks...:')
i=0
for net in nets.keys():
def show_fuck_list(nets):
print('\nHere it is your fucking networks...:\n')
i=0
netind={}
for net in nets.keys():
netconf=""
sig=nets[net]['Signal Level']
qual=nets[net]['Quality']
......@@ -180,13 +184,21 @@ for net in nets.keys():
enc=nets[net]['Encryption']
freq=nets[net]['Frequency']
nconf = read_netconf(net)
if nconf:
if nconf['saved']:
nauto = 'NO'
if nconf['auto']:
nauto = 'YES'
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)
netind[str(i)] = nets[net]
i=i+1
return netind
netind = {}
fuck = "none"
while fuck not in netind.keys() and fuck.lower() not in ['e', 'R', 'q']:
netind = show_fuck_list(nets)
fuck = input("\n Choose a fucking one by index, or press E for edit, R to remove, Q to shit the hell out: ")
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