Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private HttpURLConnection http;
- private URL url;
- private JTextField username;
- private JTextField password;
- private JButton submit;
- public Register(){
- setTitle("Register Account");
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setSize(400,400);
- setVisible(true);
- setLayout(null);
- initComponents();
- }
- public void initComponents(){
- username = new JTextField();
- username.setBounds(50, 50, 50, 50);
- password = new JTextField();
- username.setBounds(20, 20, 50, 50);
- submit = new JButton();
- username.setBounds(30, 30, 50, 50);
- add(username);
- add(password);
- add(submit);
- }
- public void makeAccount(){
- String username ="hermanod345";
- String password ="elgenio3562";
- String email = "ferchogall34@hotmail.com";
- String data = "=trialactive=true%2522&onlyOneEmail=1&age=20&displayname_present=true&displayname="+username+"&email1="+email+"&password1="+password+"&password2="+password+"&agree_email=on&agree_pp_and_tac=1&submit=Join+Now";
- try {
- url = new URL("https://secure.runescape.com/m=account-creation/g=oldscape/create_account_funnel.ws?trialactive=true");
- try {
- http = (HttpURLConnection)url.openConnection();
- http.setRequestMethod("POST");
- http.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0;Windows98;DigExt)");
- http.setDoInput(true);
- http.setDoOutput(true);
- BufferedWriter buffer = new BufferedWriter(new OutputStreamWriter(http.getOutputStream()));
- buffer.write(data);
- buffer.close();
- DataInputStream stream = new DataInputStream(http.getInputStream());
- } catch (IOException e) {
- e.printStackTrace();
- }
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement