0
0
mirror of https://codeberg.org/crimeflare/cloudflare-tor synced 2024-11-13 21:02:40 +00:00
cloudflare-tor/not_cloudflare/get_fqdn_tmg1.php

24 lines
448 B
PHP
Raw Normal View History

2019-03-12 17:22:47 +00:00
<?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');