Skip to content

Commit ea33843

Browse files
committed
Editions
1 parent f2e8ef2 commit ea33843

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

kg.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
parser.add_argument("-i", "--hwid", help="Your hardware code", required=True)
1212
parser.add_argument("-o", "--output", help="Authorization file", default="Authorize.auz")
1313
parser.add_argument("-v", "--version", help="Ableton Live version", type=int, choices=range(9, 13), default=12)
14+
parser.add_argument("-e", "--edition", help="Ableton Live edition", choices=["Lite", "Intro", "Standard", "Suite"], default="Suite")
1415
args = parser.parse_args()
1516

1617

@@ -79,8 +80,9 @@ def generate_single(k: dsa.DSAPrivateKey, id1: int, id2: int, hwid: str) -> str:
7980
return f.format(serial, id1, id2, sig)
8081

8182

82-
def generate_all(k: dsa.DSAPrivateKey, hwid: str, ver: int) -> str:
83-
yield generate_single(k, 0x2 if ver >= 12 else 0x0, ver << 4, hwid)
83+
def generate_all(k: dsa.DSAPrivateKey, edition: str, version: int, hwid: str) -> str:
84+
ident = {"Lite": 4, "Intro": 3, "Standard": 0, "Suite": 2}
85+
yield generate_single(k, ident[edition], version << 4, hwid)
8486
for i in range(0x40, 0xff + 1):
8587
yield generate_single(k, i, 0x10, hwid)
8688
for i in range(0x8000, 0x80ff + 1):
@@ -100,6 +102,6 @@ def generate_all(k: dsa.DSAPrivateKey, hwid: str, ver: int) -> str:
100102
hwid = "-".join(hwid[i:i+4] for i in range(0, 24, 4))
101103
assert re.fullmatch(r"([0-9A-F]{4}-){5}[0-9A-F]{4}", hwid), f"Expected hardware ID like 1111-1111-1111-1111-1111-1111, not {hwid}"
102104

103-
lines = generate_all(team_r2r_key, hwid, args.version)
105+
lines = generate_all(team_r2r_key, args.edition, args.version, hwid)
104106
with open(args.output, mode="w", newline="\n") as f:
105107
f.write("\n".join(lines))

0 commit comments

Comments
 (0)