-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for basic authentication #45
Conversation
protected (demo purposes or whatever)
Nice one :) Just a few things :
if !params.has_key?(:headers)
params = params.merge(:headers => {'Authorization' => @basic_auth})
elsif !params[:headers].has_key?('Authorization')
params[:headers]['Authorization'] = @basic_auth
|
Fixed the firmer twos... On 18 October 2012 15:12, erwanlr [email protected] wrote:
$ cd /pub The blog that fills the gap between appsec and developers: |
There is no Rakefile (I'll add later). How do you run the spec suite? |
Just type "rspec" into the root dir of wpscan :) You may have to install some gems : rspec, webmock and simplecov |
Actually it was easier than expected. However I was able to write a test for the has_basic_auth? method but I was not able to write the test that says, if the site returns 401, than add a basic_auth to wp_target and then the site whould return 200. :-( |
@erwanlr do you have any pointers on this? my rspec knowledge is pretty limited too, I need to learn. :) |
Another question guys... is there some background decision on about not creating wpscan as a rubygem? I think packing the scanner in a standard rubish CLI way can be a great deal don't you? |
Opened an issue. :) |
Great @ethicalhack3r I'll work on it |
For rpsec, you have only 2 more tests to do :
You can check if you cover your code by opening coverage/index.html after running rspec an then clicking on the file where your code is :) |
Do not forget to modify the readme in order to include the new option :) |
Basic auth done, just need to update the readme |
Done (i forgot to reference the commits :x) |
Awesome! :D |
Sorry for being SO LATE in writing the file your requested. I just became father for the second time and I started working real hard on codesake |
No problem :) |
Hi there... sometimes it happens that web agencies publish their wordpress powered website on the Internet using Basic Authentication to protected the blog in the "pre release" moments.
In order to be able to test a wp site even if password protected I add the -b option having the "username:password" parameter.