def __init__(self,ipadd,fm_path,session=None): self.class_name = 'Update' self.ls = LogShow(self.class_name) if isinstance(ipadd, str): self.ip = ipadd else: self.ip = str(ipadd) if not Check.checkIP(self.ip): self.ls.log_print('warn', self.ip + ' is not valuable!', '__init__') if isinstance(fm_path, str): self.firmware_path = fm_path else: self.firmware_path = str(fm_path) self.url_update = 'http://' + self.ip + '/service/system/firmware_upgrade/full_update' self.url_status = 'http://' + self.ip + '/service/system/task/status' self.url_update_new = 'http://' + self.ip + '/service/system/system_upgrade' self.url_restore = 'http://' + self.ip + '/service/system/restore' self.url_stop = 'http://' + self.ip + '/service/system/stop' self.url_start = 'http://' + self.ip + '/service/system/start' self.login = LogIn(self.ip) if session is None: self.Login() else: self.session = session
def run(self): flogin = LogIn() ########################################################################## for username in self.userID: time.sleep(0.1) # print username self.ID_copy.remove(username) if username in self.ID.keys(): continue log = flogin.run(username=username, pwd=self.pwd) if log == 'success': f = open('./ucasID.txt', 'a') f.writelines(username + '\t' + self.pwd + '\n') f.close() logout() print username np.save('./data/ALLid.npy', np.array(self.ID_copy))
def __init__(self, ipadd, session): self.class_name = 'GetSN' if isinstance(ipadd, str): self.ip = ipadd else: self.ip = str(ipadd) self.login = LogIn(self.ip) if session is not None: self.session = session else: self.session = self.reLogin() url_pre = 'http://' + self.ip self.url_sn = url_pre + '/service/system/admin/sn' self.url_version = url_pre + '/service/system/firmware_upgrade/version' self.ls = LogShow(self.class_name) self.getContent()
from DBManager import DBManager import warnings from tkinter import * from login import LogIn warnings.filterwarnings('ignore') root = Tk() root.geometry("1000x600") root.title("JOBINATOR") icon = Image( "photo", file=r"/home/aaditya/College/V/SE/project/Doofenshmirtz_Portrait.png") root.tk.call('wm', 'iconphoto', str(root), icon) ######################################################################################################################## # THE LOG-IN SCREEN # This is the screen where the user enters their credentials and then gets logged in ######################################################################################################################## loginScreen = LogIn(root) root.mainloop()
def reLogin(self): login = LogIn(self.ip) return login.login()
from income import Income from expense import Expense from transaction import Transaction from analysis import Analysis from delete import Delete from saving import Savings import database is_true = True connection = database.connect() database.create_create_main_table(connection) # database.delete(connection) login_window = LogIn() while is_true: while login_window.sign_up: sign_up_window = SignUp() if not sign_up_window.is_closed: username = sign_up_window.username password = sign_up_window.password connection = database.connect() database.add_user(connection, username, password) login_window = LogIn() if login_window.is_closed: is_true = False if login_window.create_homepage:
def __init__(self, credentials='credentials/credentials-CU.json'): self.service = LogIn(credentials) self.labels = Labeler(self.service) self.messages = Messenger(self.service)
from login import LogIn if __name__ == "__main__": LogIn()
def login(self): self.login = LogIn(self.ip) self.session = self.login.login() return self.session