Drop v2 hidden service support

This commit is contained in:
Daniel Winzen
2021-06-14 19:25:05 +02:00
parent 2d4b2beb9b
commit 7e89f90d08
8 changed files with 13 additions and 14 deletions

View File

@ -20,7 +20,7 @@ $stmt=$db->prepare('UPDATE phishing, onions SET phishing.original=?, onions.time
foreach($onions as $onion){
curl_setopt($ch, CURLOPT_URL, "http://$onion[address].onion/");
if(($site=curl_exec($ch))!==false){
preg_match('~(https?://)?([a-z0-9]*\.)?([a-z2-7]{16}|[a-z2-7]{56}).onion(/[^\s><"]*)?~i', $site, $addr);
preg_match('~(https?://)?([a-z0-9]*\.)?([a-z2-7]{55}d).onion(/[^\s><"]*)?~i', $site, $addr);
if($addr[3]!='' && $addr[3]!==$onion['address']){
echo "scam: $onion[address] - original: $addr[3]\n";
$stmt->execute([$addr[3], time(), $onion['address']]);

View File

@ -20,7 +20,7 @@ for($i = 1; $i < 213; ++$i){
$header = substr($response, 0, $header_size);
$body = substr($response, $header_size);
curl_close($ch);
if(preg_match('~(https?://)?([a-z0-9]*\.)?([a-z2-7]{16}|[a-z2-7]{56}).onion(/[^\s><"]*)?~i', $header, $addr)){
if(preg_match('~(https?://)?([a-z0-9]*\.)?([a-z2-7]{55}d).onion(/[^\s><"]*)?~i', $header, $addr)){
$time = time();
$onion_addr = strtolower($addr[3]);
$md5 = md5($onion_addr, true);