[Help]Using an API

Posts 1–9 of 9 · Page 1 of 1
[Help]Using an API.
can someone help me use an api i found its to autofill captchas (IT DOES WORK its like decaptcha) but well i have no idea how to use this api so if someone could help me on msn or something that would be great.


Edit: posted api and here are virus scans for the .rar

Virustotal. MD5: 0f1b280dae76eba26665a5dc83c9c7da

dbc_api_latest_dotnet.zip - Jotti's malware scan
dbc_api_latest_dotnet.zipattachment deleted · 1 downloads before removal
Post that API otherwise we cannot help you.

You gotta hurry up, I'll logg off in a few minutes.
Approved attachment.
ill hlep you out i use to make bots all the time and my friend Grapplinghook made this one 2 years ago but it works perfect i use it all the time
Code:
Imports System
Imports System.Text
Imports System.IO
Imports System.Net
    
Namespace TBNDecaptcher
    Class Decaptcher
        Public Sub New(ByVal user As String, ByVal pass As String)
            username = user
            password = pass
        End Sub
       
        Private username As String = ""
        Private password As String = ""
       
        Private resultCode As String = ""
        Private majorId As String = ""
        Private minorId As String = ""
        Private type As String = ""
        Private timeout As String = ""
       
        Public Function PostCaptcha(ByVal captcha As System.Drawing.Image) As String
            Dim captchaResponse As String = ""
            Dim boundary As String = "myBoundary"
           
            Dim builder As New StringBuilder()
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""function""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("picture2")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""username""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(username)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""password""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(password)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""pict_to""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("0")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""pict_type""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("0")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""pict""; filename=captcha.jpg")
            builder.Append(vbCr & vbLf)
            builder.Append("Content-Type: image/jpeg")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
           
            Dim headerBytes As Byte() = Encoding.ASCII.GetBytes(builder.ToString())
           
            Dim ms As New MemoryStream()
            captcha.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
           
            Dim imageBytes As Byte() = ms.ToArray()
           
            Dim footerBytes As Byte() = Encoding.ASCII.GetBytes((vbCr & vbLf & "--") + boundary)
           
            Dim postBytes As Byte() = New Byte(headerBytes.Length + imageBytes.Length + (footerBytes.Length - 1)) {}
           
            Buffer.BlockCopy(headerBytes, 0, postBytes, 0, headerBytes.Length)
            Buffer.BlockCopy(imageBytes, 0, postBytes, headerBytes.Length, imageBytes.Length)
            Buffer.BlockCopy(footerBytes, 0, postBytes, headerBytes.Length + imageBytes.Length, footerBytes.Length)
           
            Try
                Dim req As HttpWebRequest = DirectCast(WebRequest.Create("http://decaptcher.com/poster/"), HttpWebRequest)
                req.Method = "POST"
                req.ContentType = "multipart/form-data; boundary=" & boundary
                req.ContentLength = postBytes.Length
                req.ServicePoint.Expect100Continue = False
               
                Using reqStream As Stream = req.GetRequestStream()
                    reqStream.Write(postBytes, 0, postBytes.Length)
                End Using
                Using resp As WebResponse = req.GetResponse()
                    Using respStream As Stream = resp.GetResponseStream()
                        Using read As New StreamReader(respStream)
                            captchaResponse = read.ReadToEnd()
                        End Using
                    End Using
                End Using
               
                Dim respValues As String() = captchaResponse.Split("|"c)
                resultCode = respValues(0)
                majorId = respValues(1)
                minorId = respValues(2)
                type = respValues(3)
                timeout = respValues(4)
                captchaResponse = respValues(5)
                Return captchaResponse
            Catch
                Return captchaResponse
            End Try
           
        End Function
       
        Public Sub BadCaptcha()
            Dim boundary As String = "myBoundary"
           
            Dim builder As New StringBuilder()
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""function""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("picture_bad2")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""username""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(username)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""password""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(password)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""major_id""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(majorId)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""minor_id""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(minorId)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""submit""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("Send")
            builder.Append(vbCr & vbLf)
            builder.Append("--" & boundary)
           
            Dim postString As String = builder.ToString()
           
            Dim req As HttpWebRequest = DirectCast(WebRequest.Create("http://decaptcher.com/poster/"), HttpWebRequest)
            req.Method = "POST"
            req.ContentType = "multipart/form-data; boundary=" & boundary
            Using reqStream As Stream = req.GetRequestStream()
                reqStream.Write(Encoding.ASCII.GetBytes(postString), 0, postString.Length)
            End Using
            Using resp As WebResponse = req.GetResponse()
                Using respStream As Stream = resp.GetResponseStream()
                    Using read As New StreamReader(respStream)
                        Dim result As String = read.ReadToEnd()
                    End Using
                End Using
            End Using
        End Sub
    End Class
End Namespace
now in your form you add this
Code:
Public Class Form1
    Dim DecaptcherSubmitter
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        PictureBox1.Image = New System.Drawing.Bitmap(New IO.MemoryStream(New System.Net.WebClient().DownloadData(TextBox1.Text)))
    End Sub
   Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox4.Text = "Waiting for Decaptcher.com"
        wait(500)
        Dim Captcha As Image = PictureBox1.Image
        Dim DecaptcherSubmitter As New TBNDecaptcher.Decaptcher(TextBox2.Text, TextBox3.Text)
        Dim CaptchaResult As String = DecaptcherSubmitter.PostCaptcha(Captcha)

        TextBox4.Text = CaptchaResult
    End Sub
    Private Sub wait(ByVal interval As Integer)
        Dim sw As New Stopwatch
        sw.Start()
        Do While sw.ElapsedMilliseconds < interval
            ' Allows UI to remain responsive
            Application.DoEvents()
        Loop
        sw.Stop()
    End Sub
End Class
Quote Originally Posted by Lonely Tedy Bear View Post
ill hlep you out i use to make bots all the time and my friend Grapplinghook made this one 2 years ago but it works perfect i use it all the time
Code:
Imports System
Imports System.Text
Imports System.IO
Imports System.Net
    
Namespace TBNDecaptcher
    Class Decaptcher
        Public Sub New(ByVal user As String, ByVal pass As String)
            username = user
            password = pass
        End Sub
       
        Private username As String = ""
        Private password As String = ""
       
        Private resultCode As String = ""
        Private majorId As String = ""
        Private minorId As String = ""
        Private type As String = ""
        Private timeout As String = ""
       
        Public Function PostCaptcha(ByVal captcha As System.Drawing.Image) As String
            Dim captchaResponse As String = ""
            Dim boundary As String = "myBoundary"
           
            Dim builder As New StringBuilder()
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""function""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("picture2")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""username""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(username)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""password""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(password)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""pict_to""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("0")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""pict_type""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("0")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""pict""; filename=captcha.jpg")
            builder.Append(vbCr & vbLf)
            builder.Append("Content-Type: image/jpeg")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
           
            Dim headerBytes As Byte() = Encoding.ASCII.GetBytes(builder.ToString())
           
            Dim ms As New MemoryStream()
            captcha.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
           
            Dim imageBytes As Byte() = ms.ToArray()
           
            Dim footerBytes As Byte() = Encoding.ASCII.GetBytes((vbCr & vbLf & "--") + boundary)
           
            Dim postBytes As Byte() = New Byte(headerBytes.Length + imageBytes.Length + (footerBytes.Length - 1)) {}
           
            Buffer.BlockCopy(headerBytes, 0, postBytes, 0, headerBytes.Length)
            Buffer.BlockCopy(imageBytes, 0, postBytes, headerBytes.Length, imageBytes.Length)
            Buffer.BlockCopy(footerBytes, 0, postBytes, headerBytes.Length + imageBytes.Length, footerBytes.Length)
           
            Try
                Dim req As HttpWebRequest = DirectCast(WebRequest.Create("http://decaptcher.com/poster/"), HttpWebRequest)
                req.Method = "POST"
                req.ContentType = "multipart/form-data; boundary=" & boundary
                req.ContentLength = postBytes.Length
                req.ServicePoint.Expect100Continue = False
               
                Using reqStream As Stream = req.GetRequestStream()
                    reqStream.Write(postBytes, 0, postBytes.Length)
                End Using
                Using resp As WebResponse = req.GetResponse()
                    Using respStream As Stream = resp.GetResponseStream()
                        Using read As New StreamReader(respStream)
                            captchaResponse = read.ReadToEnd()
                        End Using
                    End Using
                End Using
               
                Dim respValues As String() = captchaResponse.Split("|"c)
                resultCode = respValues(0)
                majorId = respValues(1)
                minorId = respValues(2)
                type = respValues(3)
                timeout = respValues(4)
                captchaResponse = respValues(5)
                Return captchaResponse
            Catch
                Return captchaResponse
            End Try
           
        End Function
       
        Public Sub BadCaptcha()
            Dim boundary As String = "myBoundary"
           
            Dim builder As New StringBuilder()
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""function""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("picture_bad2")
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""username""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(username)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""password""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(password)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""major_id""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(majorId)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""minor_id""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append(minorId)
            builder.Append(vbCr & vbLf)
           
            builder.Append("--" & boundary & vbCr & vbLf & "Content-Disposition: form-data; name=")
            builder.Append("""submit""")
            builder.Append(vbCr & vbLf & vbCr & vbLf)
            builder.Append("Send")
            builder.Append(vbCr & vbLf)
            builder.Append("--" & boundary)
           
            Dim postString As String = builder.ToString()
           
            Dim req As HttpWebRequest = DirectCast(WebRequest.Create("http://decaptcher.com/poster/"), HttpWebRequest)
            req.Method = "POST"
            req.ContentType = "multipart/form-data; boundary=" & boundary
            Using reqStream As Stream = req.GetRequestStream()
                reqStream.Write(Encoding.ASCII.GetBytes(postString), 0, postString.Length)
            End Using
            Using resp As WebResponse = req.GetResponse()
                Using respStream As Stream = resp.GetResponseStream()
                    Using read As New StreamReader(respStream)
                        Dim result As String = read.ReadToEnd()
                    End Using
                End Using
            End Using
        End Sub
    End Class
End Namespace
now in your form you add this
Code:
Public Class Form1
    Dim DecaptcherSubmitter
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        PictureBox1.Image = New System.Drawing.Bitmap(New IO.MemoryStream(New System.Net.WebClient().DownloadData(TextBox1.Text)))
    End Sub
   Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox4.Text = "Waiting for Decaptcher.com"
        wait(500)
        Dim Captcha As Image = PictureBox1.Image
        Dim DecaptcherSubmitter As New TBNDecaptcher.Decaptcher(TextBox2.Text, TextBox3.Text)
        Dim CaptchaResult As String = DecaptcherSubmitter.PostCaptcha(Captcha)

        TextBox4.Text = CaptchaResult
    End Sub
    Private Sub wait(ByVal interval As Integer)
        Dim sw As New Stopwatch
        sw.Start()
        Do While sw.ElapsedMilliseconds < interval
            ' Allows UI to remain responsive
            Application.DoEvents()
        Loop
        sw.Stop()
    End Sub
End Class
thanks i will ask u if i need more help i'll test this right now. btw Grapplinghook is cool.

edit: is that code for decaptcher if so will it work for death by captcha their prices are alot better.
Quote Originally Posted by trevor206 View Post
thanks i will ask u if i need more help i'll test this right now. btw Grapplinghook is cool.

edit: is that code for decaptcher if so will it work for death by captcha their prices are alot better.
only works for decaptcher but you could edit it for that other one ive never heard of it tho or i would change it for you
Quote Originally Posted by Lonely Tedy Bear View Post
only works for decaptcher but you could edit it for that other one ive never heard of it tho or i would change it for you
well death by captcha is pretty cool u get a 500 captcha free trial and 1000 captchas = $1.75, but if you could would you change it because i honestly have no idea how to change it to make it work.(but if don't have any time to change it thats fine.)
tex loneley i can use them too
/Thanked /yea
Just a side note (not being rude) but lonely I only feel it's right you let them all know that your source is actually part of the open source Nexon Account Generator project and the whole source code is available readily online.
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us