N
N
Nurba Nurba2017-06-17 10:18:17
PHP
Nurba Nurba, 2017-06-17 10:18:17

How to parse sites if the certificate is broken?

Good afternoon . I use the assembly from xampp. Tried different versions of php. Doesn't want to parse sites with broken certificates.
Warning: Module 'openssl' already loaded in Unknown on line 0? And does not load the site document.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></head>
<title>You are being redirected...</title>
<body>
<noscript>Javascript is required. Please enable javascript before you are allowed to see this page.</noscript>
<script>var s={},u,c,U,r,i,l=0,a,e=eval,w=String.fromCharCode,sucuri_cloudproxy_js='',S='Yz0nbU8yJy5jaGFyQXQoMikrIjJzdSIuc2xpY2UoMCwxKSArICIiIC
siOHUiLmNoYXJBdCgwKSArICIiICtTdHJpbmcuZnJvbUNoYXJDb2RlKDB4MzcpICsgICcnICsnUjInLnNsaWNlKDEsMikrU3RyaW5nLmZyb21DaGFyQ29kZSg1MykgKyAgJycgKycnKyc7d
Tc4Jy5zdWJzdHIoMywgMSkgKyAnJyArIApTdHJpbmcuZnJvbUNoYXJDb2RlKDU3KSArIFN0cmluZy5mcm9tQ2hhckNvZGUoNTYpICsgICcnICsgCiJmc3UiLnNsaWNlKDAsMSkgKyAiOXAi
LmNoYXJBdCgwKSArICcxZCcuc2xpY2UoMSwyKSsiIiArIjEiLnNsaWNlKDAsMSkgKyAneTk2Jy5jaGFyQXQoMikrICcnICsgCiJibyIuY2hhckF0KDApICsgU3RyaW5nLmZyb21DaGFyQ29
kZSg1NikgKyAiZiIgKyAiYSIgKyAgJycgK1N0cmluZy5mcm9tQ2hhckNvZGUoNTcpICsgIjgiICsgImIiLnNsaWNlKDAsMSkgKyAiYiIgKyAgJycgKycnKyJhIiArICdqSjQnLmNoYXJBdC
gyKSsgJycgKycnKyc5clQwJy5zdWJzdHIoMywgMSkgKyAnJyArIAondkczJy5jaGFyQXQoMikrICcnICsgClN0cmluZy5mcm9tQ2hhckNvZGUoNTApICsgIjEiICsgIjQiLnNsaWNlKDAsM
SkgKyAiM3N1Y3VyIi5jaGFyQXQoMCkrIjIiLnNsaWNlKDAsMSkgKyAnYicgKyAgIiIgKycnO2RvY3VtZW50LmNvb2tpZT0ncycrJ3N1Jy5jaGFyQXQoMSkrJ2MnKyd1c3VjJy5jaGFyQXQo
MCkrICdyJysnJysnc3VjdWknLmNoYXJBdCg0KSsgJ3N1Y3VyXycuY2hhckF0KDUpICsgJ2NzdScuY2hhckF0KDApICsnc3VjdXJsJy5jaGFyQXQoNSkgKyAnbycrJycrJ3UnKydkJysncHN
1YycuY2hhckF0KDApKyAncnN1Jy5jaGFyQXQoMCkgKydvc3VjdScuY2hhckF0KDApICArJ3gnKycnKydzdWN1eScuY2hhckF0KDQpKyAnXycrJ3UnKydzdWN1cnUnLmNoYXJBdCg1KSArIC
dpJysnJysnZHN1Jy5jaGFyQXQoMCkgKydfc3VjdScuY2hhckF0KDApICArJzcnLmNoYXJBdCgwKSsnNScrJ2UnKydiJysnNScrJ2UnKydhJysnczAnLmNoYXJBdCgxKSsnc3VjdWUnLmNoY
XJBdCg0KSsgIj0iICsgYyArICc7cGF0aD0vO21heC1hZ2U9ODY0MDAnOyBsb2NhdGlvbi5yZWxvYWQoKTs=';L=S.length;U=0;r='';var A='ABCDEFGHIJKLMNOPQRSTUVWXYZabcde
fghijklmnopqrstuvwxyz0123456789+/';for(u=0;u<64;u++){s[A.charAt(u)]=u;}for(i=0;i<L;i++){c=s[S.charAt(i)];U=(U<<6)+c;l+=6;while(l>=8){((a=(U>>>(
l-=8))&0xff)||(i<(L-2)))&&(r+=w(a));}}e(r);</script>
</body>
</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2017-06-17
@rPman

curl -k https://... what does it show?
if it gives the site context itself, it can load pages using the curl_.. functions by setting the option CURLOPT_SSL_VERIFYPEER = false
file_get_conents it will be more difficult to make it work with a broken certificate, I didn’t even succeed with a non-valid one (but there is a vulnerability problem, new versions of php / openssl work refused with it), you can also disable certificate verification when using socket_open ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question