Page 1 of 2 12 LastLast
Results 1 to 18 of 19

Thread: [Code] Decaptcher Tutorial

  1. #1
    Administrator Gameloader's Avatar
    Join Date
    May 2011
    Location
    Bottingforce.com DUH!
    Posts
    1,155
    Bots Posted
    97
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    [Code] Decaptcher Tutorial

    Step 1:
    Download the attachment and add all files to your project

    Step 2:
    Make 2 text box's and 1 check box on your Application. Something like the following



    Step 3:
    In Solutions Explorer right click References and click Add Reference
    Then click the Com tab and scroll down till you find "Microsoft HTML Object Library"
    Click Ok

    Step 4:
    In Form1.cs Find the following (should be the very first line)
    Code:
    using System;
    below add the following
    Code:
    using mshtml;
    using WindowsFormsApplication1.Properties;
    Step 5:
    Name the decaptcher user textbox "textBoxDecaptcherUser"
    Name the decaptcher password textbox "textBoxDecaptcherPass"
    Name the decaptcher checkbox "checkBoxDecaptcherActive"

    Step 6:
    Edit form1.designer.cs and look for and add the following(you might have to hit the little + sign in order to see all the code)

    look for
    Code:
                // 
                // checkBoxDecaptcherActive
                //
    below add
    Code:
    this.checkBoxDecaptcherActive.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::WindowsFormsApplication1.Properties.Settings.Default, "decaptcher_active", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
    look for
    Code:
                // 
                // textBoxDecaptcherPass
                //
    below add
    Code:
    this.textBoxDecaptcherPass.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::WindowsFormsApplication1.Properties.Settings.Default, "decaptcher_pass", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
    look for
    Code:
                // 
                // textBoxDecaptcherUser
                //
    below add
    Code:
    this.textBoxDecaptcherUser.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::WindowsFormsApplication1.Properties.Settings.Default, "decaptcher_user", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));


    Step 7:

    Double click properties and go to settings and make it look like the following


    Step 8:
    In Form1.cs find the following
    Code:
        public partial class Form1 : Form
        {
    below add
    Code:
            Bitmap captchaBmp;
            String lastCaptcha;
    Step 9:
    Add the following to your form.cs code

    please check the notes above this line
    Code:
                    if (img.nameProp.Contains("GenerateCaptcha.aspx?"))
    Code:
     private void SaveCaptchaImage()
            {
                IHTMLDocument2 doc = (IHTMLDocument2)webBrowser1.Document.DomDocument;
                IHTMLControlRange imgRange = (IHTMLControlRange)((HTMLBody)doc.body).createControlRange();
    
                foreach (IHTMLImgElement img in doc.images)
                {
    //Change "GenerateCaptcha.aspx?" to whatever the captcha file might be for example "image.aspx?" or "captchaimage.jpg"
                    if (img.nameProp.Contains("GenerateCaptcha.aspx?"))
                    {
                        imgRange.add((IHTMLControlElement)img);
    
                        object a = Clipboard.GetDataObject();
    
                        imgRange.execCommand("Copy", false, null);
                        captchaBmp = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap);
                        Clipboard.SetDataObject(a);
    
                        break;
                    }
                }
            }
    
    
            private void SolveCaptcha()
            {
                SaveCaptchaImage();
    
                if (Settings.Default.decaptcher_active)
                {
                    try
                    {
                        Decaptcher decaptcher = new Decaptcher(Settings.Default.decaptcher_user, Settings.Default.decaptcher_pass);
                        lastCaptcha = decaptcher.GetCaptchaSolved(captchaBmp).Text;
                    }
                    catch
                    {
                        lastCaptcha = "";
                    }
    
                    // TODO : Error
                }
                else
                {
                    FormCaptcha c = new FormCaptcha(captchaBmp);
                    c.ShowDialog();
    
                    lastCaptcha = c.txtCaptcha;
                }
            }


    Step 10:

    Thats pretty much it for the code part.

    Now in your bot when your ready to solve the captcha add the following code

    Code:
    SolveCaptcha();
    right after that code your going to need a place to put your results back from decaptcher or from entered manual so add the following

    Code:
                browser.Document.GetElementById("id_of_captcha_answer_textbox").SetAttribute("value", lastCaptcha);
    Pretty Much Sums It Up. Any Questions I Would Be Happy To Answer
    Attached Files

  2. Than/ks Weed«, Cheater thanked for this post
    Likes Weed« liked this post
    Dislikes Weed« disliked this post
  3. #2
    Banned
    Join Date
    May 2011
    Posts
    294
    Bots Posted
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bro I been trying to Learn this for the past 12 hours! I need more then a Decap tutorial bro. I wont give up till I learn this and I wont sleep! Im dedicated to learning so please help me out. Thank you

  4. #3
    Banned
    Join Date
    May 2011
    Posts
    52
    Bots Posted
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yoo i still dont understand, its soo confusing as fuckk

  5. Likes xBrandonx liked this post
  6. #4
    Banned
    Join Date
    May 2011
    Posts
    52
    Bots Posted
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i relaly need to get my decap going, i appreciate it.

  7. Dislikes xBrandonx disliked this post
  8. #5
    Senior Member Milano's Avatar
    Join Date
    May 2011
    Posts
    640
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Looks great. I'm going to try to learn how to code so I can make bots, haha.

  9. #6
    Banned
    Join Date
    May 2011
    Posts
    294
    Bots Posted
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stuck on step 9 Error 3 The name 'img' does not exist in the current context C:\Users\TONIA\AppData\Local\Temporary Projects\WindowsFormsApplication1\Form1.cs 160 22 WindowsFormsApplication1

  10. #7
    Banned
    Join Date
    May 2011
    Posts
    294
    Bots Posted
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Warning 1 Cannot bind to the property 'Checked' on the target control.
    Parameter name: PropertyName C:\Users\TONIA\AppData\Local\Temporary Projects\WindowsFormsApplication1\Form1.Designer.c s 77 0


    this.checkBoxDecaptcherActive.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::WindowsFormsApplication1.Properties.Settin gs.Default, "decaptcher_active", true, System.Windows.Forms.DataSourceUpdateMode.OnProper tyChanged));

    Cannot bind to the property 'Checked' on the target control.
    Parameter name: PropertyName
    Last edited by R1CHY; 05-30-2011 at 08:52 AM.

  11. #8
    Senior Member interwebsz's Avatar
    Join Date
    Sep 2011
    Location
    in the tubes
    Posts
    337
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks like a piece of cake bro. Thanks for the tut anyways, gonna start programming, and this is one of the many features going to be added, ReCaptcha, DeathByCaptcha, and all other APIs will work this way right?

  12. #9
    Member
    Join Date
    Sep 2011
    Posts
    66
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh...this may be helpful in the future...i guess i will try this on my next bot though...

  13. #10
    Junior Member
    Join Date
    May 2011
    Posts
    1
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice tutorial

  14. #11
    thanhtamcongtu
    Guest
    Thanks alot

  15. #12
    Administrator Gameloader's Avatar
    Join Date
    May 2011
    Location
    Bottingforce.com DUH!
    Posts
    1,155
    Bots Posted
    97
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    replace decaptcher.com with de-captcher.com
    'The people you spend the most time with make you.'
    - Gameloader -


  16. #13
    Banned
    Join Date
    Oct 2011
    Location
    BottingForce
    Posts
    196
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for this game i wish i saw this sooner!

  17. #14
    Senior Member
    Join Date
    Oct 2011
    Posts
    106
    Bots Posted
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed up the class to be cleaner, report bad captchas, and not use your clipboard. Sending a captcha doesn't allow for using Bitmap anymore, you have to send it in a Image format.
    Here is how to prepare a captcha to be sent to Decaptcher(credits to Gameloader I just made some minor edits)
    Code:
    public Image getImage(String url)
            {
                Image rImage = null;
                WebResponse result = null;
                try
                {
                    Byte[] rBytes;
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                    using (result = request.GetResponse())
                    {
                        using (Stream rStream = result.GetResponseStream())
                        {
                            using (BinaryReader br = new BinaryReader(rStream))
                            {
                                rBytes = br.ReadBytes(10000000);
                            }
                            using (MemoryStream imageStream = new MemoryStream(rBytes, 0, rBytes.Length))
                            {
                                imageStream.Write(rBytes, 0, rBytes.Length);
                                rImage = Image.FromStream(imageStream, true);
                            }
                        }
                    }
                }
                catch { return null; }
                return rImage;
            }
    Attached Files

  18. Than/ks Gameloader thanked for this post
    Likes Gameloader liked this post
  19. #15
    Junior Member
    Join Date
    Mar 2018
    Posts
    13
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TNR Sky Park độc quyền phân phối to* đẹp nhất dự án chung cư TNR Sky Park 136 Hồ Tùng M*u
    - Hỗ trợ vay 70% với lãi suất 0% trong vòng 18 tháng.
    - Chỉ cần có trong tay 580 triệu đã có cơ hội sở hữu căn hộ tại chung cư 136 Hồ Tùng M*u.
    - Chiết khấu lên đến 5% giá trị căn hộ.
    - Chuyến du lịch Singapore trị giá 30.000.000vnđ cho 50 khách đầu tiên.
    - Cơ hội bốc thăm trúng thưởng lên tới 2,5 tỷ cho 200 khách h*ng đầu tiên.

  20. #16
    Banned
    Join Date
    Mar 2018
    Posts
    8
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TNR Sky Park độc quyền phân phối to* đẹp nhất dự án chung cư TNR Goldmark City 136 Hồ Tùng M*u
    - Hỗ trợ vay 70% với lãi suất 0% trong vòng 18 tháng.
    - Chỉ cần có trong tay 580 triệu đã có cơ hội sở hữu căn hộ tại chung cư 136 Hồ Tùng M*u.
    - Chiết khấu lên đến 5% giá trị căn hộ.
    - Chuyến du lịch Singapore trị giá 30.000.000vnđ cho 50 khách đầu tiên.
    - Cơ hội bốc thăm trúng thưởng lên tới 2,5 tỷ cho 200 khách h*ng đầu tiên.

  21. #17
    Banned
    Join Date
    Feb 2018
    Posts
    11
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    chung cư 136 Hồ Tùng M*u độc quyền phân phối to* đẹp nhất dự án chung cư TNR Sky Park 136 Hồ Tùng M*u
    - Hỗ trợ vay 70% với lãi suất 0% trong vòng 18 tháng.
    - Chỉ cần có trong tay 580 triệu đã có cơ hội sở hữu căn hộ tại chung cư TNR Goldmark City 136 Hồ Tùng M*u.
    - Chiết khấu lên đến 5% giá trị căn hộ.
    - Chuyến du lịch Singapore trị giá 30.000.000vnđ cho 50 khách đầu tiên.
    - Cơ hội bốc thăm trúng thưởng lên tới 2,5 tỷ cho 200 khách h*ng đầu tiên.

  22. #18
    Junior Member
    Join Date
    Dec 2017
    Posts
    18
    Bots Posted
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    chung cư TNR Goldmark City 136 Hồ Tùng M*u độc quyền phân phối to* đẹp nhất dự án chung cư 136 Hồ Tùng M*u
    - Hỗ trợ vay 70% với lãi suất 0% trong vòng 18 tháng.
    - Chỉ cần có trong tay 580 triệu đã có cơ hội sở hữu căn hộ tại chung cư 136 Hồ Tùng M*u.
    - Chiết khấu lên đến 5% giá trị căn hộ.
    - Chuyến du lịch Singapore trị giá 30.000.000vnđ cho 50 khách đầu tiên.
    - Cơ hội bốc thăm trúng thưởng lên tới 2,5 tỷ cho 200 khách h*ng đầu tiên.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •