From 85d6e6947a34bbcd2614aa0b69913494159a28cf Mon Sep 17 00:00:00 2001 From: root Date: Mon, 24 Feb 2025 13:23:41 +0100 Subject: [PATCH] added the remaining todos for option 2 and 3 --- scripts/lantern.py | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/scripts/lantern.py b/scripts/lantern.py index 223fdce..1d623bc 100644 --- a/scripts/lantern.py +++ b/scripts/lantern.py @@ -330,8 +330,25 @@ Maintenance: name = input("What is the Website name you want to Blacklist ? (ex: BreachForums)") filter_uvdf = uvdf[uvdf.Name.str.contains(name)] filter_vdf = vdf[vdf.Name.str.contains(name)] - #TODO: put the URL of the website in your blacklist.csv file - #TODO: drop the rows that contain that URL in your verified.csv and unverified.csv + + if filter_vdf.size == 0 and filter_vdf.size == 0 : + print_colors("ERROR no results, skipping.",is_error=True) + else: + # Each of the rows has an index, + index=-1 + #TODO: ask the user to pick between 1) verified.csv or 2) unverified.csv + ### CHECKING IN VERIFIED.CSV ### + #TODO: if website name exists in verified.csv, ask the user what index should be blacklisted + while (index not in filter_vdf.index): + index = int(input("What is the index of the entry that you want to move to Untrust ? (ex: 3) ")) + #TODO: drop the rows that contain that URL in your verified.csv and unverified.csv files + #TODO: add the URL of the website in your blacklist.csv file + #TODO: update unverified filter csv : + ### CHECKING IN UNVERIFIED.CSV ### + #TODO: if website name still exists in unverified.csv, ask the user what index should be blacklisted + #TODO: drop the rows that contain that secondary URL in your verified.csv and unverified.csv files + #TODO: add the URL of the website in your blacklist.csv file + break choice=input("\n[+] Want to Trust/Untrust/Blacklist another existing entry ? (y/n) ") if choice == "n": @@ -339,8 +356,26 @@ Maintenance: break case 3: - # TODO change it to "edit link attributes" print_colors("[+] Edit link attributes (WIP)") + #TODO: while true + #TODO: ask the user to select between 1) verified.csv and 2) unverified.csv + #TODO: IF unverified.csv: + #TODO: ask the user to select a valid website name + #TODO: ask the user to select a valid index in either csv files + #TODO: ask the user to write a valid name (enter to skip) + #TODO: ask the user to write a valid category (enter to skip) + #TODO: ask the user to write a valid url (enter to skip) + #TODO: ask the user to write a valid description (enter to skip) + #TODO: if the description is not empty, move it to verified.csv + #TODO: IF verified.csv: + #TODO: ask the user to select a valid website name + #TODO: ask the user to select a valid index in either csv files + #TODO: ask the user to write a valid name (enter to skip) + #TODO: ask the user to write a valid category (enter to skip) + #TODO: ask the user to write a valid url (enter to skip) + #TODO: ask the user to write a valid description (enter to skip) + #TODO: ask the user if they are done editing links (y/n) + #TODO: if choice == y then break break