mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 20:26:58 +00:00
updated search feature 90% complete
This commit is contained in:
parent
55d07d6549
commit
5a844e25e0
5 changed files with 54 additions and 18 deletions
|
@ -43,6 +43,7 @@ def main():
|
||||||
|
|
||||||
instancepath=rootpath+'www/participants/'+instance+'/'
|
instancepath=rootpath+'www/participants/'+instance+'/'
|
||||||
csvfiles2check=['verified.csv','unverified.csv','webring-participants.csv']
|
csvfiles2check=['verified.csv','unverified.csv','webring-participants.csv']
|
||||||
|
csvfiles2sortcat=['verified.csv','unverified.csv']
|
||||||
|
|
||||||
#for csvfile in glob.glob("/srv/darknet-onion-webring/www/links/*.csv"):
|
#for csvfile in glob.glob("/srv/darknet-onion-webring/www/links/*.csv"):
|
||||||
for csvfilename in csvfiles2check:
|
for csvfilename in csvfiles2check:
|
||||||
|
@ -97,6 +98,9 @@ def main():
|
||||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||||
|
|
||||||
df2 = df.sort_values(by=["Score"], ascending=False)
|
df2 = df.sort_values(by=["Score"], ascending=False)
|
||||||
|
#sort by category if you are verified/unverified.csv
|
||||||
|
if csvfilename in csvfiles2sortcat:
|
||||||
|
df2 = df.sort_values(by=["Category"], ascending=False)
|
||||||
#print(df2)
|
#print(df2)
|
||||||
df2.to_csv(csvfile, index=False)
|
df2.to_csv(csvfile, index=False)
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,14 @@
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
function DisplayCSVNEW($csvfile) {
|
function DisplayCSVNEW($csvfile, $query) {
|
||||||
|
$resultcount=0;
|
||||||
$row = 1;
|
$row = 1;
|
||||||
echo "<center><table>\n\n"; //begin html table formatting
|
echo "<center><table>\n\n"; //begin html table formatting
|
||||||
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
||||||
|
|
||||||
|
|
||||||
|
$oldcatname="";
|
||||||
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
||||||
$num = count($data);
|
$num = count($data);
|
||||||
//echo "<p>" . $data[1] . "</p>";
|
//echo "<p>" . $data[1] . "</p>";
|
||||||
|
@ -20,30 +22,44 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
||||||
$row++;
|
$row++;
|
||||||
//echo $row;
|
//echo $row;
|
||||||
|
|
||||||
|
|
||||||
if ( $row == "2") {
|
if ( $row == "2") {
|
||||||
echo "<tr><td>Name</td> <td>Score</td> <td></td></tr>";
|
echo "<tr><td>Category</td> <td>Name</td> <td>Score</td> <td></td></tr>";
|
||||||
}else{
|
}else{
|
||||||
for ($c=0; $c < $num; $c++) {
|
if (str_contains($data[3], $query) or str_contains($data[2], $query)) {
|
||||||
echo "<tr>"; // beging html table row
|
$resultcount++;
|
||||||
|
for ($c=0; $c < $num; $c++) { // iterate over each row
|
||||||
|
echo "<tr>"; // begin html table row for that Category
|
||||||
// if the row is the first one (name url status score) only display (Name Status Score):
|
// if the row is the first one (name url status score) only display (Name Status Score):
|
||||||
// display the contents of a csv row
|
// display the contents of a csv row
|
||||||
if ( $c == "1" ){
|
if ( $c == "1" ){
|
||||||
echo "<td>" . '<a href="'; // begin the table cell and a href
|
|
||||||
echo $data[3] . '">'; // display the link
|
if ($oldcatname != $data[1]){
|
||||||
echo $data[2] . "</a></td><td>"; // display the link title and close the a href and first cell, open the second cell
|
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
|
||||||
echo $data[7] . "</td><td>"; // display the status and close the second cell, open the third cell
|
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
|
||||||
echo $data[6] . "</td> \n"; // display the score and close the third cell
|
echo "<td><p><h4>" . $data[1] . '| </h4></p></td>'; // display the category as its the first row with this new category
|
||||||
|
$oldcatname=$data[1];
|
||||||
|
}else{
|
||||||
|
echo "<td><p>" . ' </p></td>'; // category is already displayed so skip it (empty cell in category column)
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<td>" ; // begin the table cell
|
||||||
|
echo '<a href="'; // begin a href
|
||||||
|
echo $data[3] . '"> '; // display the link
|
||||||
|
echo $data[2] . " </a></td><td>"; // display the link title and close the a href and first cell, open the second cell
|
||||||
|
echo $data[7] . " </td><td>"; // display the status and close the second cell, open the third cell
|
||||||
|
echo $data[6] . " </td> \n"; // display the score and close the third cell
|
||||||
}
|
}
|
||||||
//if ($c == 2){
|
//if ($c == 2){
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "</tr>"; // end html table row
|
echo "</tr>"; // end html table row
|
||||||
}
|
}
|
||||||
echo "\n</table></center>";
|
echo "\n</table></center>";
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
}
|
}
|
||||||
|
echo "<p>" . $resultcount . " Result(s) found.</p>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
Instance,Category,Name,URL,Sensitive,Description,Status,Score
|
Instance,Category,Name,URL,Sensitive,Description,Status,Score
|
||||||
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Hackliberty,Hackliberty Gitea,http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion,,,,
|
|
||||||
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Communities,Hackliberty main website,http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/,,,,
|
|
||||||
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Forums,Hackliberty Forum,http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/,,,,
|
|
||||||
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzldruga77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,✔️,List of links to go to popular darknet places,✔️,0.0
|
|
||||||
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,,List of links to go to popular darknet places,✔️,100.0
|
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,,List of links to go to popular darknet places,✔️,100.0
|
||||||
|
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,,List of links to go to popular darknet places,✔️,100.0
|
||||||
|
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,,List of links to go to popular darknet places,✔️,100.0
|
||||||
|
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzldruga77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,✔️,List of links to go to popular darknet places,❌,0.0
|
||||||
|
uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Tor Taxi,http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/,,List of links to go to popular darknet places,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Hackliberty,Hackliberty Gitea,http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Hackliberty,Hackliberty Gitea,http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Hackliberty,Hackliberty Gitea,http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Hackliberty,Hackliberty Gitea,http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Forums,Hackliberty Forum,http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Forums,Hackliberty Forum,http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Forums,Hackliberty Forum,http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Forums,Hackliberty Forum,http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Communities,Hackliberty main website,http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Communities,Hackliberty main website,http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Communities,Hackliberty main website,http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/,,,✔️,100.0
|
||||||
|
webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,Communities,Hackliberty main website,http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/,,,✔️,100.0
|
||||||
|
|
|
|
@ -1,3 +1,3 @@
|
||||||
Name,URL,Description,Trusted,Status,Score
|
Name,URL,Description,Trusted,Status,Score
|
||||||
,webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,,,,
|
,webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion,,,✔️,100.0
|
||||||
Nowhere,http://uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Darknet Webring Onion Participant,,✔️,100.0
|
Nowhere,http://uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Darknet Webring Onion Participant,,✔️,100.0
|
||||||
|
|
|
|
@ -35,7 +35,7 @@ require("header.php");
|
||||||
// there needs to be regex checking, only allow [a-zA-Z0-9.:/]
|
// there needs to be regex checking, only allow [a-zA-Z0-9.:/]
|
||||||
$query=preg_replace("/[^a-zA-Z0-9:\/.\ ]/", "", $query);
|
$query=preg_replace("/[^a-zA-Z0-9:\/.\ ]/", "", $query);
|
||||||
|
|
||||||
echo "Search results for " . $query . " :";
|
echo "<p>Search results for " . $query . " :</p>";
|
||||||
echo nl2br("\n");
|
echo nl2br("\n");
|
||||||
echo "<p>" . "Instance name: " . $_SERVER['SERVER_NAME'] . "</p>";
|
echo "<p>" . "Instance name: " . $_SERVER['SERVER_NAME'] . "</p>";
|
||||||
$instance= $_SERVER['SERVER_NAME'];
|
$instance= $_SERVER['SERVER_NAME'];
|
||||||
|
@ -45,8 +45,12 @@ require("header.php");
|
||||||
//echo $verifiedcsvpath;
|
//echo $verifiedcsvpath;
|
||||||
//echo nl2br("\n");
|
//echo nl2br("\n");
|
||||||
//echo $unverifiedcsvpath;
|
//echo $unverifiedcsvpath;
|
||||||
|
echo "<h3><u>Verified Links:</u></h3>";
|
||||||
echo nl2br("\n");
|
echo nl2br("\n");
|
||||||
DisplayCSVNEW($unverifiedcsvpath);
|
DisplayCSVNEW($verifiedcsvpath,$query);
|
||||||
|
echo "<h3><u>Unverified Links:</u></h3>";
|
||||||
|
echo nl2br("\n");
|
||||||
|
DisplayCSVNEW($unverifiedcsvpath,$query);
|
||||||
// display the results of verified.csv
|
// display the results of verified.csv
|
||||||
// only display the results of verified.csv that matches with the search term
|
// only display the results of verified.csv that matches with the search term
|
||||||
// display the results of unverified.csv
|
// display the results of unverified.csv
|
||||||
|
@ -54,6 +58,6 @@ require("header.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
else{ // if query length is less than minimum or more than maximum
|
else{ // if query length is less than minimum or more than maximum
|
||||||
echo "Error: Query must be between ".$min_length . " and ".$max_length . " characters.";
|
echo "<p>Error: Query must be between ".$min_length . " and ".$max_length . " characters.</p>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue