import random
import sys
import time
def check_key(key):
    char_sum = 0
    for c in key:
        char_sum += ord(c)
    sys.stdout.write("{0:3} | {1}      \r".format(char_sum, key))
    sys.stdout.flush()
    return char_sum

print (chr(27) + "[1;32m" + "S T A T E  M A C H I N E   Keygen Ret0 by @naivenom"+chr(27) + "[0m")
time.sleep(2)
timeout = time.time()+1
first = [];second = [];third = [];four = [];five = [];six = [];seven = [];eight = [];nine = [];ten = [];
eleven = [];twelve = [] ;thirteen=[]; fourteen = []; fifteen = []; sixteen = []; seventeen = []; eighteen = [];
nineteen = []; twenty = []; twenty_one = [];
while True:
    test = 0
    if test == 1 or time.time() > timeout:
        break
    key = ""
    key += random.choice("a#bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_!$%&'()*+,./:;<>=?@[]`{~}\"")
    v2 = check_key(key)
    #print(v2)
    v3 = v2>>1
    #print("Division %d"%v3)
    if v3 <= 33:     
        mult = v3*2
        v0 = 27
        esi = mult*v0 >> v0/5
        if esi == 28:        
            print (chr(27) + "[0;33m" + "\n\tCase 28: %s "%(chr(v2))+chr(27) + "[0m")
            first.append(chr(v2))
            twenty_one.append(chr(v2))
        elif esi == 55:     
            print (chr(27) + "[0;33m" + "\n\tCase 55: %s "%(chr(v2))+chr(27) + "[0m")
            fourteen.append(chr(v2))

    if v3 >= 125:
        pass
        
    else:
        v0 = 27     
        esi = v3*v0 >> v0/5
        if esi == 39:        
            print (chr(27) + "[0;33m" + "\n\tCase 39: %s "%(chr(v2))+chr(27) + "[0m")
            second.append(chr(v2))
            seven.append(chr(v2))
            thirteen.append(chr(v2))
            twenty.append(chr(v2))
        elif esi == 40:        
            print (chr(27) + "[0;33m" + "\n\tCase 40: %s "%(chr(v2))+chr(27) + "[0m")
            six.append(chr(v2))
        elif esi == 41:       
            print (chr(27) + "[0;33m" + "\n\tCase 41: %s "%(chr(v2))+chr(27) + "[0m")
            eleven.append(chr(v2))
        elif esi == 34:      
            print (chr(27) + "[0;33m" + "\n\tCase 34: %s "%(chr(v2))+chr(27) + "[0m")
            third.append(chr(v2))
            eight.append(chr(v2))
        elif esi == 42:      
            print (chr(27) + "[0;33m" + "\n\tCase 42: %s "%(chr(v2))+chr(27) + "[0m")
            four.append(chr(v2))
            seventeen.append(chr(v2))
        elif esi == 43:      
            print (chr(27) + "[0;33m" + "\n\tCase 43: %s "%(chr(v2))+chr(27) + "[0m")
            ten.append(chr(v2))
            eighteen.append(chr(v2))
        elif esi == 44:      
            print (chr(27) + "[0;33m" + "\n\tCase 44: %s "%(chr(v2))+chr(27) + "[0m")
            twelve.append(chr(v2))
        elif esi == 45:      
            print (chr(27) + "[0;33m" + "\n\tCase 45: %s "%(chr(v2))+chr(27) + "[0m")
            sixteen.append(chr(v2))
        elif esi == 48:      
            print (chr(27) + "[0;33m" + "\n\tCase 48: %s "%(chr(v2))+chr(27) + "[0m")
            five.append(chr(v2))
            nine.append(chr(v2))
        elif esi == 49:      
            print (chr(27) + "[0;33m" + "\n\tCase 49: %s "%(chr(v2))+chr(27) + "[0m")
            nineteen.append(chr(v2))
        elif esi == 50:      
            print (chr(27) + "[0;33m" + "\n\tCase 50: %s "%(chr(v2))+chr(27) + "[0m")
            fifteen.append(chr(v2))
            


    test = test-1
print (chr(27) + "[1;32m" + "V A L I D  S E R I A L S:"+chr(27) + "[0m")
for i in range(48):
    print(chr(27) +"[0;33m"+"".join(first[i]*3)+
        "".join(second[i]*2)+"".join(third[i]*1)+"".join(four[i]*1)+"".join(five[i]*1)+"".join(six[i]*1)
        +"".join(seven[i]*1)+"".join(eight[i]*1)+"".join(nine[i]*1)+"".join(ten[i]*1)+"".join(eleven[i]*1)
        +"".join(twelve[i]*1)+"".join(thirteen[i]*1)+"".join(fourteen[i]*1)+"".join(fifteen[i]*1)
        +"".join(sixteen[i]*1)+"".join(seventeen[i]*1)+"".join(eighteen[i]*1)+"".join(nineteen[i]*1)
        +"".join(twenty[i]*2)+"".join(twenty_one[i]*3)+chr(27) +"[0m")

print("--------------------------------")
