Convert to binary and convert back to strings

Paul Rubin http
Thu Feb 22 03:52:03 EST 2007


Grant Edwards <grante at visi.com> writes:
> > print base64.decodestring(open('sambleb.conf', 'r').read())
> It'll only remain obfuscated for about 30 seconds after even a
> mildly curious user looks at the file.

You could use the mult127 function, self-inverting like its better
known but more easily recognized rot13 relative:

def mult127(text):
    return ''.join(map(chr, ((127*ord(c)) % 256 for c in text)))



More information about the Python-list mailing list