Files
2026-04-09 17:18:03 +02:00

33 lines
891 B
PHP

<?php
function xor_strings($str1, $str2, $str3) {
$result = shell_exec("python theXORitself.py -c1 $str1 -c2 $str2 -c3 $str3");
return $result;
}
echo "<html><body>";
echo '<form action="xor23.php" method="get">';
echo 'component #1: <input type="text" name="comp1" size="64" maxlenght="64"><br>';
echo 'component #2: <input type="text" name="comp2" size="64" maxlenght="64"><br>';
echo 'component #3: <input type="text" name="comp3" size="64" maxlenght="64"><br>';
echo '<input type="submit">';
echo"</form>";
echo'<div class="messagebox">';
if ($_GET) {
echo "Danny is een hele lieve man";
$xored = xor_strings($_GET['comp1'], $_GET['comp2'], $_GET['comp3']);
echo "<br><br>De XOR van de 3 componenten is: <br><b>$xored</b>";
}
echo '</div>';
echo "</body></html>";
//$output = "Danny is een hele lieve man"; 9546156603-0
//$output = shell_exec("python hello.py");
?>