mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 20:26:58 +00:00
again worked on option 4
This commit is contained in:
parent
24b01d3421
commit
d891df79a2
1 changed files with 21 additions and 3 deletions
|
@ -226,8 +226,8 @@ Managing Wordlists:
|
||||||
webring_participant_url = input("What is the onion domain of the new webring participant? (ex: uptime.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion) ")
|
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,
|
# check if the directory exists locally or not,
|
||||||
participantdir=rootpath+'www/participants/'+webring_participant_url
|
participantdir=rootpath+'www/participants/'+webring_participant_url
|
||||||
if not os.path.isdir(participantdir): # to test on your own instance
|
#if not os.path.isdir(participantdir): # to test on your own instance
|
||||||
#if os.path.isdir(participantdir):
|
if os.path.isdir(participantdir):
|
||||||
# if it does, it means that the webring is ALREADY added
|
# if it does, it means that the webring is ALREADY added
|
||||||
print("[-] Webring Participant is already listed, skipping.")
|
print("[-] Webring Participant is already listed, skipping.")
|
||||||
return False
|
return False
|
||||||
|
@ -254,7 +254,25 @@ Managing Wordlists:
|
||||||
else:
|
else:
|
||||||
print("[+] Webring Participant is valid, adding it.")
|
print("[+] Webring Participant is valid, adding it.")
|
||||||
# TODO if OK then add it to your own webring-participants.csv
|
# 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
|
# create the directory in www/participants/PARTICIPANTURL/ if it's not there already
|
||||||
if not os.path.exists(participantdir):
|
if not os.path.exists(participantdir):
|
||||||
os.makedirs(participantdir)
|
os.makedirs(participantdir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue