GerbenJavado / LinkFinder

A python script that finds endpoints in JavaScript files
https://gerbenjavado.com/discovering-hidden-content-using-linkfinder
MIT License
3.7k stars 595 forks source link

Add possible rest endpoint to regex #50

Closed Bankde closed 4 years ago

Bankde commented 5 years ago

I have noticed that many REST API endpoints do not contain any extension For example:

constant("API_ENDPOINT_TEAM_MEMBERSHIPS","api/team_memberships")

So I have updated the regex and also add simple unit test.

I also change (?:[\?|/][^"|']{0,}|)) to this (?:[\?|#][^"|']{0,}|)) I don't remember why we need trailing /. I think ? or # make more sense.

Bankde commented 5 years ago

Any comment on this PR ? This PR will fix what it could have missed as in the above example.