Compare commits
3 Commits
1665536869
...
1665539241
Author | SHA1 | Date | |
---|---|---|---|
5c7cd9b0a5 | |||
a374ec73b4 | |||
b0457865d6 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ admin-key.ppk
|
||||
token.txt
|
||||
*.zip
|
||||
output.log
|
||||
output.log
|
||||
|
11
auth.py
11
auth.py
@ -16,11 +16,18 @@ def login(config, user, password, sysid):
|
||||
ssh.run_ssh(config, command, 'scripts')
|
||||
sleep(1)
|
||||
filename = sysid + "success.txt"
|
||||
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
||||
output = ssh.check_for_file(config, filename, 'receivelogin')
|
||||
if output == False:
|
||||
filename = sysid + "fail.txt"
|
||||
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
||||
raise ValueError("Unable to determine login status")
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
fprint(type(output))
|
||||
if str(output).find("admin") >= 0 or str(output).find("Admin") >= 0:
|
||||
fprint("Authorized as admin!")
|
||||
return True
|
||||
else:
|
||||
fprint("Not admin")
|
||||
return False
|
3804
output.log
3804
output.log
File diff suppressed because it is too large
Load Diff
@ -49,8 +49,8 @@ class TaskBarIcon(wx.adv.TaskBarIcon):
|
||||
#self.close_popup()
|
||||
|
||||
def on_login(self, event):
|
||||
settings["username"] = "Cole"
|
||||
settings["password"] = "12345"
|
||||
settings["username"] = "frontend"
|
||||
settings["password"] = "qwertyuiop"
|
||||
settings["login"] = True
|
||||
|
||||
def on_exit(self, event):
|
||||
|
Reference in New Issue
Block a user