SHARE
TWEET

Untitled

a guest Apr 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.BufferedWriter;
  2. import java.io.File;
  3. import java.io.FileInputStream;
  4. import java.io.FileWriter;
  5. import java.io.IOException;
  6. import java.io.InputStream;
  7. import java.io.OutputStream;
  8. import java.net.HttpURLConnection;
  9. import java.net.InetSocketAddress;
  10. import java.net.Proxy;
  11. import java.net.URL;
  12. import java.net.URLConnection;
  13. import java.net.URLEncoder;
  14. import java.nio.charset.StandardCharsets;
  15. import java.util.HashMap;
  16. import java.util.Map;
  17. import java.util.Scanner;
  18. import java.util.StringJoiner;
  19.  
  20. import com.twocaptcha.api.ProxyType;
  21. import com.twocaptcha.api.TwoCaptchaService;
  22.  
  23. public class Main {
  24.  
  25.     public static void main(String[] args) throws IOException, InterruptedException {
  26.         String apiKey = "f295a8e64d0f39af7869d08e364cfcca";
  27.         String googleKey = "6Lcsv3oUAAAAAGFhlKrkRb029OHio098bbeyi_Hv";
  28.  
  29.         String pageUrl = "https://secure.runescape.com/m=account-creation/g=oldscape/create_account";
  30.         String proxyIp = "104.168.2.211";
  31.         String proxyPort = "1080";
  32.         String proxyUser = "";
  33.         String proxyPw = "";
  34.         TwoCaptchaService service = new TwoCaptchaService(apiKey, googleKey, pageUrl, proxyIp, proxyPort, proxyUser,
  35.                 proxyPw, ProxyType.SOCKS5);
  36.         URL url = new URL("https://secure.runescape.com/m=account-creation/g=oldscape/create_account");
  37.         Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(proxyIp, 1080));
  38.         URLConnection con = url.openConnection(proxy);
  39.         HttpURLConnection http = (HttpURLConnection) con;
  40.         http.setRequestMethod("POST");
  41.         http.setDoOutput(true);
  42.         Map<String, String> arguments = new HashMap<>();
  43.         File acc = new File("C:\\Users\\jacob\\OneDrive\\Desktop\\accounts for osrs\\accounts_friendly.txt");
  44.         File prox = new File("C:\\Users\\jacob\\OneDrive\\Desktop\\accounts for osrs\\Proxies edited.txt");
  45.         Scanner scanner = new Scanner(new FileInputStream(acc));
  46.         Scanner scanner1 = new Scanner(new FileInputStream(prox));
  47. //      int iteration = 0;
  48. //      while (scanner.hasNext()) {
  49. //          if (iteration >= 3) {
  50. //              if (scanner1.hasNext()) {
  51. //                  iteration = 0;
  52. //                  proxyIp = scanner1.next();
  53. //                  proxyIp = scanner1.next();
  54. //                  System.out.println(proxyIp);
  55. //              }
  56. //          } else {
  57. //              String email1 = scanner.next();
  58. //              arguments.put("email1", email1);
  59. //              if (scanner.hasNext()) {
  60. //                  arguments.put("password1", scanner.next());
  61. //              }
  62.  
  63.                 int maxm = 12;
  64.                 int minm = 1;
  65.                 int rangem = maxm - minm + 1;
  66.                 int maxd = 25;
  67.                 int mind = 1;
  68.                 int ranged = maxd - mind + 1;
  69.                 int maxy = 2000;
  70.                 int miny = 1940;
  71.                 int rangey = maxy - miny + 1;
  72.                 int ny = (int) (Math.random() * rangey) + miny;
  73.                 int nm = (int) (Math.random() * rangem) + minm;
  74.                 int nd = (int) (Math.random() * ranged) + mind;
  75.                 arguments.put("email1", "nbeczsrkjt@oldschool.design");
  76.                 arguments.put("password1", "Sukablyat2");
  77.                 arguments.put("onlyOneEmail", "1");
  78.                 arguments.put("onlyOnePassword", "1");
  79.                 arguments.put("day", "" + nd);
  80.                 arguments.put("month", "" + nm);
  81.                 arguments.put("year", "" + ny);
  82.                 arguments.put("create-submit", "create");
  83.                 arguments.put("theme", "oldschool");
  84.                 String responseToken = service.solveCaptcha();
  85.                 // System.out.println("The response token is: " + responseToken);
  86.                 StringJoiner sj = new StringJoiner("&");
  87.                 byte[] out = sj.toString().getBytes(StandardCharsets.UTF_8);
  88.                 int length = out.length;
  89.                 http.setFixedLengthStreamingMode(length);
  90.                 http.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
  91.                 arguments.put("g-recaptcha-response", responseToken);
  92.                 for (Map.Entry<String, String> entry : arguments.entrySet()) {
  93.                     sj.add(URLEncoder.encode(entry.getKey(), "UTF-8") + "="
  94.                             + URLEncoder.encode(entry.getValue(), "UTF-8"));
  95.                 }
  96.                 http.getOutputStream().write(out);
  97.                 System.out.println("Password " + arguments.get("password1").toString());
  98.                 System.out.println("Email " + arguments.get("email1").toString());
  99.                 System.out.println("Captcha key " + arguments.get("g-recaptcha-response").toString());
  100.                 System.out.println("Proxy " + proxyIp);
  101.                 Thread.sleep(5000);
  102.             }
  103. //      }
  104. //  }
  105. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top