From e2b1486ea11ff0d3630fdf0bf0e222d26a970225 Mon Sep 17 00:00:00 2001 From: BlenderDumbass Date: Wed, 27 Nov 2024 17:25:07 +0200 Subject: [PATCH] You can add a tor reference link --- modules/Render.py | 7 +++++++ modules/Set.py | 22 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/modules/Render.py b/modules/Render.py index 16d1970..7e8178a 100644 --- a/modules/Render.py +++ b/modules/Render.py @@ -92,6 +92,13 @@ def head(title="", description="", image="", config={}, author=""): """ + # Tor tags. + + tor = config.get("tor", "") + if tor: + if not tor.startswith("http://"): tor = "http://"+tor + html = html + '' + html = html + """ diff --git a/modules/Set.py b/modules/Set.py index 1b08db2..ee0d75f 100644 --- a/modules/Set.py +++ b/modules/Set.py @@ -83,7 +83,17 @@ def Set(): Domain(domain) except Exception as e: - print(clr["bold"]+clr["tdrd"]+"Error:"+clr["norm"]+" Didn't specify the domain.", e) + print(clr["bold"]+clr["tdrd"]+"Error:"+clr["norm"]+" Didn't specify the domain.") + print('Use: $ python3 run.py --set --domain blenderdumbass.org') + + if "--tor" in sys.argv: + try: + domain = sys.argv[ sys.argv.index("--tor") + 1] + if "--" in domain: 1/0 # Failing this for the error message. + Tor(domain) + + except Exception as e: + print(clr["bold"]+clr["tdrd"]+"Error:"+clr["norm"]+" Didn't specify the tor domain.") print('Use: $ python3 run.py --set --domain blenderdumbass.org') @@ -167,6 +177,16 @@ def Domain(domain): print(clr["bold"]+clr["tbyl"]+domain+clr["norm"]+" is set as domain.") +def Tor(domain): + + data = Load() + data["tor"] = domain + + Save(data) + + print(clr["bold"]+clr["tbyl"]+domain+clr["norm"]+" is set as tor domain.") + + def Port(port): data = Load()