aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-03-24 01:08:25 +0000
committerNick Mathewson <nickm@torproject.org>2005-03-24 01:08:25 +0000
commit0cfdeb01c87b9958f0f6eee5c318213b9f4f32ac (patch)
treefa5f92726ab2e45fc0e3dc300850abbb4a05e7c9 /contrib
parent2930a3eef0df59876aa8dc99bedb2cdfdb9cdcaf (diff)
downloadtor-0cfdeb01c87b9958f0f6eee5c318213b9f4f32ac.tar
tor-0cfdeb01c87b9958f0f6eee5c318213b9f4f32ac.tar.gz
Debug EXTENDCIRCUIT
svn:r3849
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/tor-control.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/tor-control.py b/contrib/tor-control.py
index cdfdc0526..72333a4c3 100755
--- a/contrib/tor-control.py
+++ b/contrib/tor-control.py
@@ -201,6 +201,12 @@ def map_address(s, kv):
tp, body = receive_reply(s,[MSG_TYPE_DONE])
return _parseKV(body)
+def extend_circuit(s, circid, hops):
+ msg = struct.pack("!L",circid) + ",".join(hops) + "\0"
+ send_message(s,MSG_TYPE_EXTENDCIRCUIT,msg)
+ tp, body = receive_reply(s,[MSG_TYPE_DONE])
+ return body
+
def listen_for_events(s):
while(1):
_,type,body = receive_message(s)
@@ -225,6 +231,7 @@ def do_main_loop(host,port):
("1.2.3.4", "foobaz.com"),
("frebnitz.com", "5.6.7.8"),
(".", "abacinator.onion")])`
+ print `extend_circuit(s,0,["moria1"])`
send_signal(s,1)
#save_conf(s)