Comments (5)
You need a custom version of torsocks for this to work because exitmap relies on torsocks's source port to figure out what stream to attach it to. A long time ago, I forked torsocks and added the patch:
NullHypothesis/torsocks@e8b3fe6
Torsocks's maintainer also mentioned that he's interested in merging this patch, but that might take a while. Sorry that there's no better way at the moment.
I'll keep this ticket open for now because I should add some information on this, so the next person won't have to spend as much time as you did.
from exitmap.
Alright I removed the version of torsocks I had and compiled yours.
git clone -b print_source https://github.com/NullHypothesis/torsocks.git
cd torsocks
./autogen.sh
./configure
make
make check
sudo make install
I did have compile errors relating to LIBC_NAME but I just manually put it in.
One of the test cases test_dns uses sergii.torproject.org which doesnt exist anymore but I guess these two problems wouldn't happen if it was on the current version of torsocks.
To get the output working properly I had to change the torsocks log level in commad.py from 5 to 1.
os.environ["TORSOCKS_LOG_LEVEL"] = "1"
Now I can do commands like pwd and whatnot and get the output, problem is can't seem to get the same result from curl.
Using this:
run_cmd_over_tor.execute(['curl','-s','https://check.torproject.org/api/ip'],output_callback=print_callback)
I get no output which is weird cos
torsocks curl https://check.torproject.org/api/ip
works just fine. Suggestions?
from exitmap.
To get the output working properly I had to change the torsocks log level in commad.py from 5 to 1.
os.environ["TORSOCKS_LOG_LEVEL"] = "1"
Perhaps that's the issue. If I remember correctly, it's set to 5 so that exitmap can see the debug log message that my torsocks patch triggers. If that log message does not show up on stdout, it won't work.
Apart from that, I'm not sure what could be the issue. In a first step, I would make sure that the patch applied correctly. You should now be able to see the debug log messages of the form "Connection on fd %d originating from %s:%u".
from exitmap.
I found the problem, my callback function has to return True to continue getting output otherwise it just prints the first line of output.
from exitmap.
Closing because meme-lord managed to fix the issue.
from exitmap.
Related Issues (20)
- Add module to verify a relay's exit policy HOT 1
- Increase test coverage HOT 3
- Failed to attach stream because of unknown circuit.
- Handle multiple parallel instances better HOT 1
- Log which circuits failed during scan. HOT 3
- Inform users that it can take a while to bootstrap HOT 1
- Warn user when Stem version is too old HOT 4
- Use OONI's format for reports
- Improve transparent HTTP proxy detection with SSL test on port 80
- Detect Tor Exit doing sniffing by passively detecting unique DNS query (via HTML & PCAP parsing/viewing) HOT 6
- [Bug]Check server timeout /Exit node timeout leading to false negative HOT 7
- ValueError: Extra-info digests should consist of forty hex digits HOT 1
- /tmp/pymp-XXX directories not always cleaned up HOT 3
- Use Tor Browser programmatically for scanning HOT 1
- Dnspoison module requires dnspython as a requirement HOT 1
- Pep8 Violations HOT 1
- Exitmap fails when circuits are "overused" HOT 4
- Making it compatible with Whonix HOT 4
- dnspoison module: IPv6 addresses cause false positives HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exitmap.