Advertisement
Guest User

uh

a guest
May 24th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1.  
  2.  
  3. /**
  4. *
  5. */
  6. private static final long serialVersionUID = 1L;
  7. private HttpURLConnection http;
  8. private URL url;
  9. private JTextField username;
  10. private JTextField password;
  11. private JButton submit;
  12.  
  13. public Register(){
  14. setTitle("Register Account");
  15. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  16. setSize(400,400);
  17. setVisible(true);
  18. setLayout(null);
  19. initComponents();
  20. }
  21.  
  22. public void initComponents(){
  23. username = new JTextField();
  24. username.setBounds(50, 50, 50, 50);
  25. password = new JTextField();
  26. username.setBounds(20, 20, 50, 50);
  27. submit = new JButton();
  28. username.setBounds(30, 30, 50, 50);
  29. add(username);
  30. add(password);
  31. add(submit);
  32.  
  33. }
  34.  
  35. public void makeAccount(){
  36. String username ="hermanod345";
  37. String password ="elgenio3562";
  38. String email = "ferchogall34@hotmail.com";
  39. 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";
  40. try {
  41. url = new URL("https://secure.runescape.com/m=account-creation/g=oldscape/create_account_funnel.ws?trialactive=true");
  42. try {
  43. http = (HttpURLConnection)url.openConnection();
  44. http.setRequestMethod("POST");
  45. http.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0;Windows98;DigExt)");
  46. http.setDoInput(true);
  47. http.setDoOutput(true);
  48. BufferedWriter buffer = new BufferedWriter(new OutputStreamWriter(http.getOutputStream()));
  49. buffer.write(data);
  50. buffer.close();
  51. DataInputStream stream = new DataInputStream(http.getInputStream());
  52. } catch (IOException e) {
  53. e.printStackTrace();
  54. }
  55. } catch (MalformedURLException e) {
  56. e.printStackTrace();
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement