Not working in custom favicon directory scenario
Is your feature request related to a problem? Please describe. Tool is really good, but it seems not working in some scenarios, like if a site has placed it's favicon.ico file in a directory (Example: http://example[.]com/images/favicon.ico), tool will miss out the favicon. So instead of statically requesting just favicon.ico, it is recommend to first locate the path of favicon.ico in the source and then request it.
Describe the solution you'd like The Tool should grep for .ico extension in page source, and then request that path for catching actual favicon.ico file
Hi @Kr1shna4garwal , thanks for your contribution!
I thought about that, I was putting the effort in increasing the size of the database . can you provide an example of URLs to test this functionality once implemented?
thanks
Hi @edoardottt, I have one such example url: https://drata.com/images/favicon.ico Current version is unable to fetch this favicon
Thanks :) Do you have any advice on how to obtain html tag values? I'd like to avoid any regex et similia... I'd prefer parsing html and get an exact value.
Hello @edoardottt,
I'm not a Golang programmer, So I don't much knowledge in Go
But in general, I think steps should be:
- send a GET request to "/"
- parse it using golang html library
- Loop through each token -> extract the attribute's value if attribute's key is href
- Filter the results to match for .ico extension
- extract the value
- request the exact path
- Then do further processing with that
It may not the best solution. Now the tool performs 1 request per target. with that solution all of the targets will get 2 requests, resulting in double time and resources needed. If the vast majority of the domains use /favicon.ico, this is definitely not a good solution.
That's right, It maybe not the best solution but still we can implement it in different way! Like we can first check for /favicon.ico (Primary option), If found it will process it (1 request). If not found, then it will make 2 requests (1st request to find .ico path in page source, then 2nd to request and process that favicon.ico path). This way I believe tool's efficiency and usefulness both will be maintained. Currently no favicon analysis tool is doing this job.
I agree @Kr1shna4garwal . I was thinking the same. issue prioritized:)
Like we can first check for /favicon.ico (Primary option), If found it will process it (1 request).
The doubt here is how we can check if the favicon is found? Maybe the content-type must be image/x-icon ?
I'm thinking if the second option would be the best in any case