Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Гайд по установке
- Установленный python 3.7+(если будет время потом скомпилирую,или скомпилируй ты анонче)
- потом в терминал
- pip install requests
- pip install selenium
- pip install webdriver-manager
- Нихуя не надо, просто запускай.
- Вроде прокси не требуются,ну если возникли проблемы с регой - юзай впн
- По всем вопросам,багам в тред
- КТО БУДЕТ ПИСАТЬ СООБЩЕНИЯ ПО ТИПУ - "КОКОКО ГОВНОКОД","ХРЮХРЮХРЮ ПИТОН";Просьба пойти срать на хабр
- Удачного вечера анон!
- '''
- import requests
- import string,random,time,re
- import warnings
- import uuid
- from selenium import webdriver
- warnings.filterwarnings("ignore")
- banner = """
- +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+
- |O|P|E|R|A|T|I|O|N| |B|L|A|C|K| |M|A|M|B|A|
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |B|y| |A|n|o|n| |f|o|r| |2|c|h|.|h|k|+|O|G|N|E|L|I|S|-|K|U|N|
- +-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |V|e|r| |1|.|2|DUO-HEADLESS|
- +-+-+-+ +-+-+-+-+-+-+-+-+-+-
- """
- def getEmailMessage(token):
- resp = requests.get('https://api.mail.tm/messages', headers={'Authorization': 'Bearer ' + token})
- if resp.status_code != 200:
- raise Exception
- emails = resp.json()['hydra:member']
- if len(emails) != 0:
- id = emails[0]['id']
- resp = requests.get('https://api.mail.tm/messages/' + id, headers={'Authorization': 'Bearer ' + token})
- if resp.status_code != 200:
- raise Exception
- return resp.json()['html'][0]
- return None
- def ExtractPwd(message):
- match = re.search(r'href=[\'"]?([^\'" >]+)', message)
- if match:
- return match.group(0).replace('href="',"")
- else:
- return None
- def GenPassword(min: int = 20, max: int = 20):
- pwd = ""
- special_list = ["!","@","#","$","%"]
- pwd += ''.join(random.choice(string.ascii_uppercase) for i in range(5))
- pwd += ''.join(random.choice(string.ascii_lowercase) for i in range(5))
- pwd += ''.join(random.choice(string.digits) for i in range(5))
- pwd += ''.join(random.choice(special_list) for i in range(5))
- return ''.join(random.sample(pwd,len(pwd)))
- def main():
- itter = 0
- print(banner)
- ch = "nothing"
- v = ["f", "F", "c", "C"]
- while ch not in v:
- ch = input("Firefox (F) или Chrome (C)?: ")
- is_headless = None
- while is_headless not in ["y", "Y", "n", "N"]:
- is_headless = input("Без показа окна браузера? С ХРОМОМ ВОЗМОЖНО НЕ РАБОТАЕТ (Y/N): ")
- while True:
- try:
- login = uuid.uuid4().hex.replace('-', '-')
- resp = requests.post(f"https://api.mail.tm/accounts", json={"address": login + "@sinaite.net",
- "password": "2@k6O8iJ"})
- if resp.status_code != 201:
- raise Exception
- email = resp.json()['address']
- resp = requests.post(f"https://api.mail.tm/token", json={"address": email,
- "password": "2@k6O8iJ"})
- if resp.status_code != 200:
- raise Exception
- token = resp.json()['token']
- resp = requests.get('https://api.mail.tm/messages', headers={'Authorization': 'Bearer ' + token})
- if resp.status_code != 200:
- raise Exception
- driver = None
- if ch in ["c", "C"]:
- print("Запускаем Chrome")
- from selenium.webdriver.chrome.options import Options
- from webdriver_manager.chrome import ChromeDriverManager
- chrome_options = Options()
- if is_headless in ["y", "Y"]:
- chrome_options.add_argument("--disable-extensions")
- #chrome_options.add_argument("--disable-gpu")
- #chrome_options.add_argument("--headless")
- chrome_options.headless = True
- driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)
- if ch in ["f", "F"]:
- print("Запускаем Firefox")
- from selenium.webdriver.firefox.options import Options
- from webdriver_manager.firefox import GeckoDriverManager
- options = Options()
- if is_headless in ["y", "Y"]:
- options.add_argument("--disable-extensions")
- #options.add_argument("--disable-gpu")
- #options.add_argument("--headless")
- options.headless = True
- driver = webdriver.Firefox(executable_path=GeckoDriverManager().install(), options=options)
- driver.implicitly_wait(5)
- print("Начинаем регистрацию...")
- driver.get("https://63.ru")
- try:
- driver.find_element_by_xpath('//*[@id="onesignal-slidedown-cancel-button"]').click()
- except:
- print()
- driver.find_element_by_xpath('//*[@id="app"]/div[2]/header/div[1]/div[2]/a').click()
- driver.find_element_by_xpath('//*[@id="app"]/div[2]/div[3]/div/div/div[2]/div/form/div[3]/button').click()
- driver.find_element_by_xpath('//*[@id="register_login"]').send_keys(email)
- driver.find_element_by_xpath('//*[@id="register_password"]').send_keys(GenPassword())
- driver.find_element_by_xpath('//*[@id="app"]/div[2]/div[4]/div/div/div[2]/div/form/button').click()
- print(f"Мыло: {email}")
- while True:
- time.sleep(1)
- message = getEmailMessage(token)
- if message is not None:
- break
- print("Ожидаем письмо...")
- driver.get(ExtractPwd(message))
- print("Пароль получен")
- driver.get("https://63.ru/text/education/2022/01/25/70386878/")
- print("Голосуем за нигру")
- driver.find_element_by_xpath(
- '//*[@id="app"]/div[2]/div[1]/div/div/div[3]/div[2]/div[1]/div[1]/div[1]/div/div[2]/div[21]/div[2]/div[7]/div[2]/div[2]/div/button').click()
- driver.close()
- itter += 1
- print(f"Успешно! Итерация:{itter}")
- except Exception as e:
- print("shhiiet: " + str(e))
- if driver is not None:
- try:
- driver.close()
- except:
- print("sssssshhhhhhhhieeet")
- finally:
- time.sleep(5)
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment