Advertisement
Guest User

Untitled

a guest
Apr 17th, 2017
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. import cfscrape
  2. from bs4 import BeautifulSoup
  3. from time import sleep
  4. #login info
  5. username = 'john0001'
  6. password = 'azsxdc123'
  7.  
  8. data = {'username': username, 'password': password, 'submit': 'Sign+in'}
  9. with cfscrape.create_scraper() as client:
  10. #login
  11. client.post('https://leakedsource.ru/main/login/', data=data)
  12. r = client.get('https://leakedsource.ru/')
  13. soup = BeautifulSoup(r.content, 'lxml')
  14. token = soup.find('input', {'name': 'token'}).get('value')
  15.  
  16. #opening email list
  17. with open('input.txt') as f:
  18. lines = f.read().splitlines()
  19. with open('output.txt', "w") as output:
  20. for line in lines:
  21. #going throu the lis
  22. data = {'search': line, 'searchType': '3', 'token': str(token), 'submit': 'Search'}
  23. s = client.post('https://leakedsource.ru/', data=data)
  24. soup = BeautifulSoup(s.content, 'lxml')
  25. tables = soup.findAll('table', { "class" : "table table-inverse table-bordered" })
  26. print s.content, 'hellp'
  27. #parsing
  28. for table in tables:
  29. soup = BeautifulSoup(str(table), 'lxml')
  30. ths = soup.findAll('th')
  31. tds = soup.findAll('td')
  32. ths.pop(0)
  33. combo = line
  34. for th, td in zip(ths, tds):
  35. if th.text == 'password':
  36. combo = combo + ';' + td.text
  37. if th.text == 'salt':
  38. combo = combo + ':' + td.text
  39. output.write(combo.encode('utf-8')+'\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement