save only first scan

This commit is contained in:
2024-10-07 12:09:12 +02:00
parent 1d8457d020
commit 6dd728ce0d
5 changed files with 33 additions and 30 deletions

View File

@ -49,8 +49,8 @@ if (!file_exists($SCANS_DIR)) {
mkdir($SCANS_DIR);
}
foreach (scandir($SCANS_DIR) as $scan) {
if (substr($scan, -9) == '_init.xml') {
$targets = str_replace('!', '/', substr_replace($scan, '', -9));
if (substr($scan, -4) == '.xml') {
$targets = str_replace('!', '/', substr_replace($scan, '', -4));
echo "<li><a class='item' href='scan.php?targets=".urlencode($targets)."'>$targets</a></li>\n";
}
}