mirror of
				https://codeberg.org/crimeflare/cloudflare-tor
				synced 2025-11-04 10:27:05 +01:00 
			
		
		
		
	Upload files to 'tool'
This commit is contained in:
		
							parent
							
								
									e940457f15
								
							
						
					
					
						commit
						841bf5c776
					
				
					 1 changed files with 23 additions and 0 deletions
				
			
		
							
								
								
									
										23
									
								
								tool/get_fqdn_tmg1.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								tool/get_fqdn_tmg1.php
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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');
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue