*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
$I[error]: $I[nodb]
"; echo ''; exit; } echo 'I\'m not responsible for any content of websites linked here. 99% of darkweb sites selling anything are scams. Be careful and use your brain. Every week I get 2-5 E-Mails from people that were desperate to make money and fell for scammers, don\'t be one of them!
'; //update onions description form echo ""; //search from echo " | "; echo ' |
$I[invalonion]
"; echo "$I[valid]: http://tt3j2x4k5ycaa5zt.onion
"; }else{ if(!isset($_REQUEST['challenge'])){ send_error('Error: Wrong Captcha'); } $stmt=$db->prepare('SELECT code FROM ' . PREFIX . 'captcha WHERE id=?;'); $stmt->execute([$_REQUEST['challenge']]); $stmt->bindColumn(1, $code); if(!$stmt->fetch(PDO::FETCH_BOUND)){ send_error('Error: Captcha expired'); } $time=time(); $stmt=$db->prepare('DELETE FROM ' . PREFIX . 'captcha WHERE id=? OR time;'); $stmt->execute([$_REQUEST['challenge'], $time-3600]); if($_REQUEST['captcha']!==$code){ if(strrev($_REQUEST['captcha'])!==$code){ send_error('Error: Wrong captcha'); } } $addr=strtolower($addr[4]); $md5=md5($addr, true); $stmt=$db->prepare('SELECT locked FROM ' . PREFIX . 'onions WHERE md5sum=?;'); $stmt->execute([$md5]); $stmt->bindColumn(1, $locked); if($category==count($categories)){ $category=0; } if(!isSet($_POST['desc'])){ $desc=''; }else{ $desc=trim($_POST['desc']); $desc=htmlspecialchars($desc); $desc=preg_replace("/(\r?\n|\r\n?)/", '$I[succadd]
"; // mail('daniel@tt3j2x4k5ycaa5zt.onion', 'New onion', "$addr.onion was added - $desc", "Content-Type: text/plain; charset=UTF-8\r\n"); }elseif($locked==1){//locked, not editable echo "$I[faillocked]
"; }elseif($desc!==''){//update description $stmt=$db->prepare('UPDATE ' . PREFIX . 'onions SET description=?, category=? WHERE md5sum=?;'); $stmt->execute([$desc, $category, $md5]); echo "$I[succupddesc]
"; // mail('daniel@tt3j2x4k5ycaa5zt.onion', 'Updated onion', "$addr.onion was updated - $desc", "Content-Type: text/plain; charset=UTF-8\r\n"); }elseif($category!=0){//update category only $stmt=$db->prepare('UPDATE ' . PREFIX . 'onions SET category=? WHERE md5sum=?;'); $stmt->execute([$category, $md5]); echo "$I[succupdcat]
"; }else{//nothing changed and already known echo "$I[alreadyknown]
"; } } } if($pages>1 && !isset($_REQUEST['q'])){ $pagination=get_pagination($category, $pages); echo $pagination; }else{ $pagination=''; } if(isset($_REQUEST['q'])){//run search query $query=htmlspecialchars($_REQUEST['q']); $query="%$query%"; if(isset($_REQUEST['hidelocked'])){ $hidelocked='AND locked=0'; }else{ $hidelocked=''; } if($category>=count($categories)){ $stmt=$db->prepare('SELECT address, lasttest, lastup, timeadded, description, locked, special FROM ' . PREFIX . "onions WHERE address!='' AND id NOT IN (SELECT onion_id FROM " . PREFIX . "phishing) AND timediff<604800 $hidelocked AND (description LIKE ? OR address LIKE ?) ORDER BY address;"); $stmt->execute([$query, $query]); }else{ $stmt=$db->prepare('SELECT address, lasttest, lastup, timeadded, description, locked, special FROM ' . PREFIX . "onions WHERE address!='' AND category=? AND id NOT IN (SELECT onion_id FROM " . PREFIX . "phishing) AND timediff<604800 $hidelocked AND (description LIKE ? OR address LIKE ?) ORDER BY address;"); $stmt->execute([$category, $query, $query]); } $table=get_table($stmt, $numrows); printf("$I[searchresult]
", $_REQUEST['q'], $numrows); echo $table; }elseif($category>=count($categories)+count($special)){//show phishing clones print_phishing_table(); }elseif($category>=count($categories)){//show special categories $tmp=$category-count($categories); foreach($special as $name=>$query){ if($tmp===0) break; --$tmp; } if($category-count($categories)===1){ $query.=' ORDER BY id DESC LIMIT ' . PER_PAGE; }else{ $query.=' ORDER BY address'; if($_REQUEST['pg']>0){ $offset=PER_PAGE*($_REQUEST['pg']-1); $query.=' LIMIT ' . PER_PAGE ." OFFSET $offset"; } } $stmt=$db->query('SELECT address, lasttest, lastup, timeadded, description, locked, special FROM ' . PREFIX . "onions WHERE $query;"); echo get_table($stmt, $numrows, true); }else{//show normal categories if($_REQUEST['pg']>0){ $offset=PER_PAGE*($_REQUEST['pg']-1); $offsetquery=' LIMIT ' . PER_PAGE . " OFFSET $offset"; }else{ $offsetquery=''; } $stmt=$db->prepare('SELECT address, lasttest, lastup, timeadded, description, locked, special FROM ' . PREFIX . "onions WHERE address!='' AND id NOT IN (SELECT onion_id FROM " . PREFIX . "phishing) AND category=? AND timediff<604800 ORDER BY address$offsetquery;"); $stmt->execute([$category]); echo get_table($stmt, $numrows, true); } echo '