Hide output from perl script system command
Jason Clinton
me at jasonclinton.com
Wed Nov 12 16:31:02 CST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
brad wrote:
| I am adding a system command to be run inside of an existing perl script
| that is triggered from a web form. Now that I have added the system
| command (an expect script) the entire send/expect output is displayed on
| the web page. I cannot have the output go to the web browser so I need
| a way around this. I no next to zero about perl. Is there an easy way
| to do this? Are there security issues having an expect script that logs
| into another server and runs a set of commands on that server be
| triggered from a web form?
I'm no Perl genius but you're probably getting the output because it's
being output to STDOUT. When you exec the command, just have it pipe to
STDERR or /dev/null or read it back in to your program as a string and
REGEX it for usefulness.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/slImtSqjk42zvwkRAvaAAJ9u43QwRyCP0XFA+78fHVTqdLpDUACgxO/W
jVrvzGTNlMqSBeCZp7xhk5U=
=K1dm
-----END PGP SIGNATURE-----
More information about the Kclug
mailing list