Jefferson runner Password

   Today, in attack and defense in the world to do a password problem, need to use the password runner Jefferson, hereby record it.

   We look at the original title

Password Jefferson runner Principle : Thomas - Jefferson encrypted by turning three strings strings, the first portion of the encrypted table, the second part is a key, the third portion into ciphertext. Table is encrypted using the key and we need to encrypt the ciphertext, the specific process is as follows: First check the first character of the key 2, so we need to find the table to the encryption of the data line 2 2: <KPBELNACZDTRXMJQOYHGVSFUWI < . Recycling the first character of ciphertext is rotated N, N acting here is a character after the first rotation is the N, where is the rotation cycle (i.e., after the letter z is a). Similarly, after the keys for the same operation. Here Gangster put the script written by:

. 1   - * - Coding: UTF-. 8 - * -
 2  Import Re
 . 3 text = "" 
. 4 with Open ( " wheelcipher.txt " , " R & lt " , encoding = " UTF-. 8 " ) AS F:
 . 5      text = F. read ()
 . 6  # Print (text) to see if the full read 
. 7 code = [] # character extracted in here 
. 8 code = the re.findall (R & lt " <(. *) < " , text)
 . 9  for I in Range (len (code)):
 10      code [I] =code [I] .strip ()
 . 11  Print (code)
 12 is codetext = " NFQKSEVOQOFNP " 
13 is codeNum = " 2,3,7,5,13,12,9,1,8,10,4,11,6 " 
14 = codenum.split codeNum ( " , " ) # these figures are inside to get a 
15  # Print (codeNum) 
16 a = 0
 . 17  Print ( " decrypted: " )
 18 is  for I in codeNum:
 . 19      index code = [int (I) -1 ] .index (codetext [A])
 20 is      A = A +. 1
21 is      code [int (I) -1] = code [int (I) -1] [index:] + code [int (I) -1 ] [: index]
 22 is      Print (code [int (I) -1 ] )
 23 is  
24  # finished deformed 
25  
26 is  Print ( " Here is each column " )
 27  for I in Range (len (code [0])):
 28        STR = "" 
29        Print ( " first {} column is : " .format (I), End = " " )
 30        for J in codeNum:
 31 is            STR + = code [int (J) -1 ] [I]
 32       print(str.lower())
View Code

Then after execution is

With each column means that all rows decrypted letters a one output, the last problem is the flag where I saw parsing of others, they say the first 17, the answer is indeed correct, but I did not find Why, do you want one a try it? Which big brother Wang know it can tell, very grateful!

 

Guess you like

Origin www.cnblogs.com/zs0618/p/12312558.html