View Single Post
  #4  
Old 11-03-2016, 17:14
SmilingWolf SmilingWolf is offline
Family
 
Join Date: Dec 2014
Posts: 43
Rept. Given: 4
Rept. Rcvd 97 Times in 24 Posts
Thanks Given: 4
Thanks Rcvd at 149 Times in 30 Posts
SmilingWolf Reputation: 97
Serials are nice, but aren't keygens better?

Code:
#!/usr/bin/env python2

# Janusec.WebCruiser.3.5.3.Keygen
# Author: SmilingWolf
# Thanks to: whoever leaked a valid key
# so that the MagicValue could be found

import sys, binascii, struct
from Crypto.Hash import SHA512

MagicValue = 0x7FA1447820DA2C6C

def GetHash(Data):
    Hash = SHA512.new()
    Hash.update(Data)
    HashBytes = binascii.hexlify(Hash.digest())
    FinalHash = ''
    for Elem in xrange(0, len(HashBytes), 8):
        FinalHash = FinalHash + HashBytes[Elem]
    return binascii.unhexlify(FinalHash)

if len(sys.argv) < 2:
    print 'Usage:'
    print '%s username' % sys.argv[0]
    sys.exit(0)

UserName = sys.argv[1]
UInt64Hash = struct.unpack('>Q', GetHash(UserName))[0]
UInt64Serial = (UInt64Hash + MagicValue) % 0x10000000000000000
Serial = binascii.hexlify(struct.pack('>Q', UInt64Serial)).upper()
Serial = '%s-%s-%s-%s' % (Serial[0:4], Serial[4:8], Serial[8:12], Serial[12:16])

print UserName
print Serial

Last edited by SmilingWolf; 11-03-2016 at 21:57.
Reply With Quote
The Following 2 Users Gave Reputation+1 to SmilingWolf For This Useful Post:
Levis (11-04-2016), tonyweb (11-06-2016)
The Following 7 Users Say Thank You to SmilingWolf For This Useful Post:
abhi93696 (04-13-2017), chants (11-04-2016), foosaa (11-20-2016), gsaralji (11-03-2016), ontryit (11-04-2016), ph03n1x (06-24-2017), Spiderz_Soft (11-03-2016)