maaaaz / webscreenshot

A simple script to screenshot a list of websites
GNU Lesser General Public License v3.0
653 stars 162 forks source link

Issue in URL Pre-Formatter prefixes https protocol when port is 443 although http is provided #30

Closed fededamian closed 4 years ago

fededamian commented 4 years ago

When webscreenshot is supplied a list of URLs and one of them is http://domain.com:443, notice the http protocol instead of https, the formatter changes the http protocol to https.

Example (the real domain was changed to domain.com):

webscreenshot -vv http://domain.com:443
[INFO][General] 'http://domain.com:443' has been formatted as 'https://domain.com:443' with supplied overriding options

I understand that 443 is the port typically used for https, but it is also possible to run http, or even any other protocol on 443, and I've seen cases doing recon of this happening, http (not https) on 443.

When someone supplies a list already providing the protocol and the port, I believe it doesn't make sense to run the pre formatter.

maaaaz commented 4 years ago

Hello @fededamian,

You're right, I thought I had handled that case but it seems not. I'll fix it.

Cheers.

fededamian commented 4 years ago

Thanks so much for the fast answer, i am not confident of my Python to submit a PR myself. Great tool by the way!

maaaaz commented 4 years ago

Hello there,

It is now fixed in v2.6, tell me if not:

$ python3 webscreenshot.py -vv 'http://toto.fr:443'
webscreenshot.py version 2.6
...
[INFO][General] 'http://toto.fr:443' has been formatted as 'http://toto.fr:443' with supplied overriding options
...

Cheers