Skip to content
Snippets Groups Projects
Verified Commit 20589283 authored by David Beniamine's avatar David Beniamine
Browse files

XRDP improvements

parent 00b6b908
No related branches found
No related tags found
No related merge requests found
...@@ -19,5 +19,4 @@ ...@@ -19,5 +19,4 @@
IP=$(ip a | awk '/inet.*containers/ {print $2}' | cut -d / -f 1) IP=$(ip a | awk '/inet.*containers/ {print $2}' | cut -d / -f 1)
subnet=$(ip a | awk '/inet.*containers/ {print $2}' | cut -d / -f 1 | cut -d . -f 1-3) subnet=$(ip a | awk '/inet.*containers/ {print $2}' | cut -d / -f 1 | cut -d . -f 1-3)
echo "$1" | netcat $subnet.52 9999 echo "$1" | netcat $subnet.52 9999
retip=`netcat -l $IP 9999` netcat -l $IP 9999
echo "IP : $retip"
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
echo "<p>Adresse MAC invalide : ".$args."</p>"; echo "<p>Adresse MAC invalide : ".$args."</p>";
}else{ }else{
$cmd = "../scripts/sendmac.sh"; $cmd = "../scripts/sendmac.sh";
echo "<p> Démarrage de la machine ".$args." terminé</p>"; echo "<p> Démarrage de la machine ".$args." terminé !</p>";
echo "<p>Pour vous y connecter, téléchargez "; echo "<p>Pour vous y connecter, téléchargez ";
system("cp config.rdp.sample config.rdp;echo \"full address:s:\"". system("cp www/config.rdp.sample www/config.rdp");
$_SERVER["HTTP_HOST"]." >> config.rdp"); system("echo \"full address:s:\"".$_SERVER["HTTP_HOST"]." >> config.rdp");
echo '<a href="config.rdp'; echo '<a href="config.rdp';
echo '">ce fichier</a> et lancez le.<br />'; echo '">ce fichier</a> et lancez le.<br />';
echo "Cela ouvrira XRDP, il vous suffir alors d'indiquer l'adresse IP : ".shell_exec("$cmd $args"); echo "Cela ouvrira XRDP, il vous suffir alors d'indiquer l'adresse IP : ".shell_exec("$cmd $args");
echo "Et le mot de passe adequate"; echo "Et le mot de passe adéquate";
echo "</p>"; echo "</p>";
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment