Skip to content
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 exception handler for read timeouts #10

Closed
wants to merge 1 commit into from

Conversation

PeterMosmans
Copy link

Added a basic exception handler for timeouts from the requests module.

@SamJoan
Copy link
Owner

SamJoan commented Jun 8, 2016

Hi @PeterMosmans

thanks for your contribution, I will look into it before droopescan's next release. Any ideas on why tests are failing for this branch?

If you could add tests for the new functionality that'd be awesome too

@PeterMosmans
Copy link
Author

Hi @droope , thanks. I haven't looked at tests (yet), and I'm unsure as to why the tests are failing. Does your code expects a different error (assertion) when no connection can be made ?

@SamJoan
Copy link
Owner

SamJoan commented Jun 12, 2016

Hi

I think the tests are failing because functionality is failing. If I scan an example site with your branch of the plugin:

[root@debian-dev droopescanpeter (timeouthandler)]# ./droopescan scan -u www.example.org -n 100 -e p
[+] Accepted redirect to https://www.example.org/
[+] Site identified as drupal.
[+] No plugins found.

With the master branch:

[root@debian-dev droopescan (master)]# ./droopescan scan -u www.example.org -n 100 -e p
[+] Accepted redirect to https://www.example.org/
[+] Site identified as drupal.
[+] Plugins found:
    views https://www.example.org/sites/all/modules/views/
        https://www.example.org/sites/all/modules/views/README.txt
        https://www.example.org/sites/all/modules/views/LICENSE.txt
    ctools https://www.example.org/sites/all/modules/ctools/
        https://www.example.org/sites/all/modules/ctools/CHANGELOG.txt
        https://www.example.org/sites/all/modules/ctools/API.txt
    [SNIP..]

I think giving a warning instead of throwing an exception would be in line with how droopescan operates (e.g. with 500 errors), so if you add a test and fix the error I'm happy to merge it. The test is likely to be similar to this one: https://github.com/droope/droopescan/blob/master/dscan/tests/base_http_tests.py#L440

@SamJoan SamJoan mentioned this pull request Jan 22, 2017
@SamJoan
Copy link
Owner

SamJoan commented Jun 18, 2017

Hi

I've implemented the change you requested (a warning instead of a immediate failure on read timeouts.)

The code changes will be present on droopescan's next release.

@SamJoan SamJoan closed this Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants