Пример #1
0
 def get_software_levels(self, username, sessionkey):
     response = Connector.post_request('/Software/GetSoftwareLevels', Username=username, SessionKey=sessionkey)
     if response != "":
         try:
             r = response.json()
             self.software_dict['Money'] = int(r['Money'].replace('$', '').replace(',', ''))
             self.software_dict['BruteForce'] = r['BruteForce']
             self.software_dict['Rootkit'] = r['Rootkit']
             self.software_dict['ZeroDay'] = r['ZeroDay']
             self.software_dict['DDOS'] = r['DDOS']
             self.software_dict['Firewall'] = r['Firewall']
             self.software_dict['IPS'] = r['IPS']
             self.software_dict['HDS'] = r['HDS']
             self.software_dict['VPN'] = r['VPN']
             self.software_dict['SDK'] = r['SDK']
             self.software_dict['Scan'] = r['Scan']
             self.software_dict['Antivirus'] = r['Antivirus']
             self.software_dict['RAM'] = r['RAM']
             self.software_dict['Keylogger'] = r['Keylogger']
             self.software_dict['Cryptography'] = r['Cryptography']
             self.software_dict['Bank'] = r['Bank']
             self.software_dict['Spyware'] = r['Spyware']
             self.software_dict['Adware'] = r['Adware']
         except ValueError:
             logger.error(response.text)
             exit(0)
     return
Пример #2
0
 def verify_session(self):
     response = Connector.post_request("/User/VerifySession",
                                       Username=self.Username,
                                       SessionKey=self.SessionKey)
     if response != "":
         if response.text == "TRUE":
             return True
     return False
Пример #3
0
 def brute_force_attack(username, sessionkey, target):
     response = Connector.post_request("/Attack/BruteForceAttack",
                                       System="Brute Force",
                                       Username=username,
                                       SessionKey=sessionkey,
                                       Target=target)
     if response != "":
         logger.info(response.text)
     return
Пример #4
0
 def update_firebase(self):
     response = Connector.post_request("/User/UpdateFirebase",
                                       Username=self.Username,
                                       SessionKey=self.SessionKey,
                                       FirebaseKey=FIREBASE_KEY)
     if response != "":
         if response.text == "TRUE":
             return True
     return False
Пример #5
0
 def login(self):
     response = Connector.post_request("/User/Login",
                                       Username=self.Username,
                                       Password=self.Encrypted)
     if response != "Incorrect username or password." and response != "Error!" and response != "":
         self.SessionKey = response.text
     else:
         logger.error(response)
         exit(0)
     return
Пример #6
0
 def check_new(self):
     response = Connector.post_request("/User/CheckNew",
                                       Username=self.Username,
                                       SessionKey=self.SessionKey)
     if response != "":
         if response.text == "0":
             return False
         elif response.text == "1":
             return True
     return False
Пример #7
0
 def get_status(self, username, sessionkey):
     response = Connector.post_request("/Tournaments/GetStatus", Username=username, SessionKey=sessionkey)
     if response != "":
         try:
             r = response.json()
             self.Type = int(r['Type'])
             self.Rank = r['Rank']
         except ValueError:
             logger.error(response.text)
     return
Пример #8
0
 def get_ips(username, sessionkey):
     response = Connector.post_request("/Remote/GetIPs",
                                       Username=username,
                                       SessionKey=sessionkey)
     if response != "":
         try:
             r = response.json()
             return r
         except ValueError:
             return ""
     return ""
Пример #9
0
 def scan_ip(username, sessionkey, target):
     response = Connector.post_request("/Remote/ScanIP",
                                       Username=username,
                                       SessionKey=sessionkey,
                                       Target=target)
     if response != "":
         try:
             r = response.json()
             return r
         except ValueError:
             return ""
     return ""
Пример #10
0
 def get_theme_colors(self):
     response = Connector.post_request("/User/GetThemeColors",
                                       Username=self.Username,
                                       SessionKey=self.SessionKey)
     if response != "":
         try:
             r = response.json()
             self.SkinPrimary = r['Primary']
             self.SkinSecondary = r['Secondary']
         except ValueError:
             print(response.text)
     return
Пример #11
0
 def get_bank_info(self, username, sessionkey):
     response = Connector.post_request("/Bank/GetBankInfo",
                                       Username=username,
                                       SessionKey=sessionkey)
     if response != "":
         try:
             r = response.json()
             self.Money = int(r['Money'])
             self.BankValue = int(r['BankValue'])
             self.Premium = int(r['Premium'])
         except ValueError:
             logger.info(response.text)
     return
Пример #12
0
 def upgrade_software(self, username, sessionkey, software, upgradeby):
     response = Connector.post_request('/Software/UpgradeSoftware',
                                       Username=username,
                                       SessionKey=sessionkey,
                                       Software=software,
                                       UpgradeBy=upgradeby)
     if response != '':
         try:
             r = response.json()
             self.software_dict['Money'] = int(r['NewCash'])
         except KeyError:
             logger.error(response.text)
             exit(0)
     return
Пример #13
0
 def get_user_info(self):
     response = Connector.post_request("/User/GetUserInfo",
                                       Username=self.Username,
                                       SessionKey=self.SessionKey,
                                       AppVersion=APP_VERSION)
     if response != "":
         try:
             r = response.json()
             self.UserID = r['UserID']
             self.Username = r['Username']
             self.Role = r['Role']
             self.IP = r['IP']
             self.Rank = int(r['Rank'])
             self.Money = int(r['Money'])
             self.Premium = int(r['Premium'])
             self.IsPremium = True if r['IsPremium'] == "TRUE" else False
             self.PremiumRemaining = int(r['PremiumRemaining'])
             self.ProfileImage = r['ProfileImage']
             self.BruteForce = int(r['BruteForce'])
             self.Rootkit = int(r['Rootkit'])
             self.ZeroDay = int(r['ZeroDay'])
             self.DDOS = int(r['DDOS'])
             self.Firewall = int(r['Firewall'])
             self.IPS = int(r['IPS'])
             self.HDS = int(r['HDS'])
             self.VPN = int(r['VPN'])
             self.SDK = int(r['SDK'])
             self.Scan = int(r['Scan'])
             self.Antivirus = int(r['Antivirus'])
             self.RAM = int(r['RAM'])
             self.Keylogger = int(r['Keylogger'])
             self.Cryptography = int(r['Cryptography'])
             self.Reputation = int(r['Reputation'])
             self.Status = r['Status']
             self.SkinPrimary = r['SkinPrimary']
             self.SkinSecondary = r['SkinSecondary']
         except ValueError:
             print(response.text)
             print('getuserinfo')
             exit(4)
     return
Пример #14
0
def get_package_list():
    Connector.post_request("/Store/GetPackages")
Пример #15
0
 def encrypt_password(self):
     response = Connector.post_request("/Misc/Encryption",
                                       Input=self.Password)
     if response != "":
         self.Encrypted = response.text
     return
Пример #16
0
 def get_active(username, sessionkey):
     Connector.post_request("/Items/GetActive", Username=username, SessionKey=sessionkey)
     return