Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cfscrape
- from bs4 import BeautifulSoup
- from time import sleep
- #login info
- username = 'john0001'
- password = 'azsxdc123'
- data = {'username': username, 'password': password, 'submit': 'Sign+in'}
- with cfscrape.create_scraper() as client:
- #login
- client.post('https://leakedsource.ru/main/login/', data=data)
- r = client.get('https://leakedsource.ru/')
- soup = BeautifulSoup(r.content, 'lxml')
- token = soup.find('input', {'name': 'token'}).get('value')
- #opening email list
- with open('input.txt') as f:
- lines = f.read().splitlines()
- with open('output.txt', "w") as output:
- for line in lines:
- #going throu the lis
- data = {'search': line, 'searchType': '3', 'token': str(token), 'submit': 'Search'}
- s = client.post('https://leakedsource.ru/', data=data)
- soup = BeautifulSoup(s.content, 'lxml')
- tables = soup.findAll('table', { "class" : "table table-inverse table-bordered" })
- print s.content, 'hellp'
- #parsing
- for table in tables:
- soup = BeautifulSoup(str(table), 'lxml')
- ths = soup.findAll('th')
- tds = soup.findAll('td')
- ths.pop(0)
- combo = line
- for th, td in zip(ths, tds):
- if th.text == 'password':
- combo = combo + ';' + td.text
- if th.text == 'salt':
- combo = combo + ':' + td.text
- output.write(combo.encode('utf-8')+'\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement