mirror of
https://codeberg.org/crimeflare/cloudflare-tor
synced 2024-11-07 09:52:40 +00:00
Update 'tool/get_fqdn_tmg1.php'
This commit is contained in:
parent
48aecea022
commit
7d31fa9d0f
@ -5,14 +5,15 @@ define('F_INPUT','noncloudflarelist.txt');
|
|||||||
define('F_OUTPUT','fqdnlist.txt');
|
define('F_OUTPUT','fqdnlist.txt');
|
||||||
|
|
||||||
if (!file_exists(F_INPUT)){
|
if (!file_exists(F_INPUT)){
|
||||||
die('File not found');
|
print 'File not found';
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
foreach(explode("\n",file_get_contents(F_INPUT)) as $t){
|
foreach(explode("\n",file_get_contents(F_INPUT)) as $t){
|
||||||
$t = explode(' ',$t)[0];
|
$t = explode(' ',$t)[0];
|
||||||
if (preg_match("/^([a-z0-9-\.]{1,255})\.([a-z]{2,40})$/",$t)){
|
if (preg_match("/^([a-z0-9\.-]{1,255})\.([a-z]{2,40})$/",$t)){
|
||||||
$result[] = $t;
|
$result[] = $t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -20,4 +21,4 @@ foreach(explode("\n",file_get_contents(F_INPUT)) as $t){
|
|||||||
$result = array_unique($result);
|
$result = array_unique($result);
|
||||||
file_put_contents(F_OUTPUT,implode("\n",$result));
|
file_put_contents(F_OUTPUT,implode("\n",$result));
|
||||||
|
|
||||||
echo('Done');
|
print 'Done';
|
||||||
|
Loading…
Reference in New Issue
Block a user