Sep 19, 2013 07:49 AM
(This post was last modified: Sep 22, 2013 09:44 AM by Mike Tyler.)
Every other site now has this damn "please wait 5 secs" rule before you can access the actually website.
You can use this code to bypass cloudflare as well to the other bullshit dos protectors.
The reason you get a 505 error and what's basicily going on with your request when the dos protector gets
you is that it cuts you off before you can reach and get the required cookies to verify your request.
After some researching, I found out that webbrowser could sucesfully both connect, wait and get the cookies
you need to make a request 😈
Here's how I bypassed Cloudflare...
1. Get site's cookie with good old webbrowser.
2. Put application in sleep for 5 secs.
2. Use webbrowser's cookie in your http request (yea, it's dat smooth)
preferably you want to put the webbrowser in it's own thread so it dosn't freeze your application but choice up to you.
peace.
You can use this code to bypass cloudflare as well to the other bullshit dos protectors.
The reason you get a 505 error and what's basicily going on with your request when the dos protector gets
you is that it cuts you off before you can reach and get the required cookies to verify your request.
After some researching, I found out that webbrowser could sucesfully both connect, wait and get the cookies
you need to make a request 😈
Here's how I bypassed Cloudflare...
1. Get site's cookie with good old webbrowser.
2. Put application in sleep for 5 secs.
2. Use webbrowser's cookie in your http request (yea, it's dat smooth)
Code
Private Function GetWebbrowserCookie()
WebBrowser1.Navigate("http://URL")
'Wait 2-5 secs
Return WebBrowser1.Document.Cookie
End Function
Public Function GETHTTP(ByVal url As String) As String
Dim result As String = Nothing
Try
'Create request
Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create(url), HttpWebRequest)
postReq.Method = "GET"
postReq.UserAgent = "Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20100101 Firefox/22.0"
postReq.ContentType = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
[b]postReq.Headers.Add("Cookie", GetWebbrowserCookie)[/b]
'Get response
Dim postresponse As HttpWebResponse
postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
'Read response
Dim postreqreader As New StreamReader(postresponse.GetResponseStream)
result = postreqreader.ReadToEnd
postreqreader.Close()
Catch ex As WebException
'fuck
End Try
Return result
End Functionpreferably you want to put the webbrowser in it's own thread so it dosn't freeze your application but choice up to you.
Code
Private Class CreateWebbrowser
Dim url As String
Dim _cookie As String
Public Sub New(ByVal _url As String)
url = _url
End Sub
Public Function GetCookie() As String
Dim __threadStart As New ThreadStart(AddressOf _GetCookie)
Dim __thread As New Thread(__threadStart)
__thread.SetApartmentState(ApartmentState.STA)
__thread.Start()
__thread.Join() 'waits for application to finish
Return _cookie
End Function
Private Sub _GetCookie()
Dim __WebBrowser As New WebBrowser()
__WebBrowser.ScrollBarsEnabled = False
__WebBrowser.ScriptErrorsSuppressed = True
__WebBrowser.Navigate(url)
AddHandler __WebBrowser.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf WebBrowser_DocumentCompleted)
While __WebBrowser.ReadyState <> WebBrowserReadyState.Complete
Application.DoEvents()
End While
__WebBrowser.Dispose()
End Sub
Private Sub WebBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
Dim __WebBrowser As WebBrowser = DirectCast(sender, WebBrowser)
__WebBrowser.ScrollBarsEnabled = False
_cookie = __WebBrowser.Document.Cookie 'this get's the cookie
End Sub
End Classpeace.


