Merge pull request 'main' (#1) from nihilist/darknet-lantern:main into main
Reviewed-on: http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/valuer/darknet-lantern/pulls/1
|
@ -229,8 +229,28 @@ Maintenance:
|
|||
newrow=[instance,category,name,url,sensi,desc,'YES','100']
|
||||
print_colors(f"[+] NEWROW= {newrow}")
|
||||
# (rest is automatic: status, score, instance is = '' because it is your own instance)
|
||||
# TODO check if the entry doesnt already exist in verified.csv and in unverified.csv
|
||||
# if it doesnt exist, add it into unverified.csv
|
||||
# delete existing entries in verified.csv
|
||||
vdf_same_url_filter = vdf["URL"] == url # check for same url
|
||||
vdf_same_url_filter_count = vdf_same_url_filter.sum() # total url matches
|
||||
if vdf_same_url_filter_count > 0:
|
||||
print(f"Found {vdf_same_url_filter_count} row(s) with the same url in verified.csv")
|
||||
for index, row in vdf[vdf_same_url_filter].iterrows():
|
||||
print_colors(f"[+] ROW[{index}]= {list(row)}")
|
||||
vdf = vdf[~vdf_same_url_filter].reset_index(drop=True) # keep only entries that do not match filter
|
||||
print(f"Deleted {vdf_same_url_filter_count} row(s) with the same url in verified.csv")
|
||||
if desc == '': # if the description is empty = it means that it goes in unverified.csv, so save modified verified.csv file now
|
||||
vdf.to_csv(verifiedcsvfile, index=False)
|
||||
# delete existing entries in unverified.csv
|
||||
uvdf_same_url_filter = uvdf["URL"] == url # check for same url
|
||||
uvdf_same_url_filter_count = uvdf_same_url_filter.sum() # total url matches
|
||||
if uvdf_same_url_filter_count > 0:
|
||||
print(f"Found {uvdf_same_url_filter_count} row(s) with the same url in unverified.csv")
|
||||
for index, row in uvdf[uvdf_same_url_filter].iterrows():
|
||||
print_colors(f"[+] ROW[{index}]= {list(row)}")
|
||||
uvdf = uvdf[~uvdf_same_url_filter].reset_index(drop=True) # keep only entries that do not match filter
|
||||
print(f"Deleted {uvdf_same_url_filter_count} row(s) with the same url in unverified.csv")
|
||||
if desc != '': # if the description isnt empty = it means that it goes in verified.csv, so save modified unverified.csv file now
|
||||
uvdf.to_csv(unverifiedcsvfile, index=False)
|
||||
if desc == '': # if the description is empty = it means that it goes in unverified.csv
|
||||
print("Adding new row in unverified.csv since description is empty")
|
||||
uvdf.loc[-1] = newrow # adding a row
|
||||
|
@ -1438,3 +1458,4 @@ Maintenance:
|
|||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
|
|
@ -11,24 +11,11 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|||
|
||||
$oldcatname="";
|
||||
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
|
||||
$data[0]=preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[0]);
|
||||
// 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]);
|
||||
|
||||
$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]);
|
||||
for ($i = 0; $i < count($data); $i++) {
|
||||
$data[$i] = htmlspecialchars($data[$i]);
|
||||
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[$i]);
|
||||
}
|
||||
|
||||
$num = count($data);
|
||||
//echo "<p>" . $data[1] . "</p>";
|
||||
|
|
155
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,81 +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.png') . '"></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 '<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 '<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];
|
||||
}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;
|
||||
|
@ -211,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>
|
||||
|
||||
|
||||
|
|
BIN
www/img/archive.webp
Normal file
After Width: | Height: | Size: 480 B |
BIN
www/img/clawsmail.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
www/img/collaboration.webp
Normal file
After Width: | Height: | Size: 570 B |
BIN
www/img/community.webp
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
www/img/dread.webp
Normal file
After Width: | Height: | Size: 486 B |
BIN
www/img/empty.png
Normal file
After Width: | Height: | Size: 96 B |
BIN
www/img/fediverse.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
www/img/games.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
www/img/haveno.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
www/img/index.webp
Normal file
After Width: | Height: | Size: 962 B |
BIN
www/img/info.webp
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 62 KiB |
BIN
www/img/library.webp
Normal file
After Width: | Height: | Size: 570 B |
BIN
www/img/linux.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
www/img/market.webp
Normal file
After Width: | Height: | Size: 956 B |
BIN
www/img/monero.webp
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
www/img/news.webp
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
www/img/opensource.webp
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
www/img/openvpn.webp
Normal file
After Width: | Height: | Size: 942 B |
BIN
www/img/passwordgen.webp
Normal file
After Width: | Height: | Size: 604 B |
BIN
www/img/pastebins.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
www/img/radio.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
1
www/img/searxng.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg height="92mm" viewBox="0 0 92 92" width="92mm" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-40.921303 -17.416526)"><g fill="none"><circle cx="75" cy="92" r="0" stroke="#000" stroke-width="12"/><circle cx="75.921" cy="53.903" r="30" stroke="#3050ff" stroke-width="10"/><path d="m67.514849 37.91524a18 18 0 0 1 21.051475 3.312407 18 18 0 0 1 3.137312 21.078282" stroke="#3050ff" stroke-width="5"/></g><path d="m3.706 122.09h18.846v39.963h-18.846z" fill="#3050ff" transform="matrix(.69170581 -.72217939 .72217939 .69170581 0 0)"/></g></svg>
|
After Width: | Height: | Size: 557 B |
BIN
www/img/showall.webp
Normal file
After Width: | Height: | Size: 826 B |
BIN
www/img/simplex.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
www/img/sms.webp
Normal file
After Width: | Height: | Size: 1,018 B |
BIN
www/img/social.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
www/img/tools.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
www/img/tor.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
www/img/tor_browser.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
www/img/torrents.webp
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
www/img/translation.webp
Normal file
After Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 11 KiB |
BIN
www/img/xmpp.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
|
@ -9,13 +9,24 @@
|
|||
font-family: 'Source Code Pro', monospace;
|
||||
}
|
||||
|
||||
.caticon{
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.cata {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.width-class{
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.input-class{
|
||||
margin: 0 20% 0 20%;
|
||||
}
|
||||
|
@ -56,10 +67,9 @@
|
|||
|
||||
|
||||
.imgRz{
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
align: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
justify-content: center;
|
||||
-webkit-filter: grayscale(0%); /* Safari 6.0 - 9.0 */
|
||||
filter: grayscale(0%) brightness(100%) contrast(100%);
|
||||
}
|
||||
|
|