in reply to perl script not working after moved to new host
You find the real error message in your web server error log. Look at that and remedy the cause.
Also, I really suggest you rewrite this script. It is horribly insecure and allows for arbitrary remote code execution:
$node = param("node"); ... $sysinfo = `sudo -u rsnagios ssh $node bin/sysinfo|sed s/-/_/`;
$node is not sanitized or checked against a list of valid hostnames. If you call your script with node="wget http://perlmonks.org" it will run the wget executable. As a first fix, you should only allow hostnames that match \w+ in $node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl script not working after moved to new host
by prabhakard (Novice) on Jan 25, 2016 at 10:36 UTC |