From d891df79a283554424ec814b017d26bbc7804478 Mon Sep 17 00:00:00 2001 From: nihilist Date: Wed, 8 Jan 2025 08:55:59 +0100 Subject: [PATCH] again worked on option 4 --- scripts/darknet_exploration.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/darknet_exploration.py b/scripts/darknet_exploration.py index f8b6abc..e535abe 100644 --- a/scripts/darknet_exploration.py +++ b/scripts/darknet_exploration.py @@ -226,8 +226,8 @@ Managing Wordlists: webring_participant_url = input("What is the onion domain of the new webring participant? (ex: uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion) ") # check if the directory exists locally or not, participantdir=rootpath+'www/participants/'+webring_participant_url - if not os.path.isdir(participantdir): # to test on your own instance - #if os.path.isdir(participantdir): + #if not os.path.isdir(participantdir): # to test on your own instance + if os.path.isdir(participantdir): # if it does, it means that the webring is ALREADY added print("[-] Webring Participant is already listed, skipping.") return False @@ -254,7 +254,25 @@ Managing Wordlists: else: print("[+] Webring Participant is valid, adding it.") # TODO if OK then add it to your own webring-participants.csv - # TODO also check if the line doesn't exist yet the templates csv file !!! (search for it and if length = 0 then add it) + name='' + while(IsNameValid(name) is not True): + name = input("What is the Webring instance name ? ") + desc='DEFAULT' + while(IsDescriptionValid(desc) is not True): + desc=input("Description for the webring participant ? (Optional)") + trusted='' + status='' + score='' + newrow=[name,webring_participant_url,desc,trusted,status,score] + webringcsvfile=instancepath+'/'+'webring-participants.csv' + wdf = pd.read_csv(webringcsvfile) + #print("[+] NEWROW=",newrow) + wdf.loc[-1] = newrow # adding a row + wdf.index = wdf.index + 1 # shifting index + wdf = wdf.sort_index() # sorting by index + print("[+] New row added! now writing the csv file:",webringcsvfile) + wdf.to_csv(webringcsvfile, index=False) + # create the directory in www/participants/PARTICIPANTURL/ if it's not there already if not os.path.exists(participantdir): os.makedirs(participantdir)