updated search feature 90% complete

This commit is contained in:
root 2025-01-15 09:00:18 +01:00
parent 55d07d6549
commit 5a844e25e0
5 changed files with 54 additions and 18 deletions

View file

@ -43,6 +43,7 @@ def main():
instancepath=rootpath+'www/participants/'+instance+'/'
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 csvfilename in csvfiles2check:
@ -97,6 +98,9 @@ def main():
df.at[i,"Score"] = df.at[i,"Score"] - 1
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)
df2.to_csv(csvfile, index=False)

View file

@ -7,12 +7,14 @@
<?php
function DisplayCSVNEW($csvfile) {
function DisplayCSVNEW($csvfile, $query) {
$resultcount=0;
$row = 1;
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);
//echo "<p>" . $data[1] . "</p>";
@ -20,30 +22,44 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
$row++;
//echo $row;
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{
for ($c=0; $c < $num; $c++) {
echo "<tr>"; // beging html table row
if (str_contains($data[3], $query) or str_contains($data[2], $query)) {
$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):
// display the contents of a csv row
if ( $c == "1" ){
echo "<td>" . '<a href="'; // begin the table cell and 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 ($oldcatname != $data[1]){
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
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){
//}
}
}
}
echo "</tr>"; // end html table row
}
echo "\n</table></center>";
fclose($handle);
}
echo "<p>" . $resultcount . " Result(s) found.</p>";
}

View file

@ -1,6 +1,18 @@
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://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 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
2 uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion Infos and Links Tor Taxi http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/ List of links to go to popular darknet places ✔️ 100.0
3 uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion Infos and Links Tor Taxi http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/ List of links to go to popular darknet places ✔️ 100.0
4 uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion Infos and Links Tor Taxi http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/ List of links to go to popular darknet places ✔️ 100.0
5 uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion Infos and Links Tor Taxi http://tortaxi2dev6xjwbaydqzldruga77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/ ✔️ List of links to go to popular darknet places 0.0
6 uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion Infos and Links Tor Taxi http://tortaxi2dev6xjwbaydqzla77rrnth7yn2oqzjfmiuwn5h6vsk2a4syd.onion/ List of links to go to popular darknet places ✔️ 100.0
7 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Hackliberty Hackliberty Gitea http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion ✔️ 100.0
8 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Hackliberty Hackliberty Gitea http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion ✔️ 100.0
9 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Hackliberty Hackliberty Gitea http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion ✔️ 100.0
10 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Hackliberty Hackliberty Gitea http://vkp7367tcjpqdwwckigrdrvmwvispvbpg5rlsr2chjxvppfg7hipagyd.onion ✔️ 100.0
11 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Forums Hackliberty Forum http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/ ✔️ 100.0
12 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Forums Hackliberty Forum http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/ ✔️ 100.0
13 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Forums Hackliberty Forum http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/ ✔️ 100.0
14 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Forums Hackliberty Forum http://yw7nc56v4nsudvwewhmhhwltxpncedfuc43qbubj4nmwhdhwtiu4o6yd.onion/ ✔️ 100.0
15 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Communities Hackliberty main website http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/ ✔️ 100.0
16 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Communities Hackliberty main website http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/ ✔️ 100.0
17 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Communities Hackliberty main website http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/ ✔️ 100.0
18 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion Communities Hackliberty main website http://kj3wvs3wyfhm3uhhuqxlrhhcp6dneuau4mmvptlor27ghmrqx63fqnid.onion/ ✔️ 100.0

View file

@ -1,3 +1,3 @@
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

1 Name URL Description Trusted Status Score
2 webring.nowhevi57f4lxxd6db43miewcsgtovakbh6v5f52ci7csc2yjzy5rnid.onion ✔️ 100.0
3 Nowhere http://uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion Darknet Webring Onion Participant ✔️ 100.0

View file

@ -35,7 +35,7 @@ require("header.php");
// there needs to be regex checking, only allow [a-zA-Z0-9.:/]
$query=preg_replace("/[^a-zA-Z0-9:\/.\ ]/", "", $query);
echo "Search results for " . $query . " :";
echo "<p>Search results for " . $query . " :</p>";
echo nl2br("\n");
echo "<p>" . "Instance name: " . $_SERVER['SERVER_NAME'] . "</p>";
$instance= $_SERVER['SERVER_NAME'];
@ -45,8 +45,12 @@ require("header.php");
//echo $verifiedcsvpath;
//echo nl2br("\n");
//echo $unverifiedcsvpath;
echo "<h3><u>Verified Links:</u></h3>";
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
// only display the results of verified.csv that matches with the search term
// 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
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>";
}
?>