mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
arcdns: add sanity check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
c5e9768f05
commit
efec6b8454
@ -11,10 +11,10 @@ $pwd = (string)$argv[2];
|
||||
$hostname = (string)$argv[3];
|
||||
$ip = (string)$argv[4];
|
||||
|
||||
// check the hostname contains '.'
|
||||
if (strpos($hostname, '.') === true) {
|
||||
echo 'badparam';
|
||||
exit();
|
||||
// Remove .dyn.arcdns.tech if present
|
||||
$suffix = '.dyn.arcdns.tech';
|
||||
if (substr($hostname, -strlen($suffix)) === $suffix) {
|
||||
$hostname = substr($hostname, 0, -strlen($suffix));
|
||||
}
|
||||
|
||||
$url = 'https://arcdns.tech/update/' . $hostname . '/' . $pwd;
|
||||
|
Loading…
Reference in New Issue
Block a user