script to run whitelist.sh

This commit is contained in:
Jacob Salmela
2016-01-03 15:36:31 -06:00
parent b1b43512e9
commit 48952c50ce
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -27,7 +27,7 @@
$(document).ready(function(){
var searchLi = $('#get_whitelist').val();
var commandArguments = "li00="+searchLi;
$.get("whitelist.php", commandArguments, function (data){
$.get("php/whitelist.php", commandArguments, function (data){
// Delimiter to split the last echo command from the script
dataSplitted = data.split(';');
$("#li01").html(dataSplitted[0]);
+6
View File
@@ -0,0 +1,6 @@
<?php
$arg = $_GET['li00'];
$shell_cmd = "/usr/local/bin/whitelist.sh ".$arg;
$to_show = exec($shell_cmd);
print_r($to_show);
?>