nahamsec / JSParser

783 stars 178 forks source link

[PROBLEM] Can't parse https link #14

Closed shadowzoom closed 6 years ago

shadowzoom commented 7 years ago

Hello there! When i'm trying to parse https link (https://vk.com/js/cmodules/web/audioplayer.js), i'm getting error.

"error: (60, 'SSL certificate problem: self signed certificate in certificate chain') ERROR:tornado.access:500 POST /parse/ajax (::1) 629.00ms" How i can fix it?

ziot commented 7 years ago

You can disable SSL verification or update your crt list. Disabling SSL verify could make you susceptible to man-in-the-middle attacks.

The safeurl code is using pycurl, so you can just setopt to disable verification. I didn't test it, but you should be able to put this around line 178 before sc.execute:

sc._handle.setopt(pycurl.SSL_VERIFYPEER, 0) sc._handle.setopt(pycurl.SSL_VERIFYHOST, 0)

More infos: https://stackoverflow.com/questions/8332643/pycurl-and-ssl-cert