2020-11-15 15:12:32 +00:00
|
|
|
<?php
|
|
|
|
//Définition de la constante anti-hacking
|
|
|
|
define("INDEX", 1);
|
|
|
|
define("DEBUG", true);
|
|
|
|
|
|
|
|
//Inclusion de l'API Onyx
|
|
|
|
require_once(trim(file_get_contents('../.onyx')));
|
|
|
|
require_once("common.php"); //Chargement de tout le nécessaire pour le jeu
|
|
|
|
|
|
|
|
function traiterfichier($uri, &$list)
|
|
|
|
{
|
2020-11-21 18:54:32 +00:00
|
|
|
$fp = fopen($uri, "r");
|
|
|
|
while (!feof($fp)) {
|
|
|
|
$buffer = fgets($fp);
|
|
|
|
if (preg_match("#^([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})#", $buffer, $match)) {
|
|
|
|
var_dump($match);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose($fp);
|
2020-11-15 15:12:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$list = array();
|
|
|
|
traiterfichier("http://www.proxylists.net/socks4.txt", $list);
|
|
|
|
traiterfichier("http://www.proxylists.net/socks5.txt", $list);
|
|
|
|
traiterfichier("http://www.proxylists.net/http_highanon.txt", $list);
|
|
|
|
traiterfichier("http://www.proxylists.net/http.txt", $list);
|
|
|
|
|
|
|
|
$bdd = new BDD();
|
|
|
|
$bdd->query("TRUNCATE TABLE `proxy_list`;");
|
|
|
|
$bdd->query("INSERT INTO proxy_list VALUES ('".implode("'),('", $list)."');");
|
|
|
|
$bdd->deconnexion();
|
|
|
|
|
|
|
|
print "Procédure terminée, ".count($list)." proxys listés.";
|