Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IntGetFile when website is "Cloudflare" protected
#1
Hi !

Is it still possible to get the "Source code" of a webpage that is "Cloudlare protected" ? You know, when your browser needs to wait like 5 seconds before seeing the page ?

I'm not spamming a website or anything like that, it's just that the website that i usually crawl have enabled this "Ddos protection" provided by cloudflare, and with it i can't get the source code of the page, instead i'm getting the source code of the "Please wait 5 sec.." message.

I tried this but doesn't work :/

Macro Macro7
Code:
Copy      Help
Http h.Connect("http://annuaire-telechargement.com")
10
h.Get("" _s)
h.Disconnect
out _s

Do you have an idea ?

Thanks in advance Smile
#2
Update :

I found a workaround using a web browser inside a dialog :
I tried to look how i could get the source code this way but didn't found out. Can you help me ? Thanks in advance Smile

Macro Macro3
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 758 358 "Dialog"
;3 ActiveX 0x54030000 0x0 4 36 750 317 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;4 Button 0x54032000 0x0 40 12 48 14 "Button"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""

str controls = "3"
str ax3SHD
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser- we3
,we3._getcontrol(id(3 hDlg))
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,
,case 4 ;;Button
,,we3.Navigate("http://google.com")
ret 1
#3
try this


Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 758 358 "Dialog"
;3 ActiveX 0x54030000 0x0 4 36 750 317 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;4 Button 0x54032000 0x0 40 12 48 14 "Button"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""

str controls = "3"
str ax3SHD
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,we3._setevents("sub.we3")
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4 ;;Button
,we3._getcontrol(id(3 hDlg))
,we3.Navigate("http://annuaire-telechargement.com")
ret 1

#sub we3_DocumentComplete
function IDispatch'pDisp VARIANT&URL SHDocVw.WebBrowser'c
MSHTML.IHTMLDocument2 doc=c.Document
str doctitle= doc.title
;out doctitle
if doctitle="Annuaire Telechargement - Site de Téléchargement Gratuit"
,;out doc.body.outerHTML
,;out "--------------------------------"
,out doc.body.innerHTML
#4
It works, thanks a lot ! Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)