fix scan args
This commit is contained in:
parent
01f8ee3ea0
commit
f413212db9
@ -15,7 +15,7 @@ $protocolePortsListRegex = "/^(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-
|
||||
$portsListRegex = "/^([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*$/";
|
||||
$tempoRegex = "/^\d+[smh]?$/";
|
||||
|
||||
$options = filter_input_array(INPUT_GET, [
|
||||
$inputs = filter_input_array(INPUT_GET, [
|
||||
'iR' => ['filter' => FILTER_VALIDATE_INT],
|
||||
'-exclude' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $hostsListRegex]],
|
||||
|
||||
|
34
index.php
34
index.php
@ -5,10 +5,10 @@ include_once 'filter_inputs.php';
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>lanScan</title>
|
||||
<link rel="icon" href="favicon.ico"/>
|
||||
<link rel="icon" href="favicon.ico" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css" />
|
||||
@ -16,9 +16,9 @@ include_once 'filter_inputs.php';
|
||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css" />
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<nav class="ui inverted teal fixed menu">
|
||||
<a class="header item" href=".">
|
||||
lan<?php include 'logo.svg'; ?>can
|
||||
@ -27,17 +27,17 @@ include_once 'filter_inputs.php';
|
||||
<form class="ui category search item" onsubmit="targetsInputDiv.classList.add('loading')">
|
||||
<div id="targetsInputDiv" class="ui icon input">
|
||||
<input class="prompt" type="text" id="targetsInput" name="targets" required="" oninput="hiddenInput.value=this.value"
|
||||
pattern="[a-zA-Z0-9._\/ \-]+" value="<?=$targets; ?>" placeholder="Scanner un réseau..."
|
||||
pattern="[a-zA-Z0-9._\/ \-]+" value="<?= $targets; ?>" placeholder="Scanner un réseau..."
|
||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
||||
Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24 <?=$_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254"/>
|
||||
Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254" />
|
||||
<i class="satellite dish icon"></i>
|
||||
<button style="display:none" type="submit" formaction="scan.php" formmethod="get"></button>
|
||||
</div>
|
||||
</form>
|
||||
<form class="item" method="get" action="scan-options.php">
|
||||
<input id="hiddenInput" type="hidden" name="targets" value="<?=$targets; ?>"/>
|
||||
<input id="hiddenInput" type="hidden" name="name" value="<?=$name; ?>"/>
|
||||
<?='<input type="hidden" name="'.str_replace('=', '" value="', http_build_query($options, '', '/><input type="hidden" name="')).'"/>'; ?>
|
||||
<input id="hiddenInput" type="hidden" name="targets" value="<?= $targets; ?>" />
|
||||
<input id="hiddenInput" type="hidden" name="name" value="<?= $name; ?>" />
|
||||
<?= '<input type="hidden" name="' . str_replace('=', '" value="', http_build_query($inputs, '', '/><input type="hidden" name="')) . '"/>'; ?>
|
||||
<button class="ui teal submit button" type="submit">Options</button>
|
||||
</form>
|
||||
</div>
|
||||
@ -48,21 +48,21 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24 <?=$_SERVER['SERVER_NAME']; ?> 10.0-
|
||||
<div class="content">
|
||||
<div class="header">Précédents scans</div>
|
||||
<div class="ui divided link list">
|
||||
<?php
|
||||
if (!file_exists($SCANS_DIR)) {
|
||||
<?php
|
||||
if (!file_exists($SCANS_DIR)) {
|
||||
mkdir($SCANS_DIR);
|
||||
}
|
||||
foreach (scandir($SCANS_DIR) as $scan) {
|
||||
}
|
||||
foreach (scandir($SCANS_DIR) as $scan) {
|
||||
if (substr($scan, -4) == '.xml') {
|
||||
$targets = str_replace('!', '/', substr_replace($scan, '', -4));
|
||||
echo "<a class='item' href='scan.php?targets=".urlencode($targets)."'>$targets</a>\n";
|
||||
echo "<a class='item' href='scan.php?targets=" . urlencode($targets) . "'>$targets</a>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
127
scan-options.php
127
scan-options.php
@ -5,7 +5,7 @@ include_once 'filter_inputs.php';
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>lanScan</title>
|
||||
<link rel="icon" href="favicon.ico" />
|
||||
@ -17,9 +17,9 @@ include_once 'filter_inputs.php';
|
||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css" />
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<nav class="ui inverted teal fixed menu">
|
||||
<a class="header item" href=".">
|
||||
lan<?php include 'logo.svg'; ?>can
|
||||
@ -42,7 +42,7 @@ include_once 'filter_inputs.php';
|
||||
<input id="targetsInput" type="text" name="targets" placeholder="Cibles" required
|
||||
pattern="[a-zA-Z0-9._\/ \-]+" value="<?= $targets; ?>" list="targetsList"
|
||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
||||
Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24 <?=$_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254" />
|
||||
Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254" />
|
||||
</div>
|
||||
|
||||
<div class="ui styled fluid accordion field">
|
||||
@ -51,9 +51,9 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24 <?=$_SERVER['SERVER_NAME']; ?> 10.0-
|
||||
<div class="field">
|
||||
<label for="excludeInput">Exclure les hôtes ou réseaux</label>
|
||||
<input type="text" id="excludeInput" name="-exclude" placeholder="Hôte/réseau" list="targetsList"
|
||||
pattern="[a-zA-Z0-9._\/,\-]*" value="<?=$options['-exclude']?? "" ?>"
|
||||
pattern="[a-zA-Z0-9._\/,\-]*" value="<?= $inputs['-exclude'] ?? "" ?>"
|
||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
||||
Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-255.0-255.1-254">
|
||||
Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24,<?= $_SERVER['SERVER_NAME']; ?>,10.0-255.0-255.1-254">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -61,14 +61,14 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="sPCheckbox" name="sP" <?=$options['sP']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="sPCheckbox" name="sP" <?= $inputs['sP'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="sPCheckbox">N'effectuer que l'étape de découverte des hôtes actifs</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="PnCheckbox" name="Pn" <?=$options['Pn']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="PnCheckbox" name="Pn" <?= $inputs['Pn'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="PnCheckbox">Considérer tous les hôtes comme actifs (saute la découverte des hôtes)</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -77,19 +77,19 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
<div class="field">
|
||||
<label for="PSInput">Ping TCP SYN</label>
|
||||
<input type="text" id="PSInput" name="PS" placeholder="Ports" list="servicesList"
|
||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?=$options['PS']?? "" ?>"
|
||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $inputs['PS'] ?? "" ?>"
|
||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="PAInput">Ping TCP ACK</label>
|
||||
<input type="text" id="PAInput" name="PA" placeholder="Ports" list="servicesList"
|
||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?=$options['PA']?? "" ?>"
|
||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $inputs['PA'] ?? "" ?>"
|
||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="PUInput">Ping UDP</label>
|
||||
<input type="text" id="PUInput" name="PU" placeholder="Ports" list="servicesList"
|
||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?=$options['PU']?? "" ?>"
|
||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $inputs['PU'] ?? "" ?>"
|
||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||
</div>
|
||||
</div>
|
||||
@ -99,19 +99,19 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
<div class="inline fields">
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="PECheckbox" name="PE" <?=$options['PE']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="PECheckbox" name="PE" <?= $inputs['PE'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="PECheckbox">Echo request</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="PPCheckbox" name="PP" <?=$options['PP']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="PPCheckbox" name="PP" <?= $inputs['PP'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="PPCheckbox">Timestamp request</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="PMCheckbox" name="PM" <?=$options['PM']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="PMCheckbox" name="PM" <?= $inputs['PM'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="PMCheckbox">Mask request</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -120,7 +120,7 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="PRCheckbox" name="PR" <?=$options['PR']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="PRCheckbox" name="PR" <?= $inputs['PR'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="PRCheckbox">Ping ARP</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -128,7 +128,7 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
<div class="field">
|
||||
<label for="P0Input">Ping IP Protocol</label>
|
||||
<input type="text" id="P0Input" name="P0" placeholder="Ports"
|
||||
pattern="[0-9\-]+" value="<?=$options['P0']?? "" ?>"
|
||||
pattern="[0-9\-]+" value="<?= $inputs['P0'] ?? "" ?>"
|
||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||
</div>
|
||||
</div>
|
||||
@ -137,7 +137,7 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
<div class="content">
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="FCheckbox" name="F" <?=$options['F']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="FCheckbox" name="F" <?= $inputs['F'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="FCheckbox">Scanner que les ports connus</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -145,13 +145,13 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
<div class="field">
|
||||
<label for="pInput">Scanner que les ports</label>
|
||||
<input type="text" id="pInput" name="p" placeholder="Ports" list="servicesList"
|
||||
pattern="(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*" value="<?=$options['p']?? "" ?>"
|
||||
pattern="(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*" value="<?= $inputs['p'] ?? "" ?>"
|
||||
title="Liste de ports ex: ssh,ftp,U:53,111,137,T:21-25,80,139,8080">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" id="rCheckbox" name="r" <?=$options['r']?? false? 'checked' : ''; ?>/>
|
||||
<input type="checkbox" id="rCheckbox" name="r" <?= $inputs['r'] ?? false ? 'checked' : ''; ?> />
|
||||
<label for="rCheckbox">Ne pas mélanger les ports</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -163,87 +163,88 @@ Exemples: <?=$_SERVER['REMOTE_ADDR']; ?>/24,<?=$_SERVER['SERVER_NAME']; ?>,10.0-
|
||||
</form>
|
||||
|
||||
<datalist id='targetsList'>
|
||||
<option value="<?=$_SERVER['REMOTE_ADDR']; ?>"></option>
|
||||
<option value="<?= $_SERVER['REMOTE_ADDR']; ?>"></option>
|
||||
<option value="192.168.1.0/24"></option>
|
||||
<option value="<?=$_SERVER['SERVER_NAME']; ?>"></option>
|
||||
<?php
|
||||
if (!file_exists($SCANS_DIR)) {
|
||||
<option value="<?= $_SERVER['SERVER_NAME']; ?>"></option>
|
||||
<?php
|
||||
if (!file_exists($SCANS_DIR)) {
|
||||
mkdir($SCANS_DIR);
|
||||
}
|
||||
foreach (scandir($SCANS_DIR) as $scan) {
|
||||
}
|
||||
foreach (scandir($SCANS_DIR) as $scan) {
|
||||
if ('.xml' == substr($scan, -4)) {
|
||||
$targets = str_replace('!', '/', substr_replace($scan, '', -4));
|
||||
echo " <option value='$targets'></option>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</datalist>
|
||||
<datalist id='servicesList'>
|
||||
<?php
|
||||
$nmap_services = file("$NMAP_DATADIR/nmap-services");
|
||||
$services = [];
|
||||
foreach ($nmap_services as $service) {
|
||||
<?php
|
||||
$nmap_services = file("$NMAP_DATADIR/nmap-services");
|
||||
$services = [];
|
||||
foreach ($nmap_services as $service) {
|
||||
if (0 !== strpos($service, '#')) {
|
||||
[$name, $port] = explode("\t", $service);
|
||||
$services[$name] = explode("/", $port);
|
||||
}
|
||||
}
|
||||
foreach ($services as $name => [$portid, $protocol]) {
|
||||
}
|
||||
foreach ($services as $name => [$portid, $protocol]) {
|
||||
echo " <option value='$name'></option>\n";
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</datalist>
|
||||
</main>
|
||||
<script>
|
||||
const targetsWhitelist = Array.from(targetsList.options).map(option => option.value)
|
||||
const servicesWhitelist = Array.from(servicesList.options).map(option => option.value)
|
||||
const joinWithSpaces = tags => tags.map(tag => tag.value).join(' ')
|
||||
const joinWithCommas = tags => tags.map(tag => tag.value).join(',')
|
||||
class TagsInput extends Tagify {
|
||||
constructor(input, options) {
|
||||
super(input, options)
|
||||
if (!this.whitelist.length && input.list) this.whitelist = Array.from(input.list.options).map(option => option.value)
|
||||
console.log(this.whitelist, input.list)
|
||||
}
|
||||
}
|
||||
|
||||
$('.ui.accordion').accordion()
|
||||
|
||||
new Tagify(targetsInput, {
|
||||
const joinWithSpaces = tags => tags.map(tag => tag.value).join(' ')
|
||||
const joinWithCommas = tags => tags.map(tag => tag.value).join(',')
|
||||
|
||||
$('.ui.accordion').accordion()
|
||||
|
||||
new TagsInput(targetsInput, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithSpaces,
|
||||
whitelist: targetsWhitelist,
|
||||
})
|
||||
})
|
||||
|
||||
new Tagify(excludeInput, {
|
||||
new TagsInput(excludeInput, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithCommas,
|
||||
whitelist: targetsWhitelist,
|
||||
})
|
||||
})
|
||||
|
||||
new Tagify(PSInput, {
|
||||
new TagsInput(PSInput, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithCommas,
|
||||
whitelist: servicesWhitelist,
|
||||
})
|
||||
})
|
||||
|
||||
new Tagify(PAInput, {
|
||||
new TagsInput(PAInput, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithCommas,
|
||||
whitelist: servicesWhitelist,
|
||||
})
|
||||
})
|
||||
|
||||
new Tagify(PUInput, {
|
||||
new TagsInput(PUInput, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithCommas,
|
||||
whitelist: servicesWhitelist,
|
||||
})
|
||||
})
|
||||
|
||||
new Tagify(P0Input, {
|
||||
new TagsInput(P0Input, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithCommas
|
||||
})
|
||||
})
|
||||
|
||||
new Tagify(pInput, {
|
||||
new TagsInput(pInput, {
|
||||
delimiters: " |,",
|
||||
originalInputValueFormat: joinWithCommas,
|
||||
whitelist: servicesWhitelist,
|
||||
})
|
||||
})
|
||||
|
||||
newScanForm.onsubmit = function (event) {
|
||||
newScanForm.onsubmit = function(event) {
|
||||
if (this.checkValidity()) {
|
||||
newScanForm.classList.add("loading")
|
||||
return true
|
||||
@ -251,8 +252,8 @@ newScanForm.onsubmit = function (event) {
|
||||
event.preventDefault()
|
||||
this.reportValidity()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
13
scan.php
13
scan.php
@ -12,18 +12,19 @@ if (!file_exists($SCANS_DIR)) {
|
||||
mkdir($SCANS_DIR);
|
||||
}
|
||||
|
||||
$basedir = "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}".dirname($_SERVER['REQUEST_URI']);
|
||||
$basedir = "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}" . dirname($_SERVER['REQUEST_URI']);
|
||||
|
||||
$args = '';
|
||||
foreach ($options as $arg => $value) {
|
||||
foreach ($inputs as $name => $value) {
|
||||
echo "$name : $value $args<br>";
|
||||
if (is_null($value)) {
|
||||
http_response_code(400);
|
||||
exit("Valeur incorecte pour le paramètre $option : ".filter_input(INPUT_GET, $option, FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
exit("Valeur incorecte pour le paramètre $option : " . filter_input(INPUT_GET, $option, FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
} else if ($value) {
|
||||
if ($value === true) {
|
||||
$args .= " -$arg";
|
||||
$args .= " -$name";
|
||||
} else {
|
||||
$arg .= " -$arg ".escapeshellarg($value);
|
||||
$args .= " -$name " . ($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -42,7 +43,7 @@ if (!file_exists($SCANS_DIR)) {
|
||||
mkdir($SCANS_DIR);
|
||||
}
|
||||
|
||||
$path = "$SCANS_DIR/".str_replace('/', '!', $targets).'.xml';
|
||||
$path = "$SCANS_DIR/" . str_replace('/', '!', $targets) . '.xml';
|
||||
if (!file_exists($path)) {
|
||||
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='compareWith' value=''"), $xml->documentElement);
|
||||
$xml->save($path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user