summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharacters <characters@noreply.codeberg.org>2019-08-30 02:26:51 +0200
committercharacters <characters@noreply.codeberg.org>2019-08-30 02:26:51 +0200
commit7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5 (patch)
tree168338a1eaf8bb8864cee844c7a6d8e03b44b3b0
parent48aecea022901b8237217b9e4879839c4e818f04 (diff)
downloadcloudflare-tor-7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5.tar
cloudflare-tor-7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5.tar.gz
cloudflare-tor-7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5.tar.lz
cloudflare-tor-7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5.tar.xz
cloudflare-tor-7d31fa9d0f5d27256ad7e749c4c6acd86099f6a5.zip
Update 'tool/get_fqdn_tmg1.php'
-rw-r--r--tool/get_fqdn_tmg1.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tool/get_fqdn_tmg1.php b/tool/get_fqdn_tmg1.php
index 04e65b57..ad897ff5 100644
--- a/tool/get_fqdn_tmg1.php
+++ b/tool/get_fqdn_tmg1.php
@@ -5,14 +5,15 @@ define('F_INPUT','noncloudflarelist.txt');
define('F_OUTPUT','fqdnlist.txt');
if (!file_exists(F_INPUT)){
- die('File not found');
+ print 'File not found';
+ exit;
}
$result = array();
foreach(explode("\n",file_get_contents(F_INPUT)) as $t){
$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;
}
}
@@ -20,4 +21,4 @@ foreach(explode("\n",file_get_contents(F_INPUT)) as $t){
$result = array_unique($result);
file_put_contents(F_OUTPUT,implode("\n",$result));
-echo('Done');
+print 'Done';