eurysco

eurysco is a free and open source project based on PHP language, in order to enhance and simplify the remote administration of Microsoft operating systems with an intuitive, fast and responsive web interface

view my linkedin profileview my linkedin profile :)

Privacy Policy
     

Total sweet donations $23
Help me to support eurysco (^_^) !

Source exec





0001 <?php
0002 
0003 include(str_replace('\\server', '', $_SERVER['DOCUMENT_ROOT']) . '\\include\\init_server.php');
0004 
0005 set_time_limit(60);
0006 
0007 $nodespath = $euryscoinstallpath . '\\nodes';
0008 
0009 if (isset($_POST['computername'])) {
0010 	$computername = $_POST['computername'];
0011 } else {
0012 	exit;
0013 }
0014 
0015 if (isset($_POST['clearcommands'])) {
0016 	$clearcommands = $_POST['clearcommands'];
0017 } else {
0018 	exit;
0019 }
0020 
0021 @unlink($nodespath . '\\' . $computername . '\\exec.on');
0022 
0023 echo '<exec>' . "\n";
0024 
0025 $execcount = 0;
0026 $execlist = scandir($nodespath . '\\' . $computername . '\\');
0027 foreach($execlist as $exec) {
0028 	if(pathinfo($exec)['extension'] == 'exec') {
0029 		if (filesize($nodespath . '\\' . $computername . '\\' . $exec) > 0 && $clearcommands == 'off') {
0030 			$execxml = simplexml_load_file($nodespath . '\\' . $computername . '\\' . $exec);
0031 			echo '<exe' . $execcount . '>' . "\n";
0032 			echo '<auditok>' . $execxml->auditok . '</auditok>' . "\n";
0033 			echo '<auditko>' . $execxml->auditko . '</auditko>' . "\n";
0034 			echo '<auditnl>' . $execxml->auditnl . '</auditnl>' . "\n";
0035 			echo '<cid>' . $execxml->cid . '</cid>' . "\n";
0036 			echo '<timeout>' . $execxml->timeout . '</timeout>' . "\n";
0037 			echo '<command>' . $execxml->command . '</command>' . "\n";
0038 			echo '</exe' . $execcount . '>' . "\n";
0039 			$execcount = $execcount + 1;
0040 		}
0041 		@unlink($nodespath . '\\' . $computername . '\\' . $exec);
0042 	}
0043 }
0044 
0045 echo '</exec>';
0046 
0047 
0048 
0049 foreach (get_defined_vars() as $key=>$val) {
0050 	if ($key != '_GET' && $key != '_POST' && $key != '_COOKIE' && $key != '_FILES' && $key != '_SERVER' && $key != '_SESSION' && $key != '_ENV') {
0051 		$$key = null;
0052 		unset($$key);
0053 	}
0054 }
0055 
0056 if (extension_loaded('zlib')) { ob_end_flush(); }
0057 
0058 ?>