encode url
This commit is contained in:
parent
fdf15e5a7d
commit
89a7613f9e
26
options.php
26
options.php
@ -214,7 +214,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
foreach (scandir('.') as $filename) {
|
foreach (scandir('.') as $filename) {
|
||||||
if (substr($filename, -4) === '.xsl') {
|
if (substr($filename, -4) === '.xsl') {
|
||||||
$name = substr($filename, 0, -4);
|
$name = substr($filename, 0, -4);
|
||||||
$URL = "$BASEDIR/$filename";
|
$URL = htmlentities("$BASEDIR/$filename", ENT_QUOTES);
|
||||||
if (isset($inputs["stylesheet"]) && $URL == $inputs["stylesheet"]) {
|
if (isset($inputs["stylesheet"]) && $URL == $inputs["stylesheet"]) {
|
||||||
echo " <option value='$URL' selected>$name</option>\n";
|
echo " <option value='$URL' selected>$name</option>\n";
|
||||||
} else {
|
} else {
|
||||||
@ -235,7 +235,7 @@ if (!file_exists($SCANSDIR)) mkdir($SCANSDIR);
|
|||||||
foreach (scandir($SCANSDIR) as $filename) {
|
foreach (scandir($SCANSDIR) as $filename) {
|
||||||
if (substr($filename, -4) === '.xml') {
|
if (substr($filename, -4) === '.xml') {
|
||||||
$name = substr($filename, 0, -4);
|
$name = substr($filename, 0, -4);
|
||||||
$URL = "$BASEDIR/$SCANSDIR/$filename";
|
$URL = htmlentities("$BASEDIR/$SCANSDIR/$filename", ENT_QUOTES);
|
||||||
if ($URL == $compareWith) {
|
if ($URL == $compareWith) {
|
||||||
echo " <option value='$URL' selected>$name</option>\n";
|
echo " <option value='$URL' selected>$name</option>\n";
|
||||||
} else {
|
} else {
|
||||||
@ -269,17 +269,17 @@ foreach (scandir($SCANSDIR) as $filename) {
|
|||||||
</datalist>
|
</datalist>
|
||||||
<datalist id='servicesList'>
|
<datalist id='servicesList'>
|
||||||
<?php
|
<?php
|
||||||
$nmap_services = file("$DATADIR/nmap-services");
|
$nmap_services = file("$DATADIR/nmap-services");
|
||||||
$services = [];
|
$services = [];
|
||||||
foreach ($nmap_services as $service) {
|
foreach ($nmap_services as $service) {
|
||||||
if (0 !== strpos($service, '#')) {
|
if (0 !== strpos($service, '#')) {
|
||||||
[$name, $port] = explode("\t", $service);
|
[$name, $port] = explode("\t", $service);
|
||||||
$services[$name] = explode("/", $port);
|
$services[$name] = explode("/", $port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($services as $name => [$portid, $protocol]) {
|
foreach ($services as $name => [$portid, $protocol]) {
|
||||||
echo " <option value='$name'></option>\n";
|
echo " <option value='$name'>$name</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</datalist>
|
</datalist>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user