Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
close_all_circuits.py | H A D | 03-May-2022 | 919 | 28 | 24 | |
connect.py | H A D | 03-May-2022 | 731 | 27 | 17 | |
disallow_streams_by_port.py | H A D | 03-May-2022 | 2 KiB | 71 | 48 | |
dns_lookups.py | H A D | 03-May-2022 | 701 | 21 | 17 | |
hidden_echo.py | H A D | 03-May-2022 | 1 KiB | 37 | 18 | |
launch_tor.py | H A D | 03-May-2022 | 1.9 KiB | 61 | 40 | |
launch_tor2web.py | H A D | 03-May-2022 | 1.3 KiB | 50 | 32 | |
launch_tor_endpoint.py | H A D | 03-May-2022 | 3.4 KiB | 92 | 44 | |
launch_tor_endpoint2.py | H A D | 03-May-2022 | 1.4 KiB | 54 | 27 | |
launch_tor_unix_sockets.py | H A D | 03-May-2022 | 2 KiB | 61 | 47 | |
launch_tor_with_simplehttpd.py | H A D | 03-May-2022 | 4.5 KiB | 148 | 96 | |
minimal_endpoint.py | H A D | 03-May-2022 | 340 | 12 | 8 | |
monitor.py | H A D | 03-May-2022 | 924 | 28 | 18 | |
readme.py | H A D | 03-May-2022 | 1.3 KiB | 48 | 37 | |
readme2.py | H A D | 03-May-2022 | 1.2 KiB | 44 | 35 | |
stem_relay_descriptor.py | H A D | 03-May-2022 | 1.9 KiB | 51 | 27 | |
stream_circuit_logger.py | H A D | 03-May-2022 | 2.5 KiB | 84 | 58 | |
tor_info.py | H A D | 03-May-2022 | 2.6 KiB | 91 | 52 | |
txtorcon.tac | H A D | 31-May-2018 | 1.6 KiB | 52 | 40 | |
web_client.py | H A D | 03-May-2022 | 1.5 KiB | 43 | 26 | |
web_client_authenticated.py | H A D | 03-May-2022 | 1.8 KiB | 54 | 32 | |
web_client_custom_circuit.py | H A D | 03-May-2022 | 3 KiB | 85 | 50 | |
web_client_treq.py | H A D | 03-May-2022 | 1.1 KiB | 41 | 29 | |
web_onion_service_aiohttp.py | H A D | 03-May-2022 | 3.8 KiB | 108 | 61 | |
web_onion_service_endpoints.py | H A D | 03-May-2022 | 3.3 KiB | 68 | 27 | |
web_onion_service_ephemeral_auth.py | H A D | 03-May-2022 | 2 KiB | 68 | 44 | |
web_onion_service_ephemeral_nonanon.py | H A D | 03-May-2022 | 1.7 KiB | 59 | 34 | |
web_onion_service_ephemeral_unix.py | H A D | 03-May-2022 | 1.8 KiB | 59 | 33 | |
web_onion_service_filesystem.py | H A D | 03-May-2022 | 2.2 KiB | 69 | 42 | |
web_onion_service_prop224.py | H A D | 03-May-2022 | 1.6 KiB | 54 | 31 | |
web_onion_service_prop224_endpoints_file.py | H A D | 03-May-2022 | 1.7 KiB | 53 | 29 | |
webui_server.py | H A D | 03-May-2022 | 3.5 KiB | 98 | 56 |
readme.py
1from twisted.internet.task import react 2from twisted.internet.defer import ensureDeferred 3from twisted.internet.endpoints import UNIXClientEndpoint 4 5import treq 6import txtorcon 7 8 9async def main(reactor): 10 tor = await txtorcon.connect( 11 reactor, 12 UNIXClientEndpoint(reactor, "/var/run/tor/control") 13 ) 14 15 print("Connected to Tor version {}".format(tor.version)) 16 17 url = u'https://www.torproject.org:443' 18 print(u"Downloading {}".format(repr(url))) 19 resp = await treq.get(url, agent=tor.web_agent()) 20 21 print(u" {} bytes".format(resp.length)) 22 data = await resp.text() 23 print(u"Got {} bytes:\n{}\n[...]{}".format( 24 len(data), 25 data[:120], 26 data[-120:], 27 )) 28 29 print(u"Creating a circuit") 30 state = await tor.create_state() 31 circ = await state.build_circuit() 32 await circ.when_built() 33 print(u" path: {}".format(" -> ".join([r.ip for r in circ.path]))) 34 35 print(u"Downloading meejah's public key via above circuit...") 36 config = await tor.get_config() 37 resp = await treq.get( 38 u'https://meejah.ca/meejah.asc', 39 agent=circ.web_agent(reactor, config.socks_endpoint(reactor)), 40 ) 41 data = await resp.text() 42 print(data) 43 44 45@react 46def _main(reactor): 47 return ensureDeferred(main(reactor)) 48
readme2.py
1# this is a Python2 version of the code in readme.py 2from twisted.internet.task import react 3from twisted.internet.defer import inlineCallbacks 4from twisted.internet.endpoints import UNIXClientEndpoint 5import treq 6import txtorcon 7 8 9@react 10@inlineCallbacks 11def main(reactor): 12 tor = yield txtorcon.connect( 13 reactor, 14 UNIXClientEndpoint(reactor, "/var/run/tor/control") 15 ) 16 17 print("Connected to Tor version {}".format(tor.version)) 18 19 url = 'https://www.torproject.org:443' 20 print("Downloading {}".format(url)) 21 resp = yield treq.get(url, agent=tor.web_agent()) 22 23 print(" {} bytes".format(resp.length)) 24 data = yield resp.text() 25 print("Got {} bytes:\n{}\n[...]{}".format( 26 len(data), 27 data[:120], 28 data[-120:], 29 )) 30 31 print("Creating a circuit") 32 state = yield tor.create_state() 33 circ = yield state.build_circuit() 34 yield circ.when_built() 35 print(" path: {}".format(" -> ".join([r.ip for r in circ.path]))) 36 37 print("Downloading meejah's public key via above circuit...") 38 resp = yield treq.get( 39 'https://meejah.ca/meejah.asc', 40 agent=circ.web_agent(reactor, tor.config.socks_endpoint(reactor)), 41 ) 42 data = yield resp.text() 43 print(data) 44