GerbenJavado / LinkFinder

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

-i (--input) does not work with wildcards when using in path to folder: /path/to/folder/*.js #34

Closed bl4de closed 6 years ago

bl4de commented 6 years ago

Hi Gerben, I hope you're well :)

I found a small issue in -i option. When I pass as an argument a path to the folder with JavaScript files using wildcard:

$ ./linkfinder.py -i ~/hacking/bugbounty/Valve/store.steampowered.com/*.js

I get the following error:

linkfinder.py: error: unrecognized arguments: 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/dynamicstore.js 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/home.js 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/jquery-1.8.3.min.js 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/main.js 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/shared_global.js 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/shared_responsive_adapter.js 
/Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/tooltip.js

When I call single file from this folder, LinkFinder works like a charm:

$ ./linkfinder.py --input ~/hacking/bugbounty/Valve/store.steampowered.com/cluster.js

Running against: /Users/bl4de/hacking/bugbounty/Valve/store.steampowered.com/cluster.js

Let me know if you need any additional information about this issue

Regards,

bl4de

GerbenJavado commented 6 years ago

Hi bl4de,

Im aware of this issue. LinkFinder has been written in such a way that you need to use single quote when referencing an asterisk like: ./linkfinder.py -i '~/hacking/bugbounty/Valve/store.steampowered.com/*.js'. If you know a way to fix this I'd be happy to implement it, but else I would suggest you to use this method.

Regards, Gerben

bl4de commented 6 years ago

Hi Gerben,

I'll try to take a look at this issue, maybe I will find a way to fix this. If yes, I'll send a PR :)

Regards,

bl4de

GerbenJavado commented 6 years ago

Thanks! Also for being alert on issues and reporting them.

bl4de commented 6 years ago

You're welcome! We should help each other, I think. Especially, if we use tools made by them :)