WOL Apgar Routine
APGAR is an encrypted token sent to the server to identify a user’s password. This is a one-way encryption routine and cannot be decrypted. All legacy Command and Conquer game client passwords using this algorithm must be exactly 8 characters long.
lookup = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
out = ""
i = 1
while (i <= 8)
left = ascii value of input[ i ]
right = ascii value of input[ length[input] - i ]
if left is odd
x = ((left * 2) XOR (left AND 1)) AND right
x = left XOR right
out += lookup[x AND 63]
PHP Implementation (Sean Wragg)
C++ Implementation (RenegadeProjects.com)
mIRC Script Implementation (Frank Razenberg)
Originally published at seanwragg.com on August 26, 2010.