Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Frame;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.net.URLConnection;
- import java.util.Random;
- import javax.swing.JOptionPane;
- public class phisingfucker {
- static String site = "";
- static String username = "username";
- static String password = "password";
- static int timeout = 5;
- public static void main(String args[]) throws InterruptedException {
- site = (String) JOptionPane.showInputDialog(new Frame(), "URL", "URL",
- JOptionPane.PLAIN_MESSAGE, null, null, null);
- username = (String) JOptionPane.showInputDialog(new Frame(), "user",
- "What is the username field called?",
- JOptionPane.PLAIN_MESSAGE, null, null, null);
- password = (String) JOptionPane.showInputDialog(new Frame(), "pass",
- "What is the password field called?",
- JOptionPane.PLAIN_MESSAGE, null, null, null);
- timeout = Integer.valueOf((String) JOptionPane.showInputDialog(
- new Frame(), "timeout",
- "How long to wait between connections?",
- JOptionPane.PLAIN_MESSAGE, null, null, null));
- while (true) {
- String toConnect = site + "?" + username + "="
- + randomString(random(4, 14)) + "&" + password + "="
- + randomString(random(6, 14));
- connectToURL(toConnect);
- Thread.sleep(timeout*100);
- }
- }
- private static int random(int i, int j) {
- Random generator = new Random();
- return generator.nextInt(j - i) + i;
- }
- public static void connectToURL(String URL) {
- try {
- URL connection = new URL(URL);
- URLConnection toConnect = connection.openConnection();
- toConnect.connect();
- System.out.println("Following to the phiser: "
- + URL.replace(site, ""));
- } catch (MalformedURLException e) {
- } catch (IOException e) {
- }
- }
- public static String randomString(int length) {
- Random rand = new Random();
- String lettersToUse = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- char[] textArray = new char[length];
- int tlength = lettersToUse.length();
- for (int i = 0; i < length; i++) {
- textArray[i] = lettersToUse.charAt(rand.nextInt(tlength));
- }
- return new String(textArray);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement