SHARE
TWEET

EncryptionTool

a guest Mar 26th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. msg = 'GAr cnff78eq vfGr8L4qetPEsslog32gdsoRK8XSP6x2RHh'
  2.  
  3.  
  4. msgSplit = []
  5.  
  6. msgShuffle = list() #where the final product goes
  7. for i in range(len(msg)): #start with a the same numbers of element(msg)
  8.     msgShuffle.append('*')
  9.  
  10. def split_msg(msg):
  11.     #split msg letter into list
  12.     for i in msg:
  13.         msgSplit.append(i)
  14.    
  15.     return msgSplit
  16.  
  17. def shuffle_msg(lista,lista2):
  18.     for i in lista:
  19.         control = lista.index(i) + 13 #13 here is the 'jump'
  20.    
  21.         if control < len(lista):
  22.             lista2[lista.index(i)] = i
  23.         else:
  24.             differenza = control - len(lista)
  25.             lista2[differenza] = i
  26.        
  27.    
  28.  
  29. ################# T  E  S  T  #################
  30. split_msg(msg)
  31. print(msgSplit)
  32. print('----------------')
  33. shuffle_msg(msgSplit, msgShuffle)
  34. print(msgShuffle)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top