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

Possible Bug at Handling Exception on Regex Grepping #26

Closed
arbazkiraak opened this issue Feb 14, 2019 · 3 comments
Closed

Possible Bug at Handling Exception on Regex Grepping #26

arbazkiraak opened this issue Feb 14, 2019 · 3 comments

Comments

@arbazkiraak
Copy link

Hello @wagiro

  • We have option to add the regex based patterns under response Tab, Problem here is if any one of regex pattern is invalid/broken then tool will stop scanning rest of the requests.

  • I Tried this in Passive Response Scanning , Please let me know if you are able to reproduce this.

While processing the regex based patterns, give a try & catch exception handling rule to throw the errors directly to stderr of the extension so that we can fix the broken regex pattern.

@wagiro
Copy link
Owner

wagiro commented Feb 14, 2019

Hi @arbazkiraak !

Yes it's a bug, because I don't handle the exception. Next Monday I will release new version with cool improvements, and this issue fixed.

Thanks for the issue!

@wagiro
Copy link
Owner

wagiro commented Feb 14, 2019

Hi @arbazkiraak ,

I solved this bug. The new code looks like:

try {
    if (excludeHTTP && !onlyHTTP) {
        beginAt = responseInfo.getBodyOffset();
        p = Pattern.compile(grep);
        m = p.matcher(responseString);
    } else if (!excludeHTTP && onlyHTTP) {
        p = Pattern.compile(grep);
        m = p.matcher(headers);
    } else {
        p = Pattern.compile(grep);
        m = p.matcher(responseString);
    }
} catch(PatternSyntaxException pse){
    callbacks.printError("Incorrect regex: "+ pse.getPattern());
    return null;    
}

Thanks!

@wagiro wagiro closed this as completed Feb 14, 2019
@arbazkiraak
Copy link
Author

Hi @wagiro ,

That was so quick, Hopefully, it will fix the issue, however, I noticed few other bugs related to regex based scanning. But before i need to confirm it though the latest version or fix of above exception handling rule.

I Suggest you to maintain a development/Alpha version of Burp Bounty along with Beta release.

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

No branches or pull requests

2 participants