summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonymous <anonymous@gmail.com>2019-02-01 00:57:33 -0500
committeranonymous <anonymous@gmail.com>2019-02-01 00:57:33 -0500
commit19981f3f5f83f7f2567c6550611cc655453ed489 (patch)
treee178991295acb9bc2d743e5da685516e0955a942
parent4f4b8a3e1f619e16914a51b34c216d6eff8297a0 (diff)
parent4eb3014f95218899e0b2c8e4ed1deb2a11a8b6b3 (diff)
downloadcloudflare-tor-19981f3f5f83f7f2567c6550611cc655453ed489.tar
cloudflare-tor-19981f3f5f83f7f2567c6550611cc655453ed489.tar.gz
cloudflare-tor-19981f3f5f83f7f2567c6550611cc655453ed489.tar.lz
cloudflare-tor-19981f3f5f83f7f2567c6550611cc655453ed489.tar.xz
cloudflare-tor-19981f3f5f83f7f2567c6550611cc655453ed489.zip
Merge branch 'master' of http://notabug.org/themusicgod1/cloudflare-tor
-rw-r--r--globalist/README.md4
-rwxr-xr-xglobalist/globalist/__init__.py14
-rw-r--r--globalist/globalist/__pycache__/__init__.cpython-36.pycbin0 -> 9716 bytes
3 files changed, 14 insertions, 4 deletions
diff --git a/globalist/README.md b/globalist/README.md
index 8b07a23b..30cb1525 100644
--- a/globalist/README.md
+++ b/globalist/README.md
@@ -13,10 +13,10 @@ The official repository can be found at https://notabug.org/themusicgod1/cloudfl
## Usage
-To use Globalist.py python3 is needed. Either run with `python3 Globalist.py` or install it as described below.
+To use Globalist.py python3 is needed. Either run it from globalist directory with `python3 Globalist.py` or or install it as described below.
Per default an open tor ControlPort at 9151 without authentication is expected. You can choose another port with `-C`.
-For a list of options see `--help`.
+For a list of option see `--help`.
### Create repository
diff --git a/globalist/globalist/__init__.py b/globalist/globalist/__init__.py
index 95bc0707..d1326dc0 100755
--- a/globalist/globalist/__init__.py
+++ b/globalist/globalist/__init__.py
@@ -248,7 +248,7 @@ def clone(config):
where += ".git"
how = ["--bare", "--mirror"]
- cloneproc = subprocess.Popen(["torsocks", "-P", STATUS['socksport'], "git", "clone"] + how + [what, where])
+ cloneproc = subprocess.Popen(["torsocks", "-P", str(STATUS['socksport']), "git", "clone"] + how + [what, where])
if cloneproc.wait() != 0:
print ("Error cloning, exiting.")
return -1
@@ -336,6 +336,12 @@ def main(args=[]):
opt.add_option("-C", "--control-port", dest="a_controlport", action="store", type="int",
default=9151, metavar="PORT", help="Tor controlport")
+# opt.add_option("-CP", "--control-password", dest="a_controlpassword", action="store", type="int",
+# default="", help="Tor Control Password")
+
+# opt.add_option("-CC", "--control-cookie", dest="a_controlcookie", action="store", type="int",
+# default="", help="Tor Control Cookie")
+
opt.add_option("-a", "--await", dest="o_ap", action="store_true",
default=False, help="await publication of .onion in DHT before proceeding")
@@ -362,9 +368,13 @@ def main(args=[]):
options.a_controlport = DEFAULT_CONTROLPORT
# Extract socksport via c.get_conf and use this (-P in torsocks)
+ # TODO implement authentication token / cookie
controller = Controller.from_port(port = options.a_controlport)
controller.authenticate()
- STATUS['socksport'] = controller.get_conf('SocksPort').split(" ",1)[0]
+ if controller.get_conf('SocksPort'):
+ STATUS['socksport'] = controller.get_conf('SocksPort').split(" ",1)[0]
+ else:
+ STATUS['socksport'] = 9050
controller.close()
config = cp.ConfigParser()
diff --git a/globalist/globalist/__pycache__/__init__.cpython-36.pyc b/globalist/globalist/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 00000000..fc0520c6
--- /dev/null
+++ b/globalist/globalist/__pycache__/__init__.cpython-36.pyc
Binary files differ