in reply to Problems with passwords

Run your script on a device and network that you control. There's really nothing else that you can do if you don't trust root. There is nothing to prevent root from running a packet filter to grab your password when it's sent (in the clear) across the wire by telnet.