Adblock breaks this site

Help with account creator in java

Discussion in 'Programming General' started by itsboom, Jun 14, 2010.

  1. itsboom

    itsboom Forum Addict

    Joined:
    May 7, 2010
    Posts:
    290
    Referrals:
    0
    Sythe Gold:
    0
    Help with account creator in java

    Hi, I was wondering if there was any source out there for a java account creator bot, or any help on why my code isnt work :p This code was taken from thebotnet.net, by Jesus in .net, while I just took the key portions and converted it to java
    Code:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    import javax.net.ssl.*;
    /**
     *
     * @author Mary
     */
    public class Main {
        final static String BASEURL ="https://secure.runescape.com/m=create/index.ws";
        static String  username = "te2s4t1",pass = "bookiea";
        static String use = "address1=&address2=&agree_privacy=on&agree_terms=on&java=1.6.0&username=" +
                username +
                "&password1=" +
                pass+
                "&password2="+
                pass+
                "&day=1&month=0&year=1990&country=225";
        public static void main(String[] args) {
            try{
                URL url = new URL(BASEURL);
                HttpsURLConnection con = (HttpsURLConnection)url.openConnection();
                con.addRequestProperty("User-Agent", "Chrome");
                con.setDoOutput(true);
                con.setRequestMethod("POST");
                PrintWriter w = new PrintWriter(con.getOutputStream());
                String t;
                byte[] ar = use.getBytes();
                OutputStream s = con.getOutputStream();
                 s.write(ar);
                s.flush();
               System.out.println(con.getResponseMessage());
                BufferedReader r = new BufferedReader(new InputStreamReader(con.getInputStream()));
                //w.print(ar);
               BufferedReader re = new BufferedReader(new InputStreamReader(con.getInputStream()));
                while((t=r.readLine())!=null)
                    if(t.contains("creating")||t.contains("created"))
                        System.out.println(t);
               while((t=re.readLine())!=null)
                   System.out.println(t);
            }catch(Exception e){e.printStackTrace();}
        }
    
    }
    
     
  2. Gh0sty

    Gh0sty Newcomer
    Banned

    Joined:
    Jul 17, 2010
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0
    Help with account creator in java

    Add some
    Code:
    System.out.print("");
    Statements to see where it might be messing up. Debugging is a useful way to learn whats wrong...
     
  3. blindkilla

    blindkilla Guru
    $25 USD Donor New

    Joined:
    Jun 22, 2005
    Posts:
    1,896
    Referrals:
    0
    Sythe Gold:
    6
    Discord Unique ID:
    282000633404456960
    Discord Username:
    sogord
    Help with account creator in java

    Did you test to see if the original code is working? I don't think it would be, because when you submit the information on that first page when creating an account, it forwards you to another page where you have the option to enter an email, but you also have to check two check boxes.

    You might have to do this with cookies, while allowing for a redirect, and then posting the new data (checkbox values in the url, and submitting that next page to finalize the registration).
     
  4. Blupig

    Blupig BEEF TOILET
    $5 USD Donor

    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant
    Help with account creator in java

    Jagex no longer allows accounts to be created using post, instead you have to now do like Blindkilla said and manipulate cookies.
     
< learning programing | helps >


 
 
Adblock breaks this site