Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Who else is tired of Cloudflare giving you the 505 slap?

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)

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 Function

preferably 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 Class


peace.
Sorry that's 2 much work for a 5second waiting rule to acces the website.

hope others will find it useful:)
The redundancy of "__" in your naming makes me cringe.
Probably coding some useless shit.
(Sep 19, 2013 08:09 AM)ubbelol Wrote:  The redundancy of "__" in your naming makes me cringe.

it's a class man, why care so much? 🤣

(Sep 19, 2013 08:09 AM)magicman1337 Wrote:  Sorry that's 2 much work for a 5second waiting rule to acces the website.

hope others will find it useful:)

you can wait 5 seconds or you can wait til your computer die off cuz that httpwebrequest is not going to connect to a dos protected website without cookie. ofc if you not one of those guys using webbrowser.. are you?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[The Brotherhood] by Pr0m3th3usJul 23, 2026 02:18 PM 0 66 Jul 23, 2026 02:18 PM
Last Post: Pr0m3th3us