Help with account creator in java

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

Help with account creator in java
  1. Unread #1 - Jun 14, 2010 at 11:35 PM
  2. itsboom
    Joined:
    May 7, 2010
    Posts:
    290
    Referrals:
    0
    Sythe Gold:
    0

    itsboom Forum Addict

    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();}
        }
    
    }
    
     
  3. Unread #2 - Jul 17, 2010 at 11:57 PM
  4. Gh0sty
    Joined:
    Jul 17, 2010
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0

    Gh0sty Newcomer
    Banned

    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...
     
  5. Unread #3 - Jul 18, 2010 at 12:27 AM
  6. blindkilla
    Joined:
    Jun 22, 2005
    Posts:
    1,896
    Referrals:
    0
    Sythe Gold:
    6
    Discord Unique ID:
    282000633404456960
    Discord Username:
    sogord

    blindkilla Guru
    $25 USD Donor New

    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).
     
  7. Unread #4 - Jul 22, 2010 at 1:11 AM
  8. Blupig
    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

    Blupig BEEF TOILET
    $5 USD Donor

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site