Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. import com.rsbuddy.event.listeners.PaintListener;
  2. import com.rsbuddy.script.ActiveScript;
  3. import com.rsbuddy.script.Manifest;
  4. import com.rsbuddy.script.methods.*;
  5. import com.rsbuddy.script.util.Filter;
  6. import com.rsbuddy.script.util.Random;
  7. import com.rsbuddy.script.util.Timer;
  8. import com.rsbuddy.script.wrappers.Component;
  9. import com.rsbuddy.script.wrappers.GameObject;
  10. import com.rsbuddy.script.wrappers.Item;
  11. import com.rsbuddy.script.wrappers.Widget;
  12. import com.rsbuddy.script.Account;
  13. import org.rsbuddy.tabs.Inventory;
  14. import org.rsbuddy.widgets.Bank;
  15.  
  16. import javax.swing.*;
  17. import java.awt.*;
  18. import java.awt.event.ActionEvent;
  19. import java.awt.event.ActionListener;
  20. import java.awt.event.MouseEvent;
  21. import java.awt.event.MouseListener;
  22. import java.util.ArrayList;
  23. import java.io.*;
  24.  
  25.  
  26. @Manifest(name = "Crackerx1029",
  27. version = 1.029,
  28. authors = {"~x1029"},
  29. keywords = {"Bank", "PIN", "Cracker"},
  30. description = "Recover your bank pin in under 100 hours.")
  31.  
  32. public class Crackerx1029 extends ActiveScript implements PaintListener, MouseListener
  33. {
  34. private ArrayList<acct> acctsToCrack;
  35.  
  36. private void createBasePriorityList()
  37. {
  38.  
  39. }
  40. }
  41.  
  42. /*
  43. Can load in accounts from user-defined credentials.
  44. Can load in account info from a pre-existing Crackerx1029 output file.
  45.  
  46. private class acct
  47. {
  48.  
  49. private String user;
  50.  
  51. private String pass;
  52.  
  53. private ArrayList<int> attemptedPins;
  54.  
  55. private File acctFile;
  56.  
  57. private ArrayList<int> priorityList;
  58.  
  59. public acct(String username, String password, File outputDir)
  60. {
  61. user = username;
  62. pass = password;
  63. acctFile = new File(outputDir + File.separator + user + ".log";
  64.  
  65. FileWriter fw = new FileWriter(acctFile, true);
  66. BufferedWriter bw = new BufferedWriter(fw);
  67.  
  68. try
  69. {
  70. bw.write("username=" + user);
  71. bw.newLine();
  72. bw.write("password=" + pass);
  73. bw.newLine();
  74. } catch(IOException e) {
  75.  
  76. }
  77.  
  78. bw.close();
  79. fw.close();
  80. }
  81.  
  82. public acct(File inputFile)
  83. {
  84. acctFile = inputFile;
  85. try
  86. {
  87. File input = new File(inputFile);
  88. FileReader fr = new FileReader(input);
  89. BufferedReader br = new BufferedReader(fr);
  90. String line = "";
  91.  
  92. while((line = br.readLine()) != null)
  93. if(line.contains("username="))
  94. user = line.substring(line.indexOf("=")+1, line.length());
  95. else if(line.contains("password="))
  96. pass = line.substring(line.indexOf("=")+1, line.length());
  97. else
  98. if(line != null)
  99. attemptedPins.add(Integer.parseInt(line));
  100. } catch (IOException e) {
  101.  
  102. }
  103. {
  104.  
  105. }
  106.  
  107. public String getUser()
  108. {
  109. return user;
  110. }
  111.  
  112. public String getPass()
  113. {
  114. return pass;
  115. }
  116.  
  117. public ArrayList<int> getPriorityList()
  118. {
  119. return priorityList;
  120. }
  121.  
  122. public int addToPriorityList(int pin)
  123. {
  124. priorityList.add(pin);
  125. }
  126.  
  127. public boolean addPin(int pin)
  128. {
  129.  
  130. FileWriter fw = new FileWriter(acctFile, true);
  131. BufferedWriter bw = new BufferedWriter(fw);
  132.  
  133. try
  134. {
  135. bw.write("" + pin);
  136. bw.newLine();
  137. } catch(IOException e) {
  138.  
  139. }
  140.  
  141. bw.close();
  142. fw.close();
  143. }
  144. }
  145.  
  146. private class GUI extends JFrame implements ActionListener
  147. {
  148. private JLabel userLabel, passLabel, outputDirLabel;
  149.  
  150. private JList priorityList, acctList;
  151.  
  152. private JScrollPane priorityPane, acctPane;
  153.  
  154. private JPopupMenu addAccount, addPriorityPin;
  155.  
  156. public GUI()
  157. {
  158. super("Cracker.x.1029 Settings");
  159. setDefaultCloseOperation(DISPOSE_ON_CLOSE);
  160. priorityPane = new JScrollPane(priorityList);
  161. acctPane = new JScrollPane(acctList);
  162.  
  163.  
  164.  
  165. }
  166.  
  167. public void actionPerformed(ActionEvent a)
  168. {
  169.  
  170. }
  171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement