strings = "01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
result = 0
def set_serial(data):
global result
result = 0
for i in range(0,len(data)):
tmp = ord(data[i])*ord(data[i])
result += tmp
tmp = result + (int(bin(ord(data[i])>>1),2)+3)*ord(data[i])-ord(data[i])
result = tmp*2
for i in range(0,len(strings)):
for j in range(0,len(strings)):
name = strings[i]+strings[j]
set_serial(name)
if len(hex(result)[2:])==4 and (int(hex(result)[2:][:2],16)>32 and int(hex(result)[2:][:2],16)<127) and (int(hex(result)[2:][2:],16)>32 and int(hex(result)[2:][2:],16)<127):
print "--------------------------------------------------"
print "Find Name[*] = " + name
print "Find Serial[*] = " + chr(int(hex(result)[4:],16))+chr(int(hex(result)[2:4],16))
print "--------------------------------------------------"