Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 28th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from random import randint
  2.  
  3. class Account:
  4.     def __init__(self, email, passw):
  5.         self.email = email
  6.         self.passw = passw
  7.  
  8.  
  9. class AccountLoader:
  10.     def __init__(self):
  11.         self.accounts = []
  12.  
  13.     @staticmethod
  14.     def parse_line_to_account(line):
  15.         _line = line.split(':')
  16.         return _line[0], _line[1]
  17.  
  18.     def load_accounts_from_file(self):
  19.         _accounts_list = [line.strip() for line in open('accounts.txt')]
  20.         for _account in _accounts_list:
  21.             self.accounts.append(Account(*self.parse_line_to_account(_account)))
  22.  
  23.     def get_random_account(self):
  24.         r = randint(0, len(self.accounts))
  25.         return self.accounts[r-1]
  26.  
  27. al = AccountLoader()
  28. al.load_accounts_from_file()
  29.  
  30. #Example
  31. for i in range(1,10):
  32.     #10 razy randomowe konto chcemy
  33.     random_account = al.get_random_account()
  34.     print(random_account.email, random_account.passw)
  35.     #przykładowo
  36.     #element.send_keys(random_account.email)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top