This problem is not easy, direct programming can
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/9D/61/wKioL1l_JJ7DEhckAAFY4a6JWTw767.png-wh_500x0-wm_ 3-wmp_4-s_1506074675.png "title=" 1.png "alt=" Wkiol1l_jj7dehckaafy4a6jwtw767.png-wh_50 "/>
I'm just pasting my Python code in.
#!/usr/bin/python
#coding=utf-8
Import base64
#ror13Encryption function (ciphertext incoming is decryption, plaintext incoming is encryption)
Def rot13(s, OffSet=13):
Def encodeCh(ch):
f=lambda x: chr((ord(ch)-x+OffSet) % 26 + x)
Return f(97) if ch.islower() else (f(65) if ch.isupper() else ch)
Return ‘‘.join(encodeCh(c) for c in s)
Def decode(strs):
Flag = ""#Save flag
Flag_x = ""#Get every character in the flag
Strs = strs[::-1]#reverse string
Strs = base64.b64decode(strs)#base64 decoding
For i in strs:# traverse every character
Flag_x = ord(i)-1#Each character ascii code-1
Flag_x = chr(flag_x)#convert bit string
Flag = flag+flag_x#string connection
Flag = flag[::-1]#reverse the string
Return flag# get flag
Def main():
Strs = "a1zLbgQsCESEIqRLwuQAyMwLyq2L5VwBxqGA3RQAyumZ0tmMvSGM2ZwB4tws"# password to be cracked
Flag = rot13(strs)#rot13decrypt
Flag = decode(flag)#title decryption
Print flag#output flag
If __name__ == "__main__":
Main()
Note: Where ROT13 is the code to find online
The results are as follows:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/9D/62/wKioL1l_JhyiCL4mAADHoJ4wUuU539.png-wh_500x0-wm_ 3-wmp_4-s_3269146024.png "title=" 2.png "alt=" Wkiol1l_jhyicl4maadhoj4wuuu539.png-wh_50 "/>
This article is from the "11846238" blog, please be sure to keep this source http://11856238.blog.51cto.com/11846238/1952480
17.NSCTF web200