created a nice (empty) function for the XOR

This commit is contained in:
2026-04-09 14:29:07 +02:00
parent 2e5d9cb5fd
commit 0738dec435
2 changed files with 9 additions and 0 deletions
+9
View File
@@ -1,5 +1,11 @@
<?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>';
@@ -11,6 +17,9 @@ 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>';