Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import string
- cipher_text=b"""tm bcsv qolfp
- f'dmvd xuhm exl tgak
- hlrkiv sydg hxm
- qiswzzwf qrf oqdueqe
- dpae resd wndo
- liva bu vgtokx sjzk
- hmb rqch fqwbg
- fmmft seront sntsdr pmsecq""".replace(b'\'',b' ')
- plain_text = b''
- flag_first,flag_last = b'',b''
- alphabet = string.printable[10:-64].encode()
- shift = 1
- for ci in cipher_text.split(b'\n'):
- tmp = ci.split(b' ')
- line_plain_text = b''
- for word in tmp:
- line_plain_text+=bytes([ alphabet[(alphabet.index(c)+shift)%26] if c in alphabet else c for c in word])
- shift+=1
- line_plain_text+=b' '
- flag_first+=bytes([line_plain_text[0]])
- flag_last+=bytes([line_plain_text[-2]])
- plain_text+=line_plain_text+b'\n'
- print(plain_text.decode())
- print("[+]FLAG:",(flag_first+flag_last).decode())
- ## ujqcsddessxsffes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement