mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 12:16:57 +00:00
add more logos, compress most things to webp, refactor header.php
This commit is contained in:
parent
3202658b78
commit
1010fac9ed
50 changed files with 96 additions and 147 deletions
197
www/header.php
197
www/header.php
|
@ -11,23 +11,11 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|||
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
|
||||
//PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
|
||||
|
||||
$data[0] = htmlspecialchars($data[0]);
|
||||
$data[1] = htmlspecialchars($data[1]);
|
||||
$data[2] = htmlspecialchars($data[2]);
|
||||
$data[3] = htmlspecialchars($data[3]);
|
||||
$data[4] = htmlspecialchars($data[4]);
|
||||
$data[5] = htmlspecialchars($data[5]);
|
||||
$data[6] = htmlspecialchars($data[6]);
|
||||
$data[7] = htmlspecialchars($data[7]);
|
||||
for ($i = 0; $i < count($data); $i++) {
|
||||
$data[$i] = htmlspecialchars($data[$i]);
|
||||
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[$i]);
|
||||
}
|
||||
|
||||
$data[0]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[0]);
|
||||
$data[1]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[1]);
|
||||
$data[2]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[2]);
|
||||
$data[3]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[3]);
|
||||
$data[4]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[4]);
|
||||
$data[5]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[5]);
|
||||
$data[6]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[6]);
|
||||
$data[7]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[7]);
|
||||
$row++;
|
||||
$num = count($data);
|
||||
//echo "<p>" . $data[1] . "</p>";
|
||||
|
@ -117,123 +105,91 @@ echo "<center><p>" . $rowcount . " Result(s) found.</p></center>";
|
|||
|
||||
|
||||
|
||||
// strtolower({key}) -> logo = /img/{value}
|
||||
$logomap = array(
|
||||
"archive" => "archive.webp",
|
||||
"collaboration" => "collaboration.webp",
|
||||
"communities" => "community.webp",
|
||||
"community" => "community.webp",
|
||||
"exchanges" => "haveno.webp",
|
||||
"fediverse" => "fediverse.webp",
|
||||
"forum" => "dread.webp",
|
||||
"forums" => "dread.webp",
|
||||
"indexes" => "index.webp",
|
||||
"infos and indexes" => "info.webp",
|
||||
"libraries" => "library.webp",
|
||||
"mail" => "clawsmail.webp",
|
||||
"markets" => "market.webp",
|
||||
"monero node" => "monero.webp",
|
||||
"news" => "news.webp",
|
||||
"password generator" => "passwordgen.webp",
|
||||
"pastebins" => "pastebins.webp",
|
||||
"privacy front-ends" => "opensource.webp",
|
||||
"radios" => "radio.webp",
|
||||
"sms" => "sms.webp",
|
||||
"search engine" => "searxng.svg",
|
||||
"simplex chatrooms" => "simplex.webp",
|
||||
"social" => "social.webp",
|
||||
"tools" => "tools.webp",
|
||||
"torrents" => "torrents.webp",
|
||||
"translation" => "translation.webp",
|
||||
"vpns" => "openvpn.webp",
|
||||
"vps" => "linux.webp",
|
||||
);
|
||||
|
||||
|
||||
$classmap = array(
|
||||
"monero node" => "xmr",
|
||||
"simplex chatrooms" => "sxc",
|
||||
);
|
||||
|
||||
|
||||
function DisplayCategories($instancename, $path) {
|
||||
$resultcount=0;
|
||||
$row = 1;
|
||||
//echo $instancename;
|
||||
//$csvfilenames = "verified.csv unverified.csv";
|
||||
$csvfilenames = "verified.csv";
|
||||
$csvfilenames = explode(' ', $csvfilenames);
|
||||
global $logomap, $classmap;
|
||||
|
||||
foreach ($csvfilenames as $csvfilename){
|
||||
//echo $csvfilename;
|
||||
$csvfile = $path . $csvfilename;
|
||||
//echo $csvfile;
|
||||
//echo "test";
|
||||
echo "<center><table>\n\n"; //begin html table formatting
|
||||
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
||||
$resultcount = 0;
|
||||
$row = 1;
|
||||
//echo $instancename;
|
||||
//$csvfilenames = "verified.csv unverified.csv";
|
||||
$csvfilenames = "verified.csv";
|
||||
$csvfilenames = explode(' ', $csvfilenames);
|
||||
|
||||
foreach ($csvfilenames as $csvfilename) {
|
||||
//echo $csvfilename;
|
||||
$csvfile = $path . $csvfilename;
|
||||
//echo $csvfile;
|
||||
//echo "test";
|
||||
echo "<center><table>\n\n"; //begin html table formatting
|
||||
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
||||
|
||||
$oldcatname="";
|
||||
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
|
||||
$num = count($data);
|
||||
$row++;
|
||||
$oldcatname = "";
|
||||
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
|
||||
$num = count($data);
|
||||
$row++;
|
||||
|
||||
if ( $row == "2") {
|
||||
echo "<p> | ";
|
||||
}else{
|
||||
//PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
|
||||
$data[0] = htmlspecialchars($data[0]);
|
||||
$data[1] = htmlspecialchars($data[1]);
|
||||
$data[2] = htmlspecialchars($data[2]);
|
||||
$data[3] = htmlspecialchars($data[3]);
|
||||
$data[4] = htmlspecialchars($data[4]);
|
||||
$data[5] = htmlspecialchars($data[5]);
|
||||
$data[6] = htmlspecialchars($data[6]);
|
||||
$data[7] = htmlspecialchars($data[7]);
|
||||
if ( $row == "2") {
|
||||
echo '<p> ';
|
||||
continue;
|
||||
}
|
||||
|
||||
//PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
|
||||
for ($i = 0; $i < count($data); $i++) {
|
||||
$data[$i] = htmlspecialchars($data[$i]);
|
||||
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[$i]);
|
||||
}
|
||||
|
||||
$resultcount++;
|
||||
|
||||
if (strtolower($oldcatname) != strtolower($data[1])){
|
||||
|
||||
echo '<a class="cata ' . ($classmap[strtolower($data[1])] ?? '') . '" href="index.php?query=' . $data[1] . '">' . '<img class="caticon" src="img/' . ($logomap[strtolower($data[1])] ?? 'empty.svg') . '"></img>'. $data[1] . '</a> ';
|
||||
$oldcatname = strtolower($data[1]);
|
||||
|
||||
$data[0]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[0]);
|
||||
$data[1]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[1]);
|
||||
$data[2]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[2]);
|
||||
$data[3]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[3]);
|
||||
$data[4]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[4]);
|
||||
$data[5]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[5]);
|
||||
$data[6]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[6]);
|
||||
$data[7]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[7]);
|
||||
|
||||
$resultcount++;
|
||||
for ($c=0; $c < $num; $c++) { // iterate over each row
|
||||
if ( $c == "1" ){
|
||||
|
||||
if (strtolower($oldcatname) != strtolower($data[1])){
|
||||
if( str_contains(strtolower($data[1]),'monero' )){
|
||||
echo '<img class="caticon" src="img/monero.png">' . '<a class="xmr" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
||||
$oldcatname=$data[1];
|
||||
}elseif( str_contains(strtolower($data[1]),'simplex' )){
|
||||
echo '<img class="caticon" src="img/simplex.png">' . '<a class="sxc" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
||||
$oldcatname=$data[1];
|
||||
|
||||
}elseif (str_contains(strtolower($data[1]), 'sms')){
|
||||
echo '<img class="caticon" src="img/sms.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
||||
$oldcatname=$data[1];
|
||||
|
||||
}elseif (str_contains(strtolower($data[1]), 'games')){
|
||||
echo '<img class="caticon" src="img/games.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'vps')){
|
||||
echo '<img class="caticon" src="img/linux.ico" >' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
||||
$oldcatname=$data[1];
|
||||
|
||||
}elseif (str_contains(strtolower($data[1]), 'torproject')){
|
||||
echo '<img class="caticon" src="img/tor_browser.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'privacy front-ends')){
|
||||
echo '<img class="caticon" src="img/opensource.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'vpns')){
|
||||
echo '<img class="caticon" src="img/openvpn.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'fediverse')){
|
||||
echo '<img class="caticon" src="img/xmpp.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'torrents')){
|
||||
echo '<img class="caticon" src="img/torrents.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'forums')){
|
||||
echo '<img class="caticon" src="img/dread.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'mail')){
|
||||
echo '<img class="caticon" src="img/clawsmail.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'radio')){
|
||||
echo '<img class="caticon" src="img/radio.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'search engine')){
|
||||
echo '<img class="caticon" src="img/searxng.svg">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}elseif (str_contains(strtolower($data[1]), 'exchanges')){
|
||||
echo '<img class="caticon" src="img/haveno.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
|
||||
$oldcatname=$data[1];
|
||||
}else{
|
||||
echo '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
||||
$oldcatname=$data[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<a class="cata sensitivelink" href="index.php?query=.&sensitive=1"><img class="caticon" src="img/showall.webp"></img>Display All Links</a></p>';
|
||||
fclose($handle);
|
||||
}
|
||||
}
|
||||
echo '<a class="sensitivelink" href="index.php?query=.&sensitive=1">Display All Links</a> |</p>';
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$min_length = 1;
|
||||
|
@ -253,4 +209,3 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|||
<h1><a href="http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern"><img src="img/lantern project large.png" class="projectbanner"></a></h1>
|
||||
<p><u>Update Frequency:</u> every 3 hours</p> </br>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue