Initial commit of AthonetTools

This commit is contained in:
2025-08-21 12:59:43 +00:00
commit cd932b8fcb
2483 changed files with 433999 additions and 0 deletions

24
generate_ep5g_password.py Normal file
View File

@@ -0,0 +1,24 @@
import hashlib
import argparse
# Set up command line argument parsing
parser = argparse.ArgumentParser(description="Generate EP5G password from serial.")
parser.add_argument("serial", help="Hardware serial number")
parser.add_argument("-s", "--seed", default="ANWEP5G", help="Seed value (default: ANWEP5G)")
parser.add_argument("-p", "--prefix", default="EP5G", help="Password prefix (default: EP5G)")
args = parser.parse_args()
# Combine seed and serial
seed_serial = args.seed + args.serial
# SHA-256 hash
sha_dig = hashlib.sha256(seed_serial.encode('utf-8')).hexdigest()
# Extract password portion
pointer = int(sha_dig[0], 16)
twelve = sha_dig[pointer:pointer+12]
password = f"{args.prefix}!{twelve}"
# Output
print(password)