mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 20:26:58 +00:00
Merge pull request 'main' (#42) from SovereigntyIsNotFreedom/darknet-lantern:main into main
Reviewed-on: http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern/pulls/42
This commit is contained in:
commit
2e076599ff
7 changed files with 57 additions and 8 deletions
3
scripts/.env.sample
Normal file
3
scripts/.env.sample
Normal file
|
@ -0,0 +1,3 @@
|
|||
TOR_HOST=socks5h://127.0.0.1
|
||||
TOR_PORT=9050
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
from utils import *
|
||||
from dotenv import load_dotenv
|
||||
|
||||
import os, pwd
|
||||
import pandas as pd
|
||||
|
@ -9,11 +10,23 @@ import urllib
|
|||
import sys
|
||||
|
||||
|
||||
script_abs_path = os.path.dirname(os.path.abspath(__file__))
|
||||
env_path = os.path.join(script_abs_path+"/.env")
|
||||
default_env_path = os.path.join(script_abs_path+"/.env.sample")
|
||||
|
||||
if os.path.exists(env_path):
|
||||
load_dotenv(dotenv_path=env_path)
|
||||
else:
|
||||
load_dotenv(dotenv_path=default_env_path)
|
||||
|
||||
tor_host = os.getenv("TOR_HOST")
|
||||
tor_port = os.getenv("TOR_PORT")
|
||||
|
||||
def main():
|
||||
#os.system('clear')
|
||||
proxies = {
|
||||
'http': 'socks5h://127.0.0.1:9050',
|
||||
'https': 'socks5h://127.0.0.1:9050'
|
||||
'http': f'{tor_host}:{tor_port}',
|
||||
'https': f'{tor_host}:{tor_port}'
|
||||
}
|
||||
|
||||
rootpath='/srv/darknet-lantern/'
|
||||
|
@ -33,7 +46,7 @@ def main():
|
|||
# check if the directory exists
|
||||
if not os.path.isdir(participantdir):
|
||||
#if not, create it
|
||||
print("Official participan ",line.strip() , "'s directory doesnt exist, creating it")
|
||||
print("Official participant ",line.strip() , "'s directory doesnt exist, creating it")
|
||||
os.makedirs(participantdir)
|
||||
|
||||
|
||||
|
@ -1193,4 +1206,4 @@ Maintenance:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from dotenv import load_dotenv
|
||||
|
||||
import os,re,pwd
|
||||
import csv
|
||||
import requests
|
||||
|
@ -5,6 +7,20 @@ import json
|
|||
import pandas as pd
|
||||
import glob
|
||||
|
||||
|
||||
|
||||
script_abs_path = os.path.dirname(os.path.abspath(__file__))
|
||||
env_path = os.path.join(script_abs_path+"/.env")
|
||||
default_env_path = os.path.join(script_abs_path+"/.env.sample")
|
||||
|
||||
if os.path.exists(env_path):
|
||||
load_dotenv(dotenv_path=env_path)
|
||||
else:
|
||||
load_dotenv(dotenv_path=default_env_path)
|
||||
|
||||
tor_host = os.getenv("TOR_HOST")
|
||||
tor_port = os.getenv("TOR_PORT")
|
||||
|
||||
#apt install python3-pandas python3-requests python3-socks
|
||||
|
||||
def main():
|
||||
|
@ -36,8 +52,8 @@ def main():
|
|||
return False
|
||||
|
||||
proxies = {
|
||||
'http': 'socks5h://127.0.0.1:9050',
|
||||
'https': 'socks5h://127.0.0.1:9050'
|
||||
'http': f'{tor_host}:{tor_port}',
|
||||
'https': f'{tor_host}:{tor_port}'
|
||||
}
|
||||
|
||||
instancepath=rootpath+'www/participants/'+instance+'/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue