Keep track of change date closed #9

This commit is contained in:
Daniel Winzen
2020-11-08 18:56:01 +01:00
parent b543320e1f
commit 2feb70c0e6
16 changed files with 290 additions and 280 deletions

View File

@ -1,20 +1,20 @@
<?php
require_once(__DIR__.'/../common_config.php');
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]);
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>true]);
}catch(PDOException $e){
die('No Connection to MySQL database!');
die('No Connection to MySQL database!');
}
$stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phishing.onion_id=onions.id) WHERE onions.address!='' AND isnull(phishing.onion_id) AND onions.id>22439;");
$move=$db->prepare("UPDATE onions SET category=18, locked=1, description='Add injecting phishing clone of an existing site - SCAM' WHERE address=?;");
$move=$db->prepare("UPDATE onions SET category=18, locked=1, description='Add injecting phishing clone of an existing site - SCAM', timechanged=? WHERE address=?;");
$ch=curl_init();
set_curl_options($ch);
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
while($onion=$stmt->fetch(PDO::FETCH_ASSOC)){
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$onion[address].onion"));
$response=curl_exec($ch);
if($response==='<!-- <meta http-equiv="refresh"content="0; url=http://o2nlo5zjoxp25kfv.onion"> -->
'){
$move->execute($tmp);
$move->execute([time(), $onion['address']]);
echo " - SCAM - moved";
}
}