*/ include 'common.php'; $allowed_exec[1]="/usr/sbin/arp -a"; $allowed_exec[2]="/usr/bin/netstat -nr"; $allowed_exec[3]="/usr/bin/w"; $allowed_exec[4]="/bin/df"; $allowed_exec[5]="/usr/bin/top -b"; $allowed_exec[6]="/sbin/sysctl vm.vmtotal"; $allowed_exec[7]="/usr/bin/sockstat -4"; $allowed_exec[8]="/sbin/ifconfig"; html_header("exec command"); print "\n"; parse_str($_SERVER['QUERY_STRING'], $output); if ( (int)($output['exec']) > 0 && (int)$output['exec'] <= sizeof($allowed_exec) ) { if ( (int)($output['verbose']) > 0 ) { execute($output['exec'], 1); } else { execute($output['exec'], 0); } } else { print "Allowed files:\n"; print "
";
	for ($i = 1; $i <= sizeof($allowed_exec); $i++ ) {
		print "$i: $allowed_exec[$i]\n";
	}
	print "
"; } print "\n"; html_end(); ?>