root password in a .py script

Mahrt, Dallas dallasm at aiinet.com
Fri Mar 12 12:22:53 EST 2004


This is not a good idea, even if it were possible. What is preventing
somebody from importing this script in Python from the CLI and extracting
the root password? Even if the decrypt logic is in the code, and only the
.pyc is accessible, the decompile logic would still be easily accessible.

What is preventing you from prompting for the password on execution?

---
Dallas S. Mahrt	


> -----Original Message-----
> From: Bart Nessux [mailto:bart_nessux at hotmail.com] 
> Sent: Friday, March 12, 2004 9:12 AM
> To: python-list at python.org
> Subject: root password in a .py script
> 
> 
> I have to place a root password into a Python script. Is 
> there a way to
> encode it so that one can't read the password when viewing 
> the file, but
> when the sting is used it's decoded? For example:
> 
> pass = "#$%^&@*#&*$^@"
> instead of:
> pass = "root-password"
> 
> Thanks,
> 
> Bart
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 




More information about the Python-list mailing list