This commit is contained in:
2021-07-30 08:25:11 +02:00
parent 87576af473
commit b0160f61fc
2 changed files with 28 additions and 24 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Program Files\\Python38\\python.exe"
}
+24 -23
View File
@@ -130,33 +130,34 @@ def click_b3(channel):
main_fun(BTN2_PIN) main_fun(BTN2_PIN)
def click_b2(channel): def click_b2(channel):
global aplist
global idxWin
global idxLen
global start global start
global vert global vert
global test global apIndx
global chaSel
start = time.time() if state == BTN3_PIN:
apIndx = -1
if apIndx >= 0: if vert == 1:
main_fun(998) if horz == 1:
#print ''.join(pwdLst) #TODO change password for real... main_fun(995)
os.system("# enable hotspot")
else:
main_fun(996)
os.system("# disable hotspot")
elif vert == 2:
main_fun(997)
os.system("")
start = stamp - SCREEN_SAVER + 5 start = stamp - SCREEN_SAVER + 5
else: else:
result = os.popen("iwlist {0} scan 2>/dev/null | grep '^..*ESSID:\"..*\"$' | sed 's/^.*ESSID:\"\\(..*\\)\".*$/\\1/'".format(iface)).read() main_fun(BTN1_PIN)
aplist = result.splitlines() else:
if apIndx < 0:
idxLen = len(aplist) vert = 3 # Default
if (idxWin + SCREEN_LINES) > idxLen: main_fun(BTN3_PIN)
idxWin = idxLen - SCREEN_LINES else:
if idxWin < 0: if chaSel < 2:
idxWin = 0 chaSel = chaSel + 1
pwdLst[horz] = choices[chaSel][vert]
if vert > idxLen: main_fun(BTN2_PIN)
vert = idxLen
main_fun(channel)
def select_h(channel): def select_h(channel):
global apIndx global apIndx