python 2.7.11
then i try to patch with
def leftrotate(l, n): return l[n:] + l[:n] def rightrotate(l, n): return l[-n:] + l[:-n] def encode(s, k, kk): l = [ord(i) for i in s] return leftrotate(''.join([chr(i + k) for i in l]), kk) def decode(s, k, kk): l = [ord(i) for i in rightrotate(s.replace("\\\\","\\"), kk)] return ''.join([chr(i - k) for i in l]) >>> "\\".replace("\\\\","\\") '\\' >>> encode("xxxxxxQ\|2",3,7) '_\x7f5{{{{{{T' >>> >>> decode("_\x7f5{{{{{{T",3,7) 'xxxxxxQ\\|2'decode error,
then i try to patch with
decode("_\x7f5{{{{{{T",3,7).replace("\\\\","\\")but can not change double to single
>>> "\\".replace("\\\\","\\") '\\'