Add function to set common curl options
This commit is contained in:
@ -150,3 +150,13 @@ function is_definitely_ssl() : bool {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function set_curl_options(CurlHandle $ch){
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
}
|
||||
|
@ -8,11 +8,7 @@ try{
|
||||
die($I['nodb']);
|
||||
}
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 25);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 40);
|
||||
set_curl_options($ch);
|
||||
|
||||
//check('http://tt3j2x4k5ycaa5zt.onion/onions.php?cat=15&pg=0', 'http://tt3j277rncfaqmj7.onion/onions.php?cat=15&pg=0');
|
||||
//check('http://skunksworkedp2cg.onion/sites.html', 'http://skunkrdunsylcfqd.onion/sites.html');
|
||||
|
@ -16,13 +16,7 @@ $curl_handles = [];
|
||||
//do tests
|
||||
foreach($onions as $onion){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($ch, CURLOPT_MAXREDIRS, 2);
|
||||
@ -81,11 +75,7 @@ foreach($curl_handles as $handle){
|
||||
}
|
||||
if(preg_match('~window\.location\.replace\("http://'.$onion['address'].'.onion/(.*?)"\)~', $content, $matches)){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($ch, CURLOPT_MAXREDIRS, 2);
|
||||
@ -96,11 +86,7 @@ foreach($curl_handles as $handle){
|
||||
}
|
||||
if(preg_match('~^refresh:.*url=(https?://[^;\s]+).*?$~m', $header, $matches)){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($ch, CURLOPT_MAXREDIRS, 2);
|
||||
@ -119,11 +105,7 @@ foreach($curl_handles as $handle){
|
||||
}
|
||||
}
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($ch, CURLOPT_MAXREDIRS, 2);
|
||||
|
@ -7,12 +7,7 @@ try{
|
||||
die($I['nodb']);
|
||||
}
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 25);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_ENCODING, '');
|
||||
$onions=[];
|
||||
$scanned_onions=[];
|
||||
|
@ -6,13 +6,7 @@ try{
|
||||
die('No Connection to MySQL database!');
|
||||
}
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
$online=$offline=$desc_online=$error=[];
|
||||
|
@ -8,10 +8,7 @@ try{
|
||||
$stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phishing.onion_id=onions.id) WHERE onions.address!='' AND onions.category!=15 AND onions.category!=18 AND isnull(phishing.onion_id) LIMIT 2100,10000;");
|
||||
$move=$db->prepare("UPDATE onions SET category=18, locked=1 WHERE address=?;");
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
|
||||
|
@ -9,12 +9,7 @@ $stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phish
|
||||
$move=$db->prepare("UPDATE onions SET category=15, locked=1, description='WARNING - This site will crash your browser with infinite iframes.' WHERE address=?;");
|
||||
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050');
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
|
||||
|
@ -8,10 +8,7 @@ try{
|
||||
$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=?;");
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
set_curl_options($ch);
|
||||
//curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
|
||||
|
@ -9,12 +9,7 @@ $stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phish
|
||||
$move=$db->prepare("UPDATE onions SET category=18, locked=1, description='CP - SCAM' WHERE address=?;");
|
||||
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050');
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
|
||||
|
@ -9,12 +9,7 @@ $stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phish
|
||||
$move=$db->prepare("UPDATE onions SET category=18, locked=1, description='Part of scam network - SCAM' WHERE address=?;");
|
||||
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050');
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
|
||||
|
@ -9,12 +9,7 @@ $stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phish
|
||||
$move=$db->prepare("UPDATE onions SET category=18, locked=1, description='Part of scam network - SCAM' WHERE address=?;");
|
||||
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050');
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));
|
||||
|
@ -10,12 +10,7 @@ $move=$db->prepare("UPDATE onions SET category=18, locked=1, description=CONCAT(
|
||||
$insert=$db->prepare('INSERT INTO onions (address, md5sum, timeadded, locked, description, category) VALUES (?, ?, ?, 1, "Part of scam network - SCAM", 18);');
|
||||
for($i = 1; $i < 213; ++$i){
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050');
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_URL, "http://kenimar6g7h2z75m.onion/go.php?id=$i");
|
||||
|
@ -35,11 +35,7 @@ if(!empty($_REQUEST['addr'])){
|
||||
echo "<p class=\"red\">$I[invalonion]</p>";
|
||||
}else{
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
||||
curl_setopt($ch, CURLOPT_ENCODING, '');
|
||||
|
Reference in New Issue
Block a user