xnl-h4ck3r / GAP-Burp-Extension

Burp Extension to find potential endpoints, parameters, and generate a custom target wordlist
1.2k stars 131 forks source link

Fix to issue: GAP doesn't collect words properly with "-" #21

Closed bebiksior closed 1 year ago

bebiksior commented 1 year ago

I've noticed that GAP doesn't collect words properly from URL paths that look like this: /api/custom-polls/home/pending-draft-polls-count

Old version collects only the following words: api,custom,pools,home,pending,draft,polls,count

It should collect the following words: api,custom-pools,custom,pools,home,pending-draft-polls-count,pending,draft,count

I've made a fix for this issue, although it needs further testing.

xnl-h4ck3r commented 1 year ago

Hey @bebiksior To have the fix you suggested and also deal with commas to split on those, we could do this:

            # Split the URL on /
            words = set(re.compile(r"[\:/?=\-&#]+", re.UNICODE).split(path) + path.split('/'))
            temp = []
            for x in words:
                temp.extend(x.split(","))
            words = set(temp)

Maybe there's a better way, not sure. What do you thik? If you want to change the pull request to this, then I'll accept it and gte it in there (or if there's a better more efficient way, even better). I'm releasing a big update to GAP in a few weeks so I can inculde this in there anyway if you don't get around to changing the pull request. Thanks again!

bebiksior commented 1 year ago

Hey! I don't see a better way to do this. I updated the code in the pull request. Thanks for making GAP :-)