mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-07-01 13:36:42 +00:00
minor bug fix, both issue 80 and 20 are done
This commit is contained in:
parent
14231fff92
commit
fde645fd60
3 changed files with 32 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
from utils import *
|
||||
import logic.lantern_logic as lantern
|
||||
from dotenv import load_dotenv
|
||||
import options
|
||||
import logic.options as options
|
||||
|
||||
|
||||
import os, pwd
|
||||
|
@ -533,7 +533,7 @@ Maintenance:
|
|||
#####################################################
|
||||
|
||||
case 4:
|
||||
|
||||
|
||||
options.run_option_4()
|
||||
|
||||
break
|
||||
|
@ -679,7 +679,6 @@ Maintenance:
|
|||
|
||||
|
||||
case 6:
|
||||
|
||||
options.run_option_6()
|
||||
|
||||
break
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
import shutil
|
||||
import os
|
||||
|
||||
import utils
|
||||
import conf
|
||||
import lantern_logic as lantern
|
||||
import logic.lantern_logic as lantern
|
||||
|
||||
def run_option_4():
|
||||
"""
|
||||
Running option 4: syncing all links from official and registered webrings
|
||||
|
||||
"""
|
||||
try:
|
||||
|
||||
utils.print_colors("4) Synchronize new links from new or existing webring participants, into your local csv files")
|
||||
|
@ -70,6 +77,10 @@ def run_option_4():
|
|||
utils.print_colors("[-] Option 4 failed suddently, please try again", is_error=True)
|
||||
|
||||
def run_option_6():
|
||||
"""
|
||||
Running option 6: Trusting/Untrusting/Blacklisting a webring participant
|
||||
|
||||
"""
|
||||
while True:
|
||||
utils.print_colors("[+] Trust/UnTrust/Blacklist a webring participant (Potentially dangerous)")
|
||||
|
||||
|
@ -164,6 +175,10 @@ def run_option_6():
|
|||
utils.print_colors("[-] Option 6 failed suddently, please try again", is_error=True)
|
||||
|
||||
def run_option_9():
|
||||
"""
|
||||
Running option 9: cleans duplications in local instance verified and unverified csv files
|
||||
|
||||
"""
|
||||
utils.print_colors("[+] 9) Cleaning up all duplicates in your own unverified + verified.csv (based on the url)")
|
||||
|
||||
try:
|
||||
|
@ -181,6 +196,10 @@ def run_option_9():
|
|||
utils.print_colors("[-] Option 9 failed suddenly, please try again", is_error=True)
|
||||
|
||||
def run_option_10():
|
||||
"""
|
||||
Running option 10: go over all verified and unverified participants csv files
|
||||
|
||||
"""
|
||||
utils.print_colors("[+] 10) perform sanity checks on all csv files (to mark them as sensitive / or remove the ones that are blacklisted)")
|
||||
|
||||
try:
|
||||
|
@ -191,6 +210,9 @@ def run_option_10():
|
|||
for participant in os.listdir(conf.PARTICIPANT_DIR):
|
||||
participant_local_dir = conf.PARTICIPANT_DIR + participant + '/'
|
||||
|
||||
if not os.path.exists(f'{participant_local_dir}verified.csv'):
|
||||
continue
|
||||
|
||||
utils.print_colors('[+] Reading webrring participant\'s verified and unverified')
|
||||
participant_verified_df, participant_unverified_df = utils.get_participant_local_verified_and_unverified(participant_local_dir)
|
||||
|
||||
|
@ -206,8 +228,7 @@ def run_option_10():
|
|||
utils.save_local_participant_verified_and_unverified(participant_verified_df, participant_unverified_df, participant_local_dir)
|
||||
|
||||
except Exception as err:
|
||||
utils.print_colors("[-] Option 10 failed suddently, please try again", is_error=True)
|
||||
|
||||
utils.print_colors("[-] Option 10 failed suddenly, please try again", is_error=True)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -28,8 +28,12 @@ def get_current_instance():
|
|||
#expanduser gives the current user directory
|
||||
instance_file = os.path.expanduser("~") + '/.darknet_participant_url'
|
||||
|
||||
with open(instance_file) as f:
|
||||
return f.read().rstrip()
|
||||
if os.path.exists(instance_file):
|
||||
with open(instance_file) as f:
|
||||
return f.read().rstrip()
|
||||
|
||||
else:
|
||||
return ""
|
||||
|
||||
#Set the local dir on script run
|
||||
conf.LOCAL_DIR = conf.PARTICIPANT_DIR + get_current_instance() + '/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue