来来来,凯撒位移

看了一个萌新级别的WriteUp,凯撒位移,总觉得写的有点啰嗦,来个相对来讲不是太啰嗦的:

# -*- coding:utf-8 -*-

# flag = gmbh, f -> g, l -> m, a -> b, g -> h
cipher_txt = 'gmbh{4d850d5c3c2756f67b91cbe8f046eebd}'
plain_txt = ''

for c in cipher_txt:
    if c.isalpha():
	    c = chr(ord(c) - 1)
    plain_txt += c

print 'plain_txt:', plain_txt
Written on May 28, 2018