root password in a .py script

Bart Nessux bart_nessux at hotmail.com
Fri Mar 12 18:40:30 CET 2004


>This is not a good idea...

Yes, I know it isn't. It's not very graceful at all, but I must do it. 
Whether I use a baseball bat from a distance of 1 meter to strike a computer 
monitor or use a sniper rifle from 400 meters away to shoot the monitor, the 
result is the same. Currently, this is a kludge (the baseball bat 
approach)... I'm trying to make it more graceful.

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

The script must run automaticly/programmaticly on 200 machines.

>
>---
>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
> >

_________________________________________________________________
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/





More information about the Python-list mailing list