mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 20:26:58 +00:00
Merge pull request 'main' (#52) from SovereigntyIsNotFreedom/darknet-lantern:main into main
Reviewed-on: http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern/pulls/52
This commit is contained in:
commit
38937d5708
12 changed files with 688 additions and 17 deletions
|
@ -129,6 +129,8 @@ def main():
|
|||
blcsvfile=instancepath+'/blacklist.csv'
|
||||
secsvfile=instancepath+'/sensitive.csv'
|
||||
webpcsvfile=instancepath+'/webring-participants.csv'
|
||||
submission_file_abs_path = os.path.abspath('submissions/submission.csv')
|
||||
|
||||
if not os.path.exists(instancepath):
|
||||
print_colors(f"{rootpath}",is_error=True, bold=True)
|
||||
os.makedirs(instancepath)
|
||||
|
@ -179,10 +181,11 @@ Managing Wordlists:
|
|||
Maintenance:
|
||||
9) Remove the duplicate URLs for your own instance
|
||||
10) Perform sanity checks on all csv files for all instances (to mark them as sensitive / or remove the ones that are blacklisted)
|
||||
|
||||
11) Review submissions (Add to verified.csv/ add to unverified.csv/ delete /blacklist)
|
||||
|
||||
0) Exit
|
||||
""")
|
||||
option = input("Select an option? (0-10): ").strip()
|
||||
option = input("Select an option? (0-11): ").strip()
|
||||
try:
|
||||
option = int(option)
|
||||
except ValueError:
|
||||
|
@ -1197,7 +1200,86 @@ Maintenance:
|
|||
csvdf.to_csv(csvfilepath, index=False)
|
||||
#read=input("Continue?")
|
||||
break
|
||||
|
||||
case 11:
|
||||
try:
|
||||
print_colors("1) Move entries to verified 2) Move entries from submission to unverified 3) Delete from submission file 4) Add to blacklist -1) exit")
|
||||
|
||||
submission_df = pd.read_csv(submission_file_abs_path)
|
||||
verified_csv_df = pd.read_csv(verifiedcsvfile)
|
||||
unverified_csv_df = pd.read_csv(unverifiedcsvfile)
|
||||
blacklist_df = pd.read_csv(blcsvfile)
|
||||
blacklisted_words = [word for word in blacklist_df['blacklisted-words']]
|
||||
for i, row in submission_df.iterrows():
|
||||
print_colors(row)
|
||||
link = row['link']
|
||||
if link in blacklisted_words:
|
||||
print_colors("Black listed entry found", bold=True)
|
||||
continue
|
||||
else:
|
||||
name = row['name']
|
||||
desc = row['desc']
|
||||
category = row['category']
|
||||
sensi = "YES" if row['sensitive'] == 'y' else "NO"
|
||||
number = int(input("Enter an option: "))
|
||||
|
||||
if number == 1:
|
||||
newrow=[instance,category,name,link,sensi,desc,'YES','100']
|
||||
|
||||
verified_csv_df.loc[-1] = newrow # adding a row
|
||||
verified_csv_df.index = verified_csv_df.index + 1 # shifting index
|
||||
verified_csv_df = verified_csv_df.sort_index() # sorting by index
|
||||
verified_csv_df = verified_csv_df.sort_values(by=["Category","Score"], ascending=[True,False]) # sorting categories
|
||||
print_colors("[+] New row added! now writing the csv file")
|
||||
verified_csv_df.to_csv(verifiedcsvfile, index=False)
|
||||
submission_df.drop(index=i,inplace=True)
|
||||
submission_df.to_csv(submission_file_abs_path, index=False)
|
||||
elif number == 2:
|
||||
|
||||
newrow=[instance,category,name,link,sensi,desc,'YES','100']
|
||||
|
||||
unverified_csv_df.loc[-1] = newrow # adding a row
|
||||
unverified_csv_df.index = unverified_csv_df.index + 1 # shifting index
|
||||
unverified_csv_df = unverified_csv_df.sort_index() # sorting by index
|
||||
unverified_csv_df = unverified_csv_df.sort_values(by=["Category","Score"], ascending=[True,False]) # sorting categories
|
||||
print_colors("[+] New row added! now writing the csv file")
|
||||
unverified_csv_df.to_csv(unverifiedcsvfile, index=False)
|
||||
submission_df.drop(index=i,inplace=True)
|
||||
submission_df.to_csv(submission_file_abs_path, index=False)
|
||||
|
||||
elif number == 3:
|
||||
submission_df.drop(index=i,inplace=True)
|
||||
submission_df.to_csv(submission_file_abs_path, index=False)
|
||||
|
||||
elif number == 4:
|
||||
newrow=[link]
|
||||
|
||||
blacklist_df.loc[-1] = newrow # adding a row
|
||||
blacklist_df.index = blacklist_df.index + 1 # shifting index
|
||||
blacklist_df = blacklist_df.sort_index() # sorting by index
|
||||
print_colors("[+] New row added! now writing the csv file")
|
||||
blacklist_df.to_csv(blcsvfile, index=False)
|
||||
submission_df.drop(index=i,inplace=True)
|
||||
submission_df.to_csv(submission_file_abs_path, index=False)
|
||||
|
||||
elif number == -1:
|
||||
break
|
||||
|
||||
else:
|
||||
print_colors("Invalid Number",is_error=True)
|
||||
continue
|
||||
|
||||
|
||||
|
||||
|
||||
except Exception as e:
|
||||
print_colors(f'Try again {e}',is_error=True)
|
||||
break
|
||||
|
||||
finally:
|
||||
print_colors("End of file")
|
||||
|
||||
break
|
||||
case 0:
|
||||
print_colors(f"[-] Exiting", bold=True)
|
||||
break
|
||||
|
@ -1206,4 +1288,4 @@ Maintenance:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue