From 9602b0ffb2b8eb243b3810d05f25bcd2eb9290f1 Mon Sep 17 00:00:00 2001 From: nihilist Date: Fri, 3 Jan 2025 08:58:26 +0100 Subject: [PATCH] updated --- scripts/darknet_exploration.py | 39 ++++++++++++++++++++-------------- scripts/tests/csvwork.py | 37 ++++++++++++++++++++++++++++++++ scripts/tests/unverified.csv | 4 ++++ scripts/tests/verified.csv | 12 +++++++++++ 4 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 scripts/tests/csvwork.py create mode 100644 scripts/tests/unverified.csv create mode 100644 scripts/tests/verified.csv diff --git a/scripts/darknet_exploration.py b/scripts/darknet_exploration.py index 5813891..9689e30 100644 --- a/scripts/darknet_exploration.py +++ b/scripts/darknet_exploration.py @@ -93,26 +93,33 @@ def main(): searchterm = input("What is the index of the entry that you want to trust ?") case "5": print("[+] Add/Remove words in the sensitive list (ex: drug)") - # print("do you want to 1) add words or 2) remove words ?") - # while option is not 1 or 2: - # option=input("do you want to 1) add words or 2) remove words ?") - # done = False - # while(done == False): + print("do you want to 1) add words or 2) remove words ?") + option="0" + + done = False + while(done == False): + while option not any((1,2,"exit")): + option=input("do you want to 1) add words or 2) remove words ? (type exit to exit)") # display the contents of sensitive.csv file - # if option == 1: - # word=input("which word do you want to add? (write 0 to exit") - # if word = 0 - #then done= True to get out of the while loop - # else + if option == 1: + word=input("which word do you want to add? (write 0 to exit") + if word == "0": + done = True + #True to get out of the while loop + else + print("checking if word is valid") #check if word is valid in a while loop (dont check if # if invalid! remove word at index - #else: - # index=input("which word do you want to remove? (index 0 to (max index) (write exit to exit)") - # if index = exit - #then done= True to get out of the while loop - # else - # check if index is valid or not + else: + index=input("which word do you want to remove? (index 0 to (max index) (write exit to exit)") + if index == "exit": + done = True + #True to get out of the while loop + else + print("checking if index is valid") + #check if index is valid or not # if valid! remove word at index + # if invalid! just pass to ask for another word case "6": print("[+] Add/Remove words in the blacklist list (ex: porn)") diff --git a/scripts/tests/csvwork.py b/scripts/tests/csvwork.py new file mode 100644 index 0000000..145a405 --- /dev/null +++ b/scripts/tests/csvwork.py @@ -0,0 +1,37 @@ +import csv, json, pandas as pd, glob + +def main(): + print("aaa") + csvfile="verified.csv" + df = pd.read_csv(csvfile) + #for i in range (df.index.stop): + # print(i,df.at[i,i]) + + #for i in range (df.index.stop): + # for col in df.columns.values.tolist(): + # print(df.at[i][col]) + + #print(df) + print("[+] Display 2 columns:") + #display 2 columns: + print(df[['Name', 'URL']]) + + print("[+] Display rows 0 to 5") + #display rows from 0 to 5 + print(df[0:5]) + + #display rows from 0 to 5 + print("[+] Display rows 3 to 5 and columns Name and URL") + print(df.loc[3:5,['Name','URL']]) + #print(df[0:1,['Name','URL']]) + + print("[+] Display all rows for and columns name and URL") + #df.loc[startrow:endrow, startcolumn:endcolumn] + print(df.loc[0:df.index.stop,['Name','URL']]) + + #display rows from 0 to the end of indexes + print("[+] Display all rows for all columns") + print(df[0:df.index.stop]) + +if __name__ == '__main__': + main() diff --git a/scripts/tests/unverified.csv b/scripts/tests/unverified.csv new file mode 100644 index 0000000..9003a03 --- /dev/null +++ b/scripts/tests/unverified.csv @@ -0,0 +1,4 @@ +Instance,Category,Name,URL,Sensitive,Description,Status,Score +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/scripts/tests/verified.csv b/scripts/tests/verified.csv new file mode 100644 index 0000000..25f8e3b --- /dev/null +++ b/scripts/tests/verified.csv @@ -0,0 +1,12 @@ +Instance,Category,Name,URL,Sensitive,Description,Status,Score +FIRSTherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,Psychonaut Wiki,http://vvedndyt433kopnhv6vejxnut54y5752vpxshjaqmj7ftwiu6quiv2ad.onion/,,"This is the wiki for psychonauts, it contains infos on substances and trip reports",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +somewherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 +LASTherefoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,Infos and Links,DNM Bible,http://biblemeowimkh3utujmhm6oh2oeb3ubjw2lpgeq3lahrfr2l6ev6zgyd.onion/,✔️,"General guide on how to navigate the Darknet to buy drugs",✔️,100.0 + +