root password in a .py script

Gerrit gerrit at nl.linux.org
Sun Mar 14 15:34:17 CET 2004


Wayne Folta wrote:
> import string
> 
> unshifted = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
> shifted   = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
> rot13_table = string.maketrans(unshifted, shifted)
> 
> user = string.translate ('sjkeiulkje', rot13_table)
> passwd = string.translate ('eorpoipoe', rot13_table)

This is actually totally equal to:

'eorpoipoe'.encode('rot13')

Gerrit.

-- 
Weather in Amsterdam Airport Schiphol, Netherlands 14/03 13:55 UTC:
	12.0°C Few clouds mostly cloudy wind 10.3 m/s SSW (-2 m above NAP)
-- 
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/




More information about the Python-list mailing list