Algorithm Restore:
A =raw_input ('Enter the string: \ n') Num=Len (a) All_c=0 forIinchRange (0,num,1): b=Ord (A[i]) All_c+=bPrintAll_c#print Hex (all_c)result = All_c-int (' *', 16) *10PrintresultPrintHex (Result)ifresult==74: Print 'OK'Else: Print('Error')
Registration machine:
#-*-coding=gbk-*-Importrandomgetstring=raw_input ('enter 1 to get the serial number:') x='l1234567890-=qwertyuiop[]\asdfghjkl;\ ' Zxcvbnm,./[email protected]#$%^&* () _+QWERTYUIOP{}|ASDFGHJKL: " Zxcvbnm<>?'X_len=len (x) while(getstring=="1"): forIinchRange (0,x_len,1): A1= X[random.randint (0,len (x)-1)] forIinchRange (0,x_len,1): A2= X[random.randint (0,len (x)-1)] A3= X[random.randint (0,len (x)-1)] A4= X[random.randint (0,len (x)-1)] A5= X[random.randint (0,len (x)-1)] A6= X[random.randint (0,len (x)-1)] A7= X[random.randint (0,len (x)-1)] A8= X[random.randint (0,len (x)-1)] A9= X[random.randint (0,len (x)-1)] A10= X[random.randint (0,len (x)-1)] #Print X_len #Print a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 #Print Ord (str (A1)), Ord (str (A2)), Ord (str (A3)), Ord (str (A4)), Ord (Str (A5)), Ord (str (A6)), Ord (str (A7)), Ord (str A8 ), Ord (str (A9)), Ord (str (A10) ),m = Ord (str (A1)) +ord (str (A2)) +ord (str (A3)) +ord (str (A4)) +ord (Str (A5)) +ord (str (A6)) +ord (str (A7)) +ord (str (A8)) +ord ( STR (A9)) +ord (str (A10))-int (' *', 16) *10ifm==74: Print 'The SN is:'+a1+a2+a3+a4+a5+a6+a7+a8+a9+A10#print ' Get!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 'Key2=raw_input ('Make SN:') #Else: #print ' ERROR ' +str (i) #print ' End 'Else: Print 'Input 1'
IPAdr.exe registration Machine [PY]