Created
February 15, 2022 14:05
-
-
Save incogbyte/33b01d3197021539a1201ce0d86542b5 to your computer and use it in GitHub Desktop.
Small script to generate base64 passwords like, admin:admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import base64 | |
''' | |
Small script to generate base64 passwords like, YWRtaW46YWRtaW4= | |
usage | |
python3 base64PassGen.py emails.txt passwords.txt | |
''' | |
users = open(sys.argv[1], 'r') # users or emails | |
passwords = open(sys.argv[2], 'r') # passwords | |
with open(sys.argv[1], 'r') as users: | |
for line in users: | |
usr = line.strip() | |
with open(sys.argv[2], 'r') as passwd: | |
for p in passwd: | |
pwd = p.strip() | |
credencial = f"{usr}:{pwd}" | |
strInBytes = credencial.encode('ascii') | |
base64Bytes = base64.b64encode(strInBytes) | |
base64Message = base64Bytes.decode('ascii') | |
print(base64Message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment