Array of proxys, array of user agent in argument
Hi,
I'm still on my way hacking arachni-scanner for seo audit. One common thing in such audits is changing user-agent and ip to test the website reaction.
As I can see it in the options and http class there is no way to choose a proxy or user agent dynamicly.
I think that providing a path to a proxy list / user agent list in addition of the classical arg --proxy and --user-agent could be a good thing.
Then in http class detect if there is an array of proxy / user-agent and then use a array.sample to change the proxy (or use an array rotation)
I know that this will cause trouble with the sessions but maybe there is a simple solution.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Tasos Laskos on 05 Oct, 2012 02:56 PM
I've got good news and bad news...
Bad news:
Good news:
So basically you can do what you want from your plugin using something like:
Sound good?
Support Staff 2 Posted by Tasos Laskos on 05 Oct, 2012 02:58 PM
Forgot to mention that it won't affect the session as cookies will remain intact -- unless the web devs decided to depend on the IP address or the User-Agent for session maintenance for some reason.
Tasos Laskos closed this discussion on 05 Oct, 2012 02:58 PM.
Beunwa re-opened this discussion on 05 Oct, 2012 03:06 PM
3 Posted by Beunwa on 05 Oct, 2012 03:06 PM
that's good news :)
Tasos Laskos closed this discussion on 05 Oct, 2012 03:07 PM.
beunwa re-opened this discussion on 05 Nov, 2012 01:23 PM
4 Posted by beunwa on 05 Nov, 2012 01:23 PM
This work fine a month ago, but now it seems like the
http.add_on_queue
was never called :( .I use the distributed crawl branch, maybe its a clue.
I call arachni this way :
bundle exec arachni http://mysite.tld --module=- -g --plugin=submarine
This is my plugin :
` class Arachni::Plugins::Submarine < Arachni::Plugin::Base
end
`
Support Staff 5 Posted by Tasos Laskos on 05 Nov, 2012 01:37 PM
Nice catch, will sort it out today.
Support Staff 6 Posted by Tasos Laskos on 05 Nov, 2012 04:04 PM
First of all, your plugin had some issues, here's a cleaned up version:
Secondly, did you expect to run a distributed crawl using the command you mentioned?
Because that won't happen, the
arachni
CLI will just run a simple single-node direct scan.To perform a distributed use this code example: https://github.com/Arachni/arachni/issues/207#issuecomment-10066220
Just to be clear, I'm not sure how it'll work with a distributed scan because I haven't gotten to that point yet.
And to be even clearer I didn't actually test the code I pasted either but it looks about right.
7 Posted by Beunwa on 05 Nov, 2012 04:44 PM
Nice refactoring, your my master !
2 details :
framework.resume
is needed at the end of prepare, if not the crawl never startstart( 'www.google.com' )
instead ofstart( 'http://www.google.com' )
, if not it give error 400 (dunno why, didnot take the time to check)For the moment I just use it like before with just a single node, and with the 2 above adjustement it work like a charm !
Feel free to distribute this plugin if you want, it can be very usefull (it is for me)
Support Staff 8 Posted by Tasos Laskos on 05 Nov, 2012 04:58 PM
Lol my bad, that method should have been called
clean_up
so do putframework.resume
there to be safe, otherwise you might miss some requests.As for these sort of plugins working properly with the new crawler I'll take care of that tomorrow.
However, I don't like to encourage people to use proxies with Arachni so I won't be including it in the repo.
Support Staff 9 Posted by Tasos Laskos on 06 Nov, 2012 04:40 PM
OK, fixed the problem, plugins are now distributed properly even during the crawl phase.
Of course, the code is still considered unstable so if you come across issues please let me know.
Tasos Laskos closed this discussion on 06 Nov, 2012 04:40 PM.