Comments (7)
I'd like to take a crack at this; any suggestions/starting point/hints?
from exitmap.
Python's argparse module allows sub commands, which is probably what we need here:
https://docs.python.org/2.7/library/argparse.html#sub-commands
The idea is that modules can define their own sub commands that are then loaded by the main argument parsing code. That's all I have, unfortunately, so you will have to experiment a bit.
from exitmap.
I've run into a problem here. As I understand, this is what the call should look like for parameterised modules(just an example):
./bin/exitmap --first-hop CCEF02AA454C0AB0FE1AC68304F6D8C4220C1912 dns -d www.example.com 1.2.3.4 www.foobar.com 11.22.33.44 checktest
As we want to take multiple values for -d, i.e. multiple custom domains and IP addresses for dns, it takes checktest as a parameter for -d, which is a problem.
There is probably no elegant way to do this in the exitmap.py itself using subparsers.
It will have to be done like this:
./bin/exitmap dns -d www.example.com 1.2.3.4 www.foo.com 5.6.7.8 -- checktest
or by calling the script twice
./bin/exitmap dns -d www.example.com 1.2.3.4 www.foo.com 5.6.7.8
./bin/exitmap checktest
Plus, I then have to name all modules while writing the sub-parsers, and thus the parser will need to be modified every time a module is to be added or deleted.
A solution I can think of can be to parse the command-line arguments to the modules in the module itself, i.e. parse_known_args()
in exitmap.py
, and parse the remaining_argv
in their respective modules.
What do you think?
from exitmap.
Could you give here a list parameters to the modules? So far you have given only an example and I would like to know the parameters to be able to code them.
from exitmap.
For the DNS module, I think we would certainly like a destination
argument. That would also come in handy for the cloudflared module. We could also create an argument for the patchingCheck module, to instruct it to download arbitrary files.
It would be great if we could take the current values as default values, if no module argument is given.
from exitmap.
Can I proceed on this using optparse?
from exitmap.
Can I proceed on this using optparse?
Feel free to give it a shot!
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
- run_cmd_over_tor lacking examples HOT 5
- 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.