Created
April 18, 2024 04:20
-
-
Save scumdestroy/219ff280392dbab1923e4f6024d583ee to your computer and use it in GitHub Desktop.
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 sys | |
import base64 | |
if len(sys.argv) != 3: | |
print("Usage: python script.py users_file passwords_file") | |
sys.exit(1) | |
users_filename = sys.argv[1] | |
passwords_filename = sys.argv[2] | |
with open(users_filename, 'r') as users_file: | |
users = [line.strip() for line in users_file.readlines()] | |
with open(passwords_filename, 'r') as passwords_file: | |
passwords = [line.strip() for line in passwords_file.readlines()] | |
output_filename = 'output.txt' | |
with open(output_filename, 'w') as output_file: | |
for user in users: | |
for pw in passwords: | |
encoded_line = base64.b64encode(f"{name}:{pw}\n".encode()).decode() | |
output_file.write(encoded_line + '\n') | |
print(f"Output saved to {output_filename}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment