From 1915487f5057a98bd5dfd08b85faff032ec00d0b Mon Sep 17 00:00:00 2001 From: root Date: Sun, 12 Jan 2025 14:49:00 +0100 Subject: [PATCH] fixed setup --- scripts/darknet_exploration.py | 54 ++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/scripts/darknet_exploration.py b/scripts/darknet_exploration.py index fdd08a2..5d9e60b 100644 --- a/scripts/darknet_exploration.py +++ b/scripts/darknet_exploration.py @@ -28,32 +28,6 @@ def main(): else: print('[-] Invalid instance name in ~/.darknet_participant_url:', instance) return False - instancepath=rootpath+'www/participants/'+instance - templatepath=rootpath+'templates/' - verifiedcsvfile=instancepath+'/verified.csv' - unverifiedcsvfile=instancepath+'/unverified.csv' - blcsvfile=instancepath+'/blacklist.csv' - secsvfile=instancepath+'/sensitive.csv' - webpcsvfile=instancepath+'/webring-participants.csv' - # check if instancepath exists, if not then create the directory - if not os.path.exists(instancepath): - os.makedirs(instancepath) - # check if all the required csv files exist in it, otherwise copy them from the templates directory - # NOTE : the templates files are EMPTY by default, this is because i want each peer to manually review lists of links, and links themselves manually, this is to avoid allowing malicious links to slip through without intentional edits from the peer themselves. - for i in ['verified.csv','unverified.csv','blacklist.csv','sensitive.csv','webring-participants.csv']: - filepath=instancepath+'/'+i - if not os.path.isfile(filepath): - # copy templates/ FILE.CSV to instancepath/ FILE.CSV - src=templatepath+i - shutil.copyfile(src, filepath) - # now that they exist, get vdf and uvdf and the rest - vdf = pd.read_csv(verifiedcsvfile) - uvdf = pd.read_csv(unverifiedcsvfile) - bldf = pd.read_csv(blcsvfile) - sedf = pd.read_csv(secsvfile) - webpdf = pd.read_csv(webpcsvfile) - print("[+] file exists, your Webring URL is", instance) - isitvalid = "y" else: print("[+] Instance Path doesn't exist yet") # and ask for the instance URL domain @@ -81,6 +55,34 @@ def main(): print(f.read()) print("[+] Initial Setup Completed!") myinstance = instance + + instancepath=rootpath+'www/participants/'+instance + templatepath=rootpath+'templates/' + verifiedcsvfile=instancepath+'/verified.csv' + unverifiedcsvfile=instancepath+'/unverified.csv' + blcsvfile=instancepath+'/blacklist.csv' + secsvfile=instancepath+'/sensitive.csv' + webpcsvfile=instancepath+'/webring-participants.csv' + # check if instancepath exists, if not then create the directory + if not os.path.exists(instancepath): + os.makedirs(instancepath) + # check if all the required csv files exist in it, otherwise copy them from the templates directory + # NOTE : the templates files are EMPTY by default, this is because i want each peer to manually review lists of links, and links themselves manually, this is to avoid allowing malicious links to slip through without intentional edits from the peer themselves. + for i in ['verified.csv','unverified.csv','blacklist.csv','sensitive.csv','webring-participants.csv']: + filepath=instancepath+'/'+i + if not os.path.isfile(filepath): + # copy templates/ FILE.CSV to instancepath/ FILE.CSV + src=templatepath+i + shutil.copyfile(src, filepath) + # now that they exist, get vdf and uvdf and the rest + vdf = pd.read_csv(verifiedcsvfile) + uvdf = pd.read_csv(unverifiedcsvfile) + bldf = pd.read_csv(blcsvfile) + sedf = pd.read_csv(secsvfile) + webpdf = pd.read_csv(webpcsvfile) + print("[+] file exists, your Webring URL is", instance) + isitvalid = "y" + while True: print("""