summaryrefslogtreecommitdiffstats
path: root/not_cloudflare/get_fqdn_tmg1.php
diff options
context:
space:
mode:
authorJeff Cliff <jeffrey.cliff@gmail.com>2019-05-05 15:23:01 -0400
committerJeff Cliff <jeffrey.cliff@gmail.com>2019-05-05 15:23:01 -0400
commit0f3c764bd7d50d8d0c911a78f1cb8e07499ea165 (patch)
tree195079f3c327bb183a547ec3b9cc4494da6d3f53 /not_cloudflare/get_fqdn_tmg1.php
parentbb0503944be2bb3c6adea9cdedf725fb9e9e14b8 (diff)
parent2f7816e6b470ef50628d4289fdcfdbdb3d4834fc (diff)
downloadcloudflare-tor-0f3c764bd7d50d8d0c911a78f1cb8e07499ea165.tar
cloudflare-tor-0f3c764bd7d50d8d0c911a78f1cb8e07499ea165.tar.gz
cloudflare-tor-0f3c764bd7d50d8d0c911a78f1cb8e07499ea165.tar.lz
cloudflare-tor-0f3c764bd7d50d8d0c911a78f1cb8e07499ea165.tar.xz
cloudflare-tor-0f3c764bd7d50d8d0c911a78f1cb8e07499ea165.zip
Merge https://notabug.org/sidetracked/cloudflare-tor
Diffstat (limited to 'not_cloudflare/get_fqdn_tmg1.php')
-rw-r--r--not_cloudflare/get_fqdn_tmg1.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/not_cloudflare/get_fqdn_tmg1.php b/not_cloudflare/get_fqdn_tmg1.php
new file mode 100644
index 00000000..04e65b57
--- /dev/null
+++ b/not_cloudflare/get_fqdn_tmg1.php
@@ -0,0 +1,23 @@
+<?php
+//License: WTFPL
+
+define('F_INPUT','noncloudflarelist.txt');
+define('F_OUTPUT','fqdnlist.txt');
+
+if (!file_exists(F_INPUT)){
+ die('File not found');
+}
+
+$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)){
+ $result[] = $t;
+ }
+}
+
+$result = array_unique($result);
+file_put_contents(F_OUTPUT,implode("\n",$result));
+
+echo('Done');