def searchValideAccounts(self): ''' Search valid accounts Return True if no connection error. Return False if a connection error ''' userChoice = 1 logging.info("Searching valid accounts on '{0}':'{1}'/'{2}'".format(self.args['host'], self.args['port'], self.args['database'])) pbar, nb = getStandardBarStarted(len(self.accounts)), 0 for anAccount in self.accounts : currentUser, currentPassword = anAccount[0], anAccount[1] nb += 1 pbar.update(nb) logging.debug("Try to connect with {0}".format('/'.join(anAccount))) status = self.__saveThisLoginInFileIfNotExist__(anAccount[0]) if self.args['force-retry'] == False and status == False and userChoice ==1: userChoice = self.__askToTheUserIfNeedToContinue__(anAccount[0]) if userChoice == 0 : logging.info("The attack is aborded because you choose to stop (s/S)") break self.args['user'], self.args['password'] = currentUser, currentPassword mssql = Mssql(args=self.args) status = mssql.connect(printErrorAsDebug = True) if status == -1: logging.error("Connection error. Abording!") return False elif status == True: mssql.closeConnection() self.valideAccounts[currentUser] = currentPassword logging.info("Valid credential: '{0}'/'{1}' on ('{2}':'{3}'/'{4}') ".format(currentUser, currentPassword, self.args['host'], self.args['port'], self.args['database'])) else: logging.info("Unvalid credential: '{0}'/'{1}' on ('{2}':'{3}'/'{4}') ".format(currentUser, currentPassword, self.args['host'], self.args['port'], self.args['database'])) sleep(self.args['timeSleep']) pbar.finish() return True
def __init__(self, args, localIp, shareName=DEFAULT_SHARE_NAME): ''' Constructor ''' Mssql.__init__(self, args=args) self.localIp = localIp self.shareName = shareName
def __init__(self, args): ''' Constructor ''' Mssql.__init__(self, args=args) self.args = args self.spName = "IMDATELOHJOSUUSOOJAHMSAT"
def __init__(self, args): ''' Constructor ''' Mssql.__init__(self, args=args) self.credentials = None self.args = args
def __init__(self, args): ''' Constructor ''' Mssql.__init__(self, args=args) self.output = args['print'] self.args = args
def __init__(self, args): ''' Constructor ''' Mssql.__init__(self, args=args) self.args = args self.spName = "LDZIHNIUDJFEOKPOKDPEOK" self.sleepStatus = SLEEP_TIME_BEFORE_TO_GET_STATUS
def __init__(self,args, lowerAndUpper=True): ''' Constructor ''' logging.debug("UsernameLikePassword object created") Mssql.__init__(self,args) self.allUsernames = [] self.validAccountsList = [] self.lowerAndUpper=lowerAndUpper
def __init__(self, args): ''' Constructor ''' Mssql.__init__(self, args=args) self.tableName = self.POST_TABLE_NAME + generateUniqueName()
def __init__(self, args): ''' Constructor ''' Mssql.__init__(self, args=args)
def __init__ (self, args=None): ''' Constructor ''' Mssql.__init__(self, args=args) self.maxWidthScreen = str(int(getScreenSize()[0]) - self.RIGHT_SPACE_SIZE)