mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Some validation on POST data
This commit is contained in:
@@ -770,4 +770,39 @@ function DisplaySystem(){
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
function SaveTORAndVPNConfig(){
|
||||
if( isset($_POST['SaveOpenVPNSettings']) ) {
|
||||
// TODO
|
||||
} elseif( isset($_POST['SaveTORProxySettings']) ) {
|
||||
// TODO
|
||||
} elseif( isset($_POST['StartOpenVPN']) ) {
|
||||
echo "Attempting to start openvpn";
|
||||
exec( 'sudo /etc/init.d/openvpn start', $return );
|
||||
foreach( $return as $line ) {
|
||||
echo $line."<br />";
|
||||
}
|
||||
} elseif( isset($_POST['StopOpenVPN']) ) {
|
||||
echo "Attempting to stop openvpn";
|
||||
exec( 'sudo /etc/init.d/openvpn stop', $return );
|
||||
foreach( $return as $line ) {
|
||||
echo $line."<br />";
|
||||
}
|
||||
} elseif( isset($_POST['StartTOR']) ) {
|
||||
echo "Attempting to start TOR";
|
||||
exec( 'sudo /etc/init.d/tor start', $return );
|
||||
foreach( $return as $line ) {
|
||||
echo $line."<br />";
|
||||
}
|
||||
} elseif( isset($_POST['StopTOR']) ) {
|
||||
echo "Attempting to stop TOR";
|
||||
exec( 'sudo /etc/init.d/tor stop', $return );
|
||||
foreach( $return as $line ) {
|
||||
echo $line."<br />";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user