diff --git a/README.md b/README.md index ea9bf06..871a28c 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,15 @@ # Main features: DONE: -py : option 6) Trust/Untrust/Blacklist a webring participant +-php : make a search engine prompt that only accepts [a-zA-Z.://], it must refuse every other character DOING: +-php : if valid make it filter your own verified.csv and unverified.csv files -py : option 7) Add/Remove words in the sensitive list (assigned to anon) -py : option 8) Add/Remove words in the blacklist (assigned to anon) TODO: --php : make a search engine prompt that only accepts [a-zA-Z.://], it must refuse every other character --php : if valid make it search your own verified.csv and unverified.csv files +-py : fix uptimecheck.py to match the new csv format # secondary features: -php : interactive search engine ? it displays as you type it ? diff --git a/www/header.php b/www/header.php index b6044c6..f09ee5f 100644 --- a/www/header.php +++ b/www/header.php @@ -7,6 +7,51 @@ \n\n"; //begin html table formatting +if (($handle = fopen($csvfile, "r")) !== FALSE) { + + + while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { + $num = count($data); + //echo "

" . $data[1] . "

"; + //echo "

$num fields in line $row:

\n"; + $row++; + //echo $row; + + + if ( $row == "2") { + echo ""; + }else{ + for ($c=0; $c < $num; $c++) { + echo ""; // beging html table row + // 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 " \n"; // display the score and close the third cell + } + //if ($c == 2){ + //} + } + } + echo ""; // end html table row + } + echo "\n
Name Score
" . ''; // display the link + echo $data[2] . ""; // display the link title and close the a href and first cell, open the second cell + echo $data[7] . ""; // display the status and close the second cell, open the third cell + echo $data[6] . "
"; + fclose($handle); +} + +} + + + + + + function DisplayCSV($csvfile) { $row = 1; echo "
\n\n"; //begin html table formatting diff --git a/www/participants/uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/unverified.csv b/www/participants/uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/unverified.csv index 232c46b..341e47f 100644 --- a/www/participants/uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/unverified.csv +++ b/www/participants/uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/unverified.csv @@ -1,3 +1,6 @@ -blacklisted-words -uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion -porn +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 diff --git a/www/search.php b/www/search.php new file mode 100644 index 0000000..f31ed6f --- /dev/null +++ b/www/search.php @@ -0,0 +1,59 @@ + + + + + + Darknet Onion Webring + + + + + + +
+ + + +
+ + + + + += $min_length and strlen($query) <= $max_length){ // if query length is more or equal minimum length then + + $query = htmlspecialchars($query); + // removes the risky characters + // 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 nl2br("\n"); + echo "

" . "Instance name: " . $_SERVER['SERVER_NAME'] . "

"; + $instance= $_SERVER['SERVER_NAME']; + echo nl2br("\n"); + $verifiedcsvpath="participants/" . $instance . '/verified.csv'; + $unverifiedcsvpath="participants/" . $instance . '/unverified.csv'; + //echo $verifiedcsvpath; + //echo nl2br("\n"); + //echo $unverifiedcsvpath; + echo nl2br("\n"); + DisplayCSVNEW($unverifiedcsvpath); + // 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 + // only display the results of unverified.csv that matches with the search term + + } + else{ // if query length is less than minimum or more than maximum + echo "Error: Query must be between ".$min_length . " and ".$max_length . " characters."; + } +?> diff --git a/www/tests/search.php b/www/tests/search.php deleted file mode 100644 index 860d483..0000000 --- a/www/tests/search.php +++ /dev/null @@ -1,15 +0,0 @@ -// https://github.com/H3l3na/php-search/blob/master/search.php -// - -