├── README.md └── mt └── base_converter ├── AES_Encryptions ├── AES256MT3.java ├── AESMD5MT.java ├── AESMT.java └── AESMT2.java ├── ASCII_Encryptions ├── Ascii85MT.java └── AsciiMT.java ├── AbtashMT.java ├── BaconianMT.java ├── Base_Encryptions ├── Base16MT.java ├── Base32MT.java ├── Base58MT.java ├── Base64MT.java └── Base91MT.java ├── BeaufortMT.java ├── BinaryMT.java ├── Blowfish_Encryptions ├── BlowfishMT.java └── BlowfishMT2.java ├── CaesarMT.java ├── ColorMT.java ├── DESMT.java ├── HexMT.java ├── MTUtil.java ├── MorseMT.java ├── NPFogNormal.java ├── OctalMT.java ├── Rot13MT.java ├── ToMillisMT.java ├── VigenereMT.java ├── WingdingMT.java ├── ZalgoMT.java └── interfaces ├── BeaufortImpl.java ├── Decoder.java ├── Encoder.java ├── MT.java └── MTImpl.java /README.md: -------------------------------------------------------------------------------- 1 | # Encryption and Decryption 2 | Encryption Decryption algorithms written in Java. Here you will get many encryption and decryption algorithms that can be helpful in Android Development 3 | -------------------------------------------------------------------------------- /mt/base_converter/AES_Encryptions/AES256MT3.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter.AES_Encryptions; 2 | 3 | import javax.crypto.Cipher; 4 | import javax.crypto.SecretKey; 5 | import javax.crypto.SecretKeyFactory; 6 | import javax.crypto.spec.IvParameterSpec; 7 | import javax.crypto.spec.PBEKeySpec; 8 | import javax.crypto.spec.SecretKeySpec; 9 | import java.security.spec.KeySpec; 10 | import android.util.Base64; 11 | 12 | 13 | 14 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 10-Apr-23. 15 | */ 16 | 17 | /* Answer got from HowToDoInJava (https://howtodoinjava.com/java/java-security/aes-256-encryption-decryption/) 18 | */ 19 | 20 | public class AES256MT3 { 21 | 22 | 23 | public static String encode(String value, String key, String salt) { 24 | 25 | 26 | 27 | 28 | try { 29 | 30 | 31 | SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256"); 32 | KeySpec spec = new PBEKeySpec(key.trim().toCharArray(), salt.getBytes(), 65536, 256); 33 | SecretKey tmp = factory.generateSecret(spec); 34 | SecretKeySpec secretKey = new SecretKeySpec(tmp.getEncoded(), "AES"); 35 | 36 | Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); 37 | IvParameterSpec iv = new IvParameterSpec(new byte[cipher.getBlockSize()]); 38 | cipher.init(Cipher.ENCRYPT_MODE, secretKey, iv); 39 | return Base64.encodeToString(cipher.doFinal(value.getBytes("UTF-8")), Base64.DEFAULT).replaceAll("\n",""); 40 | 41 | 42 | } catch (Exception e) { 43 | return "Error while encrypting: " + e.toString(); 44 | } 45 | 46 | } 47 | public static String decode(String value, String key, String salt) { 48 | 49 | try { 50 | 51 | 52 | SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256"); 53 | KeySpec spec = new PBEKeySpec(key.toCharArray(), salt.getBytes(), 65536, 256); 54 | SecretKey tmp = factory.generateSecret(spec); 55 | SecretKeySpec secretKey = new SecretKeySpec(tmp.getEncoded(), "AES"); 56 | 57 | Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING"); 58 | IvParameterSpec iv = new IvParameterSpec(new byte[cipher.getBlockSize()]); 59 | cipher.init(Cipher.DECRYPT_MODE, secretKey, iv); 60 | return new String(cipher.doFinal(Base64.decode(value.getBytes(), Base64.DEFAULT))).replaceAll("\n",""); 61 | } catch (Exception e) { 62 | return "Error in password \nMake sure you add your password and salt key for AES-256 in plug-in Preference Manager.. \n The default password and salt key is (MTManager) ....\nand this may not work here...\nSo change it to your password"; 63 | } 64 | 65 | 66 | 67 | } 68 | 69 | 70 | 71 | } -------------------------------------------------------------------------------- /mt/base_converter/AES_Encryptions/AESMD5MT.java: -------------------------------------------------------------------------------- 1 | 2 | package mt.base_converter.AES_Encryptions; 3 | 4 | import java.security.MessageDigest; 5 | import javax.crypto.Cipher; 6 | import javax.crypto.spec.SecretKeySpec; 7 | 8 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 7-Aug-2023. 9 | */ 10 | 11 | public class AESMD5MT { 12 | private static final String HEX = "0123456789ABCDEF"; 13 | 14 | private static void appendHex(StringBuffer stringBuffer, byte b) { 15 | stringBuffer.append(HEX.charAt((b >> 4) & 15)); 16 | stringBuffer.append(HEX.charAt(b & 15)); 17 | } 18 | 19 | public static String decrypt(String str, String str2) { 20 | return new String(decrypt(getRawKey(str.getBytes()), toByte(str2))); 21 | } 22 | 23 | public static String encrypt(String str, String str2) { 24 | return toHex(encrypt(getRawKey(str.getBytes()), str2.getBytes())); 25 | } 26 | 27 | public static String fromHex(String str) { 28 | return new String(toByte(str)); 29 | } 30 | 31 | public static byte[] getRawKey(byte[] bArr) { 32 | 33 | try{ 34 | return new SecretKeySpec(MessageDigest.getInstance("MD5").digest(bArr), "AES").getEncoded(); 35 | }catch(Exception e){ 36 | return null; 37 | } 38 | 39 | } 40 | 41 | public static byte[] toByte(String str) { 42 | int length = str.length() / 2; 43 | byte[] bArr = new byte[length]; 44 | for (int i = 0; i < length; i++) { 45 | int i2 = i * 2; 46 | bArr[i] = Integer.valueOf(str.substring(i2, i2 + 2), 16).byteValue(); 47 | } 48 | return bArr; 49 | } 50 | 51 | public static String toHex(String str) { 52 | return toHex(str.getBytes()); 53 | } 54 | 55 | public static String toHex(byte[] bArr) { 56 | if (bArr == null) { 57 | return ""; 58 | } 59 | StringBuffer stringBuffer = new StringBuffer(bArr.length * 2); 60 | for (byte b : bArr) { 61 | appendHex(stringBuffer, b); 62 | } 63 | return stringBuffer.toString(); 64 | } 65 | 66 | public static byte[] encrypt(byte[] bArr, byte[] bArr2) { 67 | 68 | try{ 69 | SecretKeySpec secretKeySpec = new SecretKeySpec(bArr, "AES"); 70 | Cipher cipher = Cipher.getInstance("AES"); 71 | cipher.init(1, secretKeySpec); 72 | return cipher.doFinal(bArr2); 73 | }catch(Exception e){ 74 | return null; 75 | } 76 | } 77 | 78 | public static byte[] decrypt(byte[] bArr, byte[] bArr2) { 79 | 80 | try { 81 | SecretKeySpec secretKeySpec = new SecretKeySpec(bArr, "AES"); 82 | Cipher cipher = Cipher.getInstance("AES"); 83 | cipher.init(2, secretKeySpec); 84 | return cipher.doFinal(bArr2); 85 | 86 | }catch (Exception e){ 87 | return null; 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /mt/base_converter/AES_Encryptions/AESMT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter.AES_Encryptions; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | 6 | 7 | 8 | 9 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 11-Nov-22. 10 | */ 11 | 12 | public class AESMT { 13 | 14 | 15 | public String encode (final String _string, final String _key) { 16 | try { 17 | 18 | javax.crypto.SecretKey key = generateKey(_key); 19 | 20 | javax.crypto.Cipher c = javax.crypto.Cipher.getInstance("AES"); 21 | 22 | c.init(javax.crypto.Cipher.ENCRYPT_MODE, key); 23 | 24 | byte[] encVal = c.doFinal(_string.getBytes()); 25 | 26 | String encrypted = android.util.Base64.encodeToString(encVal,android.util.Base64.DEFAULT); 27 | 28 | return encrypted.trim(); 29 | } catch (Exception ex) { 30 | 31 | return "Error"; 32 | 33 | } 34 | } 35 | 36 | 37 | 38 | public String decode (final String _string, final String _key) { 39 | try { 40 | 41 | javax.crypto.spec.SecretKeySpec key = (javax.crypto.spec.SecretKeySpec) generateKey(_key); 42 | 43 | javax.crypto.Cipher c = javax.crypto.Cipher.getInstance("AES"); 44 | 45 | c.init(javax.crypto.Cipher.DECRYPT_MODE,key); 46 | 47 | byte[] decode = android.util.Base64.decode(_string,android.util.Base64.DEFAULT); 48 | 49 | byte[] decval = c.doFinal(decode); 50 | 51 | String decrypted = new String(decval); 52 | 53 | return decrypted.trim(); 54 | } catch (Exception ex) { 55 | return "Error in password \nMake sure you add your password in plug-in Preference Manager.. \n There is default password(MTManager) ....\nand this may not work here...\nSo change it to your password"; 56 | } 57 | } 58 | 59 | 60 | private javax.crypto.SecretKey generateKey(String pwd) throws Exception { 61 | 62 | final java.security.MessageDigest digest = java.security.MessageDigest.getInstance("SHA-256"); 63 | 64 | byte[] b = pwd.getBytes("UTF-8"); 65 | 66 | digest.update(b,0,b.length); 67 | 68 | byte[] key = digest.digest(); 69 | 70 | javax.crypto.spec.SecretKeySpec sec = new javax.crypto.spec.SecretKeySpec(key, "AES"); 71 | 72 | return sec; 73 | } 74 | 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /mt/base_converter/AES_Encryptions/AESMT2.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter.AES_Encryptions; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import javax.crypto.spec.IvParameterSpec; 6 | import javax.crypto.Cipher; 7 | import javax.crypto.spec.SecretKeySpec; 8 | import android.util.Base64; 9 | 10 | 11 | 12 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 2-Feb-23. 13 | */ 14 | 15 | /* Answer got from StackOverflow (https://stackoverflow.com/questions/40123319/easy-way-to-encrypt-decrypt-string-in-android) 16 | */ 17 | 18 | public class AESMT2 { 19 | 20 | 21 | public static String encode(String value, String key) { 22 | 23 | String initVector = "encryptionIntVec"; 24 | try { 25 | IvParameterSpec iv2 = new IvParameterSpec(key.getBytes("UTF-8")); 26 | SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES"); 27 | 28 | Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING"); 29 | IvParameterSpec iv = new IvParameterSpec(new byte[cipher.getBlockSize()]); 30 | cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv2); 31 | 32 | byte[] encrypted = cipher.doFinal(value.getBytes()); 33 | return Base64.encodeToString(encrypted, Base64.DEFAULT).trim(); 34 | } catch (Exception ex) { 35 | return "An error occurred while encrypting the text\n\n"+ex.toString()+"\n\n Set your password in preference manager (Default key is MTManagerMTMange) .And your password should be 16 character"; 36 | } 37 | 38 | } 39 | public static String decode(String value, String key) { 40 | 41 | String initVector = "encryptionIntVec"; 42 | try { 43 | IvParameterSpec iv2 = new IvParameterSpec(key.getBytes("UTF-8")); 44 | SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES"); 45 | 46 | Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING"); 47 | IvParameterSpec iv = new IvParameterSpec(new byte[cipher.getBlockSize()]); 48 | cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv2); 49 | byte[] original = cipher.doFinal(Base64.decode(value.getBytes(), Base64.DEFAULT)); 50 | 51 | return new String(original).trim(); 52 | } catch (Exception ex) { 53 | return "An error occurred while encrypting the text\n\n"+ex.toString()+"\n\n Set your password in preference manager (Default key is MTManagerMTMange) .And your password should be 16 character"; 54 | } 55 | 56 | 57 | } 58 | 59 | 60 | 61 | } -------------------------------------------------------------------------------- /mt/base_converter/ASCII_Encryptions/Ascii85MT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter.ASCII_Encryptions; 2 | 3 | 4 | import java.math.BigDecimal; 5 | import java.nio.ByteBuffer; 6 | import java.util.Arrays; 7 | import java.util.regex.Pattern; 8 | 9 | /** 10 | * A very simple class that helps encode/decode for Ascii85 / base85 11 | * The version that is likely most similar that is implemented here would be the Adobe version. 12 | * @see Ascii85 13 | */ 14 | /** 15 | * ReCreated by @Maharna's Tech (Subscribe our YT Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 4-Dec-22. 16 | */ 17 | public class Ascii85MT { 18 | 19 | private final static int ASCII_SHIFT = 33; 20 | 21 | private static int[] BASE85_POW = { 22 | 1, 23 | 85, 24 | 85 * 85, 25 | 85 * 85 * 85, 26 | 85 * 85 * 85 *85 27 | }; 28 | 29 | private static Pattern REMOVE_WHITESPACE = Pattern.compile("\\s+"); 30 | 31 | public Ascii85MT() { 32 | } 33 | 34 | public static String encode(byte[] payload) { 35 | if (payload == null) { 36 | throw new IllegalArgumentException("You must provide a non-null input"); 37 | } 38 | //By using five ASCII characters to represent four bytes of binary data the encoded size ¹⁄₄ is larger than the original 39 | StringBuilder stringBuff = new StringBuilder(payload.length * 5/4); 40 | //We break the payload into int (4 bytes) 41 | byte[] chunk = new byte[4]; 42 | int chunkIndex = 0; 43 | for(int i = 0 ; i < payload.length; i++) { 44 | byte currByte = payload[i]; 45 | chunk[chunkIndex++] = currByte; 46 | 47 | if (chunkIndex == 4) { 48 | int value = byteToInt(chunk); 49 | //Because all-zero data is quite common, an exception is made for the sake of data compression, 50 | //and an all-zero group is encoded as a single character "z" instead of "!!!!!". 51 | if (value == 0) { 52 | stringBuff.append('z'); 53 | } else { 54 | stringBuff.append(encodeChunk(value)); 55 | } 56 | Arrays.fill(chunk, (byte) 0); 57 | chunkIndex = 0; 58 | } 59 | } 60 | 61 | //If we didn't end on 0, then we need some padding 62 | if (chunkIndex > 0) { 63 | int numPadded = chunk.length - chunkIndex; 64 | Arrays.fill(chunk, chunkIndex, chunk.length, (byte)0); 65 | int value = byteToInt(chunk); 66 | char[] encodedChunk = encodeChunk(value); 67 | for(int i = 0 ; i < encodedChunk.length - numPadded; i++) { 68 | stringBuff.append(encodedChunk[i]); 69 | } 70 | } 71 | 72 | return stringBuff.toString(); 73 | } 74 | 75 | private static char[] encodeChunk(int value) { 76 | //transform value to unsigned long 77 | long longValue = value & 0x00000000ffffffffL; 78 | char[] encodedChunk = new char[5]; 79 | for(int i = 0 ; i < encodedChunk.length; i++) { 80 | encodedChunk[i] = (char) ((longValue / BASE85_POW[4 - i]) + ASCII_SHIFT); 81 | longValue = longValue % BASE85_POW[4 - i]; 82 | } 83 | return encodedChunk; 84 | } 85 | 86 | /** 87 | * This is a very simple base85 decoder. It respects the 'z' optimization for empty chunks, and 88 | * strips whitespace between characters to respect line limits. 89 | * @see Ascii85 90 | * @param chars The input characters that are base85 encoded. 91 | * @return The binary data decoded from the input 92 | */ 93 | public static byte[] decode(String chars) { 94 | if (chars == null) { 95 | throw new IllegalArgumentException("You must provide a non-null input"); 96 | } 97 | // Because we perform compression when encoding four bytes of zeros to a single 'z', we need 98 | // to scan through the input to compute the target length, instead of just subtracting 20% of 99 | // the encoded text length. 100 | final int inputLength = chars.length(); 101 | 102 | // lets first count the occurrences of 'z' 103 | char someChar = 'e'; 104 | int zCount = 0; 105 | 106 | for (int i = 0; i < chars.length(); i++) { 107 | if (chars.charAt(i) == someChar) { 108 | zCount++; 109 | } 110 | } 111 | 112 | // Typically by using five ASCII characters to represent four bytes of binary data 113 | // the encoded size ¹⁄₄ is larger than the original. 114 | // We however have to account for the 'z' which were compressed 115 | BigDecimal uncompressedZLength = BigDecimal.valueOf(zCount).multiply(BigDecimal.valueOf(4)); 116 | 117 | BigDecimal uncompressedNonZLength = BigDecimal.valueOf(inputLength - zCount) 118 | .multiply(BigDecimal.valueOf(4)) 119 | .divide(BigDecimal.valueOf(5)); 120 | 121 | BigDecimal uncompressedLength = uncompressedZLength.add(uncompressedNonZLength); 122 | 123 | ByteBuffer bytebuff = ByteBuffer.allocate(uncompressedLength.intValue()); 124 | //1. Whitespace characters may occur anywhere to accommodate line length limitations. So lets strip it. 125 | chars = REMOVE_WHITESPACE.matcher(chars).replaceAll(""); 126 | //Since Base85 is an ascii encoder, we don't need to get the bytes as UTF-8. 127 | byte[] payload = chars.getBytes(); 128 | byte[] chunk = new byte[5]; 129 | int chunkIndex = 0; 130 | for(int i = 0 ; i < payload.length; i++) { 131 | byte currByte = payload[i]; 132 | //Because all-zero data is quite common, an exception is made for the sake of data compression, 133 | //and an all-zero group is encoded as a single character "z" instead of "!!!!!". 134 | if (currByte == 'z') { 135 | if (chunkIndex > 0) { 136 | throw new IllegalArgumentException("The payload is not base 85 encoded."); 137 | } 138 | chunk[chunkIndex++] = '!'; 139 | chunk[chunkIndex++] = '!'; 140 | chunk[chunkIndex++] = '!'; 141 | chunk[chunkIndex++] = '!'; 142 | chunk[chunkIndex++] = '!'; 143 | } else { 144 | chunk[chunkIndex++] = currByte; 145 | } 146 | 147 | if (chunkIndex == 5) { 148 | bytebuff.put(decodeChunk(chunk)); 149 | Arrays.fill(chunk, (byte) 0); 150 | chunkIndex = 0; 151 | } 152 | } 153 | 154 | //If we didn't end on 0, then we need some padding 155 | if (chunkIndex > 0) { 156 | int numPadded = chunk.length - chunkIndex; 157 | Arrays.fill(chunk, chunkIndex, chunk.length, (byte)'u'); 158 | byte[] paddedDecode = decodeChunk(chunk); 159 | for(int i = 0 ; i < paddedDecode.length - numPadded; i++) { 160 | bytebuff.put(paddedDecode[i]); 161 | } 162 | } 163 | 164 | bytebuff.flip(); 165 | return Arrays.copyOf(bytebuff.array(),bytebuff.limit()); 166 | } 167 | 168 | private static byte[] decodeChunk(byte[] chunk) { 169 | if (chunk.length != 5) { 170 | throw new IllegalArgumentException("You can only decode chunks of size 5."); 171 | } 172 | int value = 0; 173 | value += (chunk[0] - ASCII_SHIFT) * BASE85_POW[4]; 174 | value += (chunk[1] - ASCII_SHIFT) * BASE85_POW[3]; 175 | value += (chunk[2] - ASCII_SHIFT) * BASE85_POW[2]; 176 | value += (chunk[3] - ASCII_SHIFT) * BASE85_POW[1]; 177 | value += (chunk[4] - ASCII_SHIFT) * BASE85_POW[0]; 178 | 179 | return intToByte(value); 180 | } 181 | 182 | private static int byteToInt(byte[] value) { 183 | if (value == null || value.length != 4) { 184 | throw new IllegalArgumentException("You cannot create an int without exactly 4 bytes."); 185 | } 186 | return ByteBuffer.wrap(value).getInt(); 187 | } 188 | 189 | private static byte[] intToByte(int value) { 190 | return new byte[] { 191 | (byte) (value >>> 24), 192 | (byte) (value >>> 16), 193 | (byte) (value >>> 8), 194 | (byte) (value) 195 | }; 196 | } 197 | 198 | 199 | 200 | } -------------------------------------------------------------------------------- /mt/base_converter/ASCII_Encryptions/AsciiMT.java: -------------------------------------------------------------------------------- 1 | /** 2 | Source from Modder Hub 3 | */ 4 | package mt.base_converter.ASCII_Encryptions; 5 | 6 | import android.content.Context; 7 | import android.support.annotation.NonNull; 8 | 9 | import mt.base_converter.interfaces.MTImpl; 10 | import mt.base_converter.MTUtil; 11 | 12 | import java.util.Iterator; 13 | 14 | /** 15 | * @Author and @Creator Mr Duy on Github on 06-Feb-17. 16 | */ 17 | 18 | /* ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 19 | */ 20 | 21 | public class AsciiMT extends MTImpl { 22 | private String asciiToText(String text) { 23 | String[] arr = text.split(" "); 24 | setMax(arr.length); 25 | StringBuilder result = new StringBuilder(); 26 | for (String codePoint : arr) { 27 | try { 28 | result.append(Character.toChars(Integer.parseInt(codePoint))); 29 | incConfident(); 30 | } catch (Exception e) { 31 | result.append(codePoint); 32 | } 33 | } 34 | return result.toString(); 35 | } 36 | 37 | private String textToAscii(String text) { 38 | setMax(text.length()); 39 | setConfident(text.length()); 40 | 41 | StringBuilder result = new StringBuilder(); 42 | Iterator codePoints = MTUtil.codePoints(text).iterator(); 43 | while (codePoints.hasNext()) { 44 | result.append(codePoints.next()); 45 | if (codePoints.hasNext()) { 46 | result.append(" "); 47 | } 48 | } 49 | return result.toString(); 50 | } 51 | 52 | @NonNull 53 | @Override 54 | public String encode(@NonNull String text) { 55 | return textToAscii(text); 56 | } 57 | 58 | @NonNull 59 | @Override 60 | public String decode(@NonNull String text) { 61 | return asciiToText(text); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /mt/base_converter/AbtashMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | public class AbtashMT { 8 | 9 | public static String encode(String text) { 10 | text = text.toLowerCase(); 11 | String result = ""; 12 | for (int i = 0; i < text.length(); i++) { 13 | char character = text.charAt(i); 14 | if (character == 'a') { result = result + "z"; } 15 | else if (character == 'b') { result = result + "y"; } 16 | else if (character == 'c') { result = result + "x"; } 17 | else if (character == 'd') { result = result + "w"; } 18 | else if (character == 'e') { result = result + "v"; } 19 | else if (character == 'f') { result = result + "u"; } 20 | else if (character == 'g') { result = result + "t"; } 21 | else if (character == 'h') { result = result + "s"; } 22 | else if (character == 'i') { result = result + "r"; } 23 | else if (character == 'j') { result = result + "q"; } 24 | else if (character == 'k') { result = result + "p"; } 25 | else if (character == 'l') { result = result + "o"; } 26 | else if (character == 'm') { result = result + "n"; } 27 | else if (character == 'n') { result = result + "m"; } 28 | else if (character == 'o') { result = result + "l"; } 29 | else if (character == 'p') { result = result + "k"; } 30 | else if (character == 'q') { result = result + "j"; } 31 | else if (character == 'r') { result = result + "i"; } 32 | else if (character == 's') { result = result + "h"; } 33 | else if (character == 't') { result = result + "g"; } 34 | else if (character == 'u') { result = result + "f"; } 35 | else if (character == 'v') { result = result + "e"; } 36 | else if (character == 'w') { result = result + "d"; } 37 | else if (character == 'x') { result = result + "c"; } 38 | else if (character == 'y') { result = result + "b"; } 39 | else if (character == 'z') { result = result + "a"; } 40 | else { result = result + String.valueOf(character); } 41 | 42 | } 43 | return result; 44 | } 45 | 46 | public static String decode(String text) { 47 | text = text.toLowerCase(); 48 | String result = ""; 49 | for (int i = 0; i < text.length(); i++) { 50 | char character = text.charAt(i); 51 | if (character == 'z') { result = result + "a"; } 52 | else if (character == 'y') { result = result + "b"; } 53 | else if (character == 'x') { result = result + "c"; } 54 | else if (character == 'w') { result = result + "d"; } 55 | else if (character == 'v') { result = result + "e"; } 56 | else if (character == 'u') { result = result + "f"; } 57 | else if (character == 't') { result = result + "g"; } 58 | else if (character == 's') { result = result + "h"; } 59 | else if (character == 'r') { result = result + "i"; } 60 | else if (character == 'q') { result = result + "j"; } 61 | else if (character == 'p') { result = result + "k"; } 62 | else if (character == 'o') { result = result + "l"; } 63 | else if (character == 'n') { result = result + "m"; } 64 | else if (character == 'm') { result = result + "n"; } 65 | else if (character == 'l') { result = result + "o"; } 66 | else if (character == 'k') { result = result + "p"; } 67 | else if (character == 'j') { result = result + "q"; } 68 | else if (character == 'i') { result = result + "r"; } 69 | else if (character == 'h') { result = result + "s"; } 70 | else if (character == 'g') { result = result + "t"; } 71 | else if (character == 'f') { result = result + "u"; } 72 | else if (character == 'e') { result = result + "v"; } 73 | else if (character == 'd') { result = result + "w"; } 74 | else if (character == 'c') { result = result + "x"; } 75 | else if (character == 'b') { result = result + "y"; } 76 | else if (character == 'a') { result = result + "z"; } 77 | else { result = result + String.valueOf(character); } 78 | 79 | } 80 | return result; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /mt/base_converter/BaconianMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | 8 | import java.util.Vector; 9 | /** 10 | * ReCreated by @Maharna's Tech (Subscribe our YT Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 4-Dec-22. 11 | */ 12 | 13 | public class BaconianMT { 14 | 15 | public static String encode(String text) { 16 | text = text.toLowerCase(); 17 | String result = ""; 18 | for (int i = 0; i < text.length(); i++) { 19 | char character = text.charAt(i); 20 | if (character == 'a') { result += "aaaaa"; } 21 | else if (character == 'b') { result += "aaaab"; } 22 | else if (character == 'c') { result += "aaaba"; } 23 | else if (character == 'd') { result += "aaabb"; } 24 | else if (character == 'e') { result += "aabaa"; } 25 | else if (character == 'f') { result += "aabab"; } 26 | else if (character == 'g') { result += "aabba"; } 27 | else if (character == 'h') { result += "aabbb"; } 28 | else if (character == 'i') { result += "abaaa"; } 29 | else if (character == 'j') { result += "abaab"; } 30 | else if (character == 'k') { result += "ababa"; } 31 | else if (character == 'l') { result += "ababb"; } 32 | else if (character == 'm') { result += "abbaa"; } 33 | else if (character == 'n') { result += "abbab"; } 34 | else if (character == 'o') { result += "abbba"; } 35 | else if (character == 'p') { result += "abbbb"; } 36 | else if (character == 'q') { result += "baaaa"; } 37 | else if (character == 'r') { result += "baaab"; } 38 | else if (character == 's') { result += "baaba"; } 39 | else if (character == 't') { result += "baabb"; } 40 | else if (character == 'u') { result += "babaa"; } 41 | else if (character == 'v') { result += "babab"; } 42 | else if (character == 'w') { result += "babba"; } 43 | else if (character == 'x') { result += "babbb"; } 44 | else if (character == 'y') { result += "bbaaa"; } 45 | else if (character == 'z') { result += "bbaab"; } 46 | else { result = result + String.valueOf(character); } 47 | 48 | } 49 | return result; 50 | } 51 | 52 | public static String decode(String text) { 53 | String result = ""; 54 | 55 | Vector spaceIndex = new Vector(); 56 | int i = text.indexOf(' '); 57 | while (i >= 0) { 58 | spaceIndex.add(i / 5); 59 | i = text.indexOf(' ', i + 1); 60 | } 61 | 62 | String text2 = text.replaceAll("[^a-zA-Z]", ""); 63 | String[] tokens = text2.split("(?<=\\G.{5})"); 64 | for (i = 0; i < tokens.length; i++) { 65 | if (spaceIndex.contains(i)) { 66 | result += " "; 67 | } 68 | String token = tokens[i]; 69 | System.out.println(token); 70 | if (token.equals("aaaaa")) { result += "a"; } 71 | else if (token.equals("aaaab")) { result += "b"; } 72 | else if (token.equals("aaaba")) { result += "c"; } 73 | else if (token.equals("aaabb")) { result += "d"; } 74 | else if (token.equals("aabaa")) { result += "e"; } 75 | else if (token.equals("aabab")) { result += "f"; } 76 | else if (token.equals("aabba")) { result += "g"; } 77 | else if (token.equals("aabbb")) { result += "h"; } 78 | else if (token.equals("abaaa")) { result += "i"; } 79 | else if (token.equals("abaab")) { result += "j"; } 80 | else if (token.equals("ababa")) { result += "k"; } 81 | else if (token.equals("ababb")) { result += "l"; } 82 | else if (token.equals("abbaa")) { result += "m"; } 83 | else if (token.equals("abbab")) { result += "n"; } 84 | else if (token.equals("abbba")) { result += "o"; } 85 | else if (token.equals("abbbb")) { result += "p"; } 86 | else if (token.equals("baaaa")) { result += "q"; } 87 | else if (token.equals("baaab")) { result += "r"; } 88 | else if (token.equals("baaba")) { result += "s"; } 89 | else if (token.equals("baabb")) { result += "t"; } 90 | else if (token.equals("babaa")) { result += "u"; } 91 | else if (token.equals("babab")) { result += "v"; } 92 | else if (token.equals("babba")) { result += "w"; } 93 | else if (token.equals("babbb")) { result += "x"; } 94 | else if (token.equals("bbaaa")) { result += "y"; } 95 | else if (token.equals("bbaab")) { result += "z"; } 96 | } 97 | return result; 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /mt/base_converter/Base_Encryptions/Base16MT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter.Base_Encryptions; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | 12 | import org.apache.commons.codec.binary.Base16; 13 | 14 | /** 15 | @Author and @Creator Mr Duy on Github on 06-Feb-17. 16 | */ 17 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 18 | */ 19 | public class Base16MT extends MTImpl { 20 | private Base16 base16 = new Base16(); 21 | 22 | @NonNull 23 | @Override 24 | public String encode(@NonNull String text) { 25 | setMax(1); 26 | try { 27 | String result = new String(base16.encode(text.getBytes())); 28 | setConfident(1); 29 | return result; 30 | } catch (Exception e) { 31 | setConfident(0); 32 | return text; 33 | } 34 | } 35 | 36 | @NonNull 37 | @Override 38 | public String decode(@NonNull String text) { 39 | setMax(1); 40 | try { 41 | setConfident(1); 42 | return new String(base16.decode(text.getBytes())); 43 | } catch (Exception e) { 44 | setConfident(0); 45 | return text; 46 | } 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /mt/base_converter/Base_Encryptions/Base32MT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub. 3 | */ 4 | 5 | package mt.base_converter.Base_Encryptions; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | 12 | import org.apache.commons.codec.binary.Base32; 13 | 14 | /** 15 | @Author and @Creator Mr Duy on Github on 06-Feb-17. 16 | */ 17 | 18 | /* ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 19 | */ 20 | 21 | public class Base32MT extends MTImpl { 22 | private Base32 base32 = new Base32(); 23 | 24 | @NonNull 25 | @Override 26 | public String encode(@NonNull String text) { 27 | setMax(1); 28 | try { 29 | String result = new String(base32.encode(text.getBytes())); 30 | setConfident(1); 31 | return result; 32 | } catch (Exception e) { 33 | setConfident(0); 34 | return text; 35 | } 36 | } 37 | 38 | @NonNull 39 | @Override 40 | public String decode(@NonNull String text) { 41 | setMax(1); 42 | try { 43 | setConfident(1); 44 | return new String(base32.decode(text.getBytes())); 45 | } catch (Exception e) { 46 | setConfident(0); 47 | return text; 48 | } 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /mt/base_converter/Base_Encryptions/Base58MT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter.Base_Encryptions; 2 | 3 | 4 | /** 5 | * ReCreated by @Maharna's Tech (Subscribe our YT Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 4-Dec-22. 6 | */ 7 | 8 | 9 | public class Base58MT { 10 | 11 | private static final char[] ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" 12 | .toCharArray(); 13 | private static final int BASE_58 = ALPHABET.length; 14 | private static final int BASE_256 = 256; 15 | 16 | private static final int[] INDEXES = new int[128]; 17 | static { 18 | for (int i = 0; i < INDEXES.length; i++) { 19 | INDEXES[i] = -1; 20 | } 21 | for (int i = 0; i < ALPHABET.length; i++) { 22 | INDEXES[ALPHABET[i]] = i; 23 | } 24 | } 25 | 26 | 27 | 28 | public static String encode(byte[] input) { 29 | if (input.length == 0) { 30 | // paying with the same coin 31 | return ""; 32 | } 33 | 34 | // 35 | // Make a copy of the input since we are going to modify it. 36 | // 37 | input = copyOfRange(input, 0, input.length); 38 | 39 | // 40 | // Count leading zeroes 41 | // 42 | int zeroCount = 0; 43 | while (zeroCount < input.length && input[zeroCount] == 0) { 44 | ++zeroCount; 45 | } 46 | 47 | // 48 | // The actual encoding 49 | // 50 | byte[] temp = new byte[input.length * 2]; 51 | int j = temp.length; 52 | 53 | int startAt = zeroCount; 54 | while (startAt < input.length) { 55 | byte mod = divmod58(input, startAt); 56 | if (input[startAt] == 0) { 57 | ++startAt; 58 | } 59 | 60 | temp[--j] = (byte) ALPHABET[mod]; 61 | } 62 | 63 | // 64 | // Strip extra '1' if any 65 | // 66 | while (j < temp.length && temp[j] == ALPHABET[0]) { 67 | ++j; 68 | } 69 | 70 | // 71 | // Add as many leading '1' as there were leading zeros. 72 | // 73 | while (--zeroCount >= 0) { 74 | temp[--j] = (byte) ALPHABET[0]; 75 | } 76 | 77 | byte[] output = copyOfRange(temp, j, temp.length); 78 | return new String(output); 79 | } 80 | 81 | public static byte[] decode(String input) { 82 | if (input.length() == 0) { 83 | // paying with the same coin 84 | return new byte[0]; 85 | } 86 | 87 | byte[] input58 = new byte[input.length()]; 88 | // 89 | // Transform the String to a base58 byte sequence 90 | // 91 | for (int i = 0; i < input.length(); ++i) { 92 | char c = input.charAt(i); 93 | 94 | int digit58 = -1; 95 | if (c >= 0 && c < 128) { 96 | digit58 = INDEXES[c]; 97 | } 98 | if (digit58 < 0) { 99 | throw new RuntimeException("Not a Base58 input: " + input); 100 | } 101 | 102 | input58[i] = (byte) digit58; 103 | } 104 | 105 | // 106 | // Count leading zeroes 107 | // 108 | int zeroCount = 0; 109 | while (zeroCount < input58.length && input58[zeroCount] == 0) { 110 | ++zeroCount; 111 | } 112 | 113 | // 114 | // The encoding 115 | // 116 | byte[] temp = new byte[input.length()]; 117 | int j = temp.length; 118 | 119 | int startAt = zeroCount; 120 | while (startAt < input58.length) { 121 | byte mod = divmod256(input58, startAt); 122 | if (input58[startAt] == 0) { 123 | ++startAt; 124 | } 125 | 126 | temp[--j] = mod; 127 | } 128 | 129 | // 130 | // Do no add extra leading zeroes, move j to first non null byte. 131 | // 132 | while (j < temp.length && temp[j] == 0) { 133 | ++j; 134 | } 135 | 136 | return copyOfRange(temp, j - zeroCount, temp.length); 137 | } 138 | 139 | private static byte divmod58(byte[] number, int startAt) { 140 | int remainder = 0; 141 | for (int i = startAt; i < number.length; i++) { 142 | int digit256 = (int) number[i] & 0xFF; 143 | int temp = remainder * BASE_256 + digit256; 144 | 145 | number[i] = (byte) (temp / BASE_58); 146 | 147 | remainder = temp % BASE_58; 148 | } 149 | 150 | return (byte) remainder; 151 | } 152 | 153 | private static byte divmod256(byte[] number58, int startAt) { 154 | int remainder = 0; 155 | for (int i = startAt; i < number58.length; i++) { 156 | int digit58 = (int) number58[i] & 0xFF; 157 | int temp = remainder * BASE_58 + digit58; 158 | 159 | number58[i] = (byte) (temp / BASE_256); 160 | 161 | remainder = temp % BASE_256; 162 | } 163 | 164 | return (byte) remainder; 165 | } 166 | 167 | private static byte[] copyOfRange(byte[] source, int from, int to) { 168 | byte[] range = new byte[to - from]; 169 | System.arraycopy(source, from, range, 0, range.length); 170 | 171 | return range; 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /mt/base_converter/Base_Encryptions/Base64MT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter.Base_Encryptions; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | 12 | import org.apache.commons.codec.binary.Base64; 13 | 14 | import java.nio.charset.Charset; 15 | /** 16 | @Author and @OriginalCreator Mr Duy(Codec) on Github on 06-Feb-17. 17 | */ 18 | /* ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 19 | */ 20 | 21 | public class Base64MT extends MTImpl { 22 | @NonNull 23 | @Override 24 | public String encode(@NonNull String token) { 25 | setMax(1); 26 | try { 27 | byte[] encodedBytes = new Base64().encode(token.getBytes()); 28 | String result = new String(encodedBytes, Charset.forName("UTF-8")); 29 | setConfident(1); 30 | return result; 31 | } catch (Exception e) { 32 | e.printStackTrace(); 33 | setConfident(0); 34 | return token; 35 | } 36 | } 37 | 38 | @NonNull 39 | @Override 40 | public String decode(@NonNull String token) { 41 | setMax(1); 42 | try { 43 | byte[] decodedBytes = new Base64().decode(token.getBytes()); 44 | String result = new String(decodedBytes, Charset.forName("UTF-8")); 45 | setConfident(1); 46 | return result; 47 | } catch (Exception e) { 48 | e.printStackTrace(); 49 | setConfident(0); 50 | return token; 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /mt/base_converter/Base_Encryptions/Base91MT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter.Base_Encryptions; 2 | 3 | 4 | 5 | 6 | import java.io.ByteArrayOutputStream; 7 | 8 | /** 9 | * Modified version of Jochaim Henke's original code from 10 | * http://base91.sourceforge.net/ 11 | * 12 | * basE91 encoding/decoding routines 13 | * 14 | * Copyright (c) 2000-2006 Joachim Henke All rights reserved. 15 | * 16 | * Redistribution and use in source and binary forms, with or without 17 | * modification, are permitted provided that the following conditions are met: 18 | * 19 | * - Redistributions of source code must retain the above copyright notice, this 20 | * list of conditions and the following disclaimer. - Redistributions in binary 21 | * form must reproduce the above copyright notice, this list of conditions and 22 | * the following disclaimer in the documentation and/or other materials provided 23 | * with the distribution. - Neither the name of Joachim Henke nor the names of 24 | * his contributors may be used to endorse or promote products derived from this 25 | * software without specific prior written permission. 26 | * 27 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 28 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 31 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 | * POSSIBILITY OF SUCH DAMAGE. 38 | * 39 | * @author Joachim Henke (Original version) 40 | * @author Benedikt Waldvogel (Modifications) 41 | */ 42 | 43 | /** 44 | * ReCreated by @Maharna's Tech (Subscribe our YT Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 4-Dec-22. 45 | */ 46 | 47 | 48 | public class Base91MT { 49 | 50 | private static final String BASE91_ALPHABET = 51 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + 52 | "!#$%&()*+,./:;<=>?@[]^_`{|}~\""; 53 | 54 | private static final int[] BASE91_DECODE_TABLE = new int[256]; 55 | 56 | static { 57 | for (int i = 0; i < BASE91_DECODE_TABLE.length; i++) { 58 | BASE91_DECODE_TABLE[i] = -1; 59 | } 60 | for (int i = 0; i < BASE91_ALPHABET.length(); i++) { 61 | BASE91_DECODE_TABLE[BASE91_ALPHABET.charAt(i)] = i; 62 | } 63 | } 64 | 65 | // Base91 Encoding 66 | public static String encode(byte[] input) { 67 | StringBuilder encoded = new StringBuilder(); 68 | int n = 0, b = 0, v = 0; 69 | 70 | for (byte c : input) { 71 | n |= (c & 0xFF) << b; 72 | b += 8; 73 | if (b > 13) { 74 | v = n & 8191; 75 | if (v > 88) { 76 | n >>= 13; 77 | b -= 13; 78 | } else { 79 | v = n & 16383; 80 | n >>= 14; 81 | b -= 14; 82 | } 83 | encoded.append(BASE91_ALPHABET.charAt(v % 91)); 84 | encoded.append(BASE91_ALPHABET.charAt(v / 91)); 85 | } 86 | } 87 | if (b != 0) { 88 | encoded.append(BASE91_ALPHABET.charAt(n % 91)); 89 | if (b > 7 || n > 90) { 90 | encoded.append(BASE91_ALPHABET.charAt(n / 91)); 91 | } 92 | } 93 | return encoded.toString(); 94 | } 95 | 96 | // Base91 Decoding 97 | public static byte[] decode(String input) { 98 | java.util.ArrayList output = new java.util.ArrayList<>(); 99 | int n = 0, b = 0, v = -1; 100 | 101 | for (char c : input.toCharArray()) { 102 | if (BASE91_DECODE_TABLE[c] == -1) { 103 | continue; // Skip invalid characters 104 | } 105 | 106 | if (v == -1) { 107 | v = BASE91_DECODE_TABLE[c]; 108 | } else { 109 | v += BASE91_DECODE_TABLE[c] * 91; 110 | n |= v << b; 111 | b += (v & 8191) > 88 ? 13 : 14; 112 | 113 | while (b > 7) { 114 | output.add((byte) (n & 0xFF)); 115 | n >>= 8; 116 | b -= 8; 117 | } 118 | v = -1; 119 | } 120 | } 121 | 122 | if (v != -1) { 123 | output.add((byte) ((n | v << b) & 0xFF)); 124 | } 125 | 126 | byte[] decodedBytes = new byte[output.size()]; 127 | for (int i = 0; i < output.size(); i++) { 128 | decodedBytes[i] = output.get(i); 129 | } 130 | return decodedBytes; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /mt/base_converter/BeaufortMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | import java.lang.Character; 7 | import mt.base_converter.interfaces.BeaufortImpl; 8 | 9 | /** 10 | * ReCreated by @Maharna's Tech (Subscribe our YT Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 4-Dec-22. 11 | */ 12 | 13 | 14 | public class BeaufortMT implements BeaufortImpl { 15 | 16 | private char[][] table; 17 | private char[] cols; 18 | private char[] rows; 19 | 20 | 21 | private char[][] getTable() { 22 | if (this.table == null) { 23 | this.createTable(); 24 | } 25 | return this.table; 26 | } 27 | 28 | 29 | public char[] getCols() { 30 | if (this.cols == null) { 31 | this.cols = "abcdefghijklmnopqrstuvwxyz".toCharArray(); 32 | } 33 | return this.cols; 34 | } 35 | 36 | 37 | public char[] getRows() { 38 | if (this.rows == null) { 39 | this.rows = "ZYXWVUTSRQPONMLKJIHGFEDCBA".toCharArray(); 40 | } 41 | return this.rows; 42 | } 43 | 44 | 45 | private void createTable() { 46 | char[][] table = new char[26][26]; 47 | table[0] = "ZYXWVUTSRQPONMLKJIHGFEDCBA".toCharArray(); 48 | 49 | for (int i = 1; i < 26; i++) { 50 | for (int j = 1; j < 26; j++) { 51 | table[i][j - 1] = table[i - 1][j]; 52 | } 53 | table[i][25] = table[i - 1][0]; 54 | } 55 | 56 | this.table = table; 57 | } 58 | 59 | 60 | @Override 61 | public String removeInvalidCharacters(String s) { 62 | 63 | return null; 64 | } 65 | 66 | 67 | @Override 68 | public String encrypt(String key, String text) { 69 | 70 | // Init local variables 71 | char[] textArray = text.toCharArray(); 72 | char[] keyArray = key.toCharArray(); 73 | StringBuilder cipherStringBuilder = new StringBuilder(text.length()); 74 | 75 | int inputStringIterator = 0; 76 | while (inputStringIterator < textArray.length) { // Iterates over the whole string 77 | 78 | // Init the column iterator 79 | int columnIterator = 0; 80 | 81 | // Iterates over the password/columns 82 | while (columnIterator < keyArray.length && inputStringIterator < textArray.length) { 83 | 84 | // Get indexes 85 | int rowIndex = this.getIndexOfColCharacter(textArray[inputStringIterator]); 86 | int colIndex = -1; 87 | if(rowIndex > -1) { 88 | colIndex = this.getIndexOfRowCharacter(keyArray[columnIterator]); 89 | } 90 | 91 | // Append to the ciphered text and iterate 92 | if (rowIndex > -1 && colIndex > -1) { 93 | cipherStringBuilder.append(this.getTable()[rowIndex][colIndex]); 94 | inputStringIterator++; 95 | columnIterator++; 96 | } else { 97 | inputStringIterator++; 98 | } 99 | } 100 | } 101 | 102 | return cipherStringBuilder.toString(); 103 | } 104 | 105 | 106 | @Override 107 | public String decrypt(String key, String text) { 108 | 109 | char[] keyArray = key.toCharArray(); 110 | char[] textArray = text.toCharArray(); 111 | StringBuilder openStringBuilder = new StringBuilder(text.length()); 112 | 113 | int inputStringIterator = 0; 114 | while (inputStringIterator < textArray.length) { // Iterates over the whole string 115 | 116 | // Init the column iterator 117 | int columnIterator = 0; 118 | 119 | // Iterates over the password/columns 120 | while (columnIterator < keyArray.length && inputStringIterator < textArray.length) { 121 | 122 | // Get indexes 123 | int rowIndex = this.getIndexOfRowCharacter(keyArray[columnIterator]); 124 | int colIndex = -1; 125 | if (rowIndex >= 0) { 126 | colIndex = this.getIndexOfTableCharacter(textArray[inputStringIterator], rowIndex); 127 | } 128 | 129 | // Append to the ciphered text and iterate 130 | if(rowIndex != -1 && colIndex != -1) { 131 | openStringBuilder.append(Character.toUpperCase(this.getCols()[colIndex])); 132 | inputStringIterator++; 133 | columnIterator++; 134 | } else { 135 | inputStringIterator++; 136 | } 137 | } 138 | } 139 | 140 | return openStringBuilder.toString(); 141 | } 142 | 143 | /** 144 | * Returns row number of the given character. 145 | * Returns -1 if the character was not found. 146 | * 147 | * @param c The character. 148 | * @return The row number. 149 | */ 150 | private int getIndexOfRowCharacter(char c) { 151 | for (int i = 0; i < 26; i++) { 152 | if (this.getRows()[i] == Character.toUpperCase(c)) { 153 | return i; 154 | } 155 | } 156 | return -1; // Fallback 157 | } 158 | 159 | 160 | private int getIndexOfColCharacter(char c) { 161 | for (int i = 0; i < 26; i++) { 162 | if (this.getCols()[i] == Character.toLowerCase(c)) { 163 | return i; 164 | } 165 | } 166 | return -1; // Fallback 167 | } 168 | 169 | 170 | private int getIndexOfTableCharacter(char c, int row) { 171 | for (int i = 0; i < 26; i++) { 172 | if (this.getTable()[row][i] == Character.toUpperCase(c)) { 173 | return i; 174 | } 175 | } 176 | return -1; // Fallback 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /mt/base_converter/BinaryMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from MODDER HUB 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | import mt.base_converter.MTUtil; 12 | 13 | import java.util.ArrayList; 14 | 15 | /** 16 | @Author and @Creator Mr Duy on Github on 06-Feb-17. 17 | */ 18 | /* ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 19 | */ 20 | 21 | public class BinaryMT extends MTImpl { 22 | 23 | /** 24 | @Maharna's Tech 25 | * convert text to binary 26 | * text -> 01100110 01101111 01101111 27 | */ 28 | private String textToBinary(String text) { 29 | ArrayList codePoints = MTUtil.codePointsArr(text); 30 | setMax(codePoints.size()); 31 | 32 | StringBuilder binary = new StringBuilder(); 33 | for (int i = 0; i < codePoints.size(); i++) { 34 | Integer codePoint = codePoints.get(i); 35 | try { 36 | String bin = Integer.toBinaryString(codePoint); 37 | bin = appendZero(bin); 38 | binary.append(bin); 39 | if (i != codePoints.size() - 1) { 40 | binary.append(' '); 41 | } 42 | incConfident(); 43 | } catch (Exception e) { 44 | e.printStackTrace(); 45 | } 46 | } 47 | return binary.toString(); 48 | } 49 | 50 | private String appendZero(String binary) { 51 | int length = binary.length(); 52 | int count = 8; 53 | while (count < length) count += 8; 54 | StringBuilder binBuilder = new StringBuilder(binary); 55 | while (binBuilder.length() < count) binBuilder.insert(0, "0"); 56 | return binBuilder.toString(); 57 | } 58 | 59 | 60 | /** 61 | @Maharna's Tech 62 | * convert binary to text 63 | * 01100110 01101111 01101111 -> text.. 64 | * 65 | * @param text input 66 | * @return unicode text from binary 67 | */ 68 | private String binaryToText(String text) { 69 | StringBuilder builder = new StringBuilder(); 70 | String[] arr = text.split(" "); 71 | setMax(arr); 72 | for (String arg : arr) { 73 | try { 74 | int codePoint = Integer.parseInt(arg, 2); 75 | builder.append(Character.toChars(codePoint)); 76 | incConfident(); 77 | } catch (Exception e) { 78 | builder.append(" ").append(arg).append(" "); 79 | } 80 | } 81 | return builder.toString(); 82 | } 83 | 84 | 85 | @NonNull 86 | @Override 87 | public String encode(@NonNull String text) { 88 | return textToBinary(text); 89 | } 90 | 91 | @NonNull 92 | @Override 93 | public String decode(@NonNull String text) { 94 | return binaryToText(text); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /mt/base_converter/Blowfish_Encryptions/BlowfishMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter.Blowfish_Encryptions; 6 | 7 | import javax.crypto.spec.SecretKeySpec; 8 | import javax.crypto.Cipher; 9 | 10 | public class BlowfishMT { 11 | 12 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 13 | */ 14 | public static String encode(String text, String key) { 15 | 16 | try { 17 | SecretKeySpec sks = new SecretKeySpec(key.getBytes("UTF-8"), "Blowfish"); 18 | Cipher cipher = Cipher.getInstance("Blowfish"); 19 | cipher.init(Cipher.ENCRYPT_MODE, sks); 20 | 21 | byte[] enc = cipher.doFinal(text.getBytes()); 22 | return android.util.Base64.encodeToString(enc,android.util.Base64.DEFAULT).trim(); 23 | } catch (Exception e) { 24 | return "Error encrypting Blowfish"; 25 | 26 | } 27 | 28 | } 29 | 30 | public static String decode(String text, String key) { 31 | 32 | try { 33 | 34 | SecretKeySpec sks = new SecretKeySpec(key.getBytes("UTF-8"), "Blowfish"); 35 | Cipher cipher = Cipher.getInstance("Blowfish"); 36 | cipher.init(Cipher.DECRYPT_MODE, sks); 37 | 38 | byte[] dec = cipher.doFinal(android.util.Base64.decode(text,android.util.Base64.DEFAULT)); 39 | return new String(dec).trim(); 40 | 41 | } catch (Exception e) { 42 | return "Error Decrypting Blowfish.\n Plz check your password in preference manager then try again 👍"; 43 | 44 | } 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /mt/base_converter/Blowfish_Encryptions/BlowfishMT2.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from StackOverflow 3 | */ 4 | 5 | package mt.base_converter.Blowfish_Encryptions; 6 | 7 | import javax.crypto.spec.IvParameterSpec; 8 | import javax.crypto.Cipher; 9 | import javax.crypto.spec.SecretKeySpec; 10 | import android.util.Base64; 11 | 12 | public class BlowfishMT2 { 13 | 14 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 2-Feb-23. 15 | */ 16 | public static String encode(String value, String KEY ) { 17 | 18 | try { 19 | SecretKeySpec secretKeySpec = new SecretKeySpec(KEY.getBytes(), "Blowfish"); 20 | Cipher cipher = Cipher.getInstance("Blowfish/CBC/PKCS5Padding"); 21 | cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, new IvParameterSpec(new byte[cipher.getBlockSize()])); 22 | byte[] values = cipher.doFinal(value.getBytes()); 23 | return Base64.encodeToString(values, Base64.DEFAULT).trim(); 24 | 25 | }catch(Exception e){ 26 | 27 | return "An error occurred\n\n "+e.toString(); 28 | } 29 | } 30 | 31 | public static String decode(String value, String KEY) { 32 | try { 33 | byte[] values = Base64.decode(value, Base64.DEFAULT); 34 | SecretKeySpec secretKeySpec = new SecretKeySpec(KEY.getBytes(), "Blowfish"); 35 | Cipher cipher = Cipher.getInstance("Blowfish/CBC/PKCS5Padding"); 36 | cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, new IvParameterSpec(new byte[cipher.getBlockSize()])); 37 | return new String(cipher.doFinal(values)).trim(); 38 | 39 | } catch(Exception e){ 40 | 41 | return "Error in password \nMake sure you add your password in plug-in Preference Manager.. \n There is default password(MTManager) ....\nand this may not work here...\nSo change it to your password\n\n\n"+e.toString(); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /mt/base_converter/CaesarMT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | 6 | 7 | /** 8 | * Created by Duy on 08-Aug-17. 9 | */ 10 | 11 | public class CaesarMT extends mt.base_converter.interfaces.MTImpl { 12 | private static final String NORMAL = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toUpperCase(); 13 | private int offset; 14 | 15 | public CaesarMT() { 16 | this(1); 17 | } 18 | 19 | public CaesarMT(int offset) { 20 | this.offset = offset; 21 | } 22 | 23 | 24 | @NonNull 25 | @Override 26 | public String decode(@NonNull String text) { 27 | return encode(text, 26 - offset); 28 | } 29 | 30 | @NonNull 31 | @Override 32 | public String encode(@NonNull String text) { 33 | return encode(text, offset); 34 | } 35 | 36 | private String encode(String text, int offset) { 37 | setMax(text.length()); 38 | setConfident(0); 39 | 40 | //Take the offset mod 26 then add 26 41 | offset = offset % 26 + 26; 42 | //Declare a StringBuilder to access individual parts of the String 43 | StringBuilder encoded = new StringBuilder(); 44 | //Iterate through all characters in String enc 45 | for (char i : text.toCharArray()) { 46 | //Nested ifs to shift individual elements of the character array 47 | if (Character.isLetter(i)) { 48 | //Check for upper case/lower case 49 | if (Character.isUpperCase(i)) { 50 | //Append character + offset (taking into account wraparound) 51 | encoded.append((char) ('A' + (i - 'A' + offset) % 26)); 52 | } 53 | //Append character + offset (taking into account wraparound) 54 | else { 55 | encoded.append((char) ('a' + (i - 'a' + offset) % 26)); 56 | } 57 | incConfident(); 58 | } else { 59 | //Append characcter to StringBuilder object 60 | encoded.append(i); 61 | } 62 | } 63 | //Return encoded string 64 | return encoded.toString(); 65 | } 66 | 67 | 68 | 69 | 70 | } 71 | -------------------------------------------------------------------------------- /mt/base_converter/ColorMT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | 6 | import mt.base_converter.interfaces.MTImpl; 7 | import mt.base_converter.MTUtil; 8 | import android.graphics.Color; 9 | import java.util.ArrayList; 10 | 11 | /** 12 | * Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 13 | */ 14 | public class ColorMT extends MTImpl { 15 | 16 | public String encode(@NonNull String text) { 17 | setMax(1); 18 | try{ 19 | int clrint = Color.parseColor(text); 20 | return String.valueOf(clrint); 21 | }catch(Exception e){ 22 | String error = new String("It only can convert color hex (e.g #ff00ffff) to \ninteger (e.g -16711681)"); 23 | return error; 24 | 25 | } 26 | 27 | 28 | 29 | 30 | } 31 | 32 | @NonNull 33 | @Override 34 | public String decode(@NonNull String text) { 35 | setMax(1); 36 | try{ 37 | return "#"+Integer.toHexString(Integer.parseInt(text)); 38 | }catch(Exception e){ 39 | String error = new String("Error"); 40 | return error; 41 | 42 | } 43 | 44 | } 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /mt/base_converter/DESMT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import javax.crypto.Cipher; 6 | import javax.crypto.KeyGenerator; 7 | import javax.crypto.NoSuchPaddingException; 8 | import javax.crypto.SecretKey; 9 | 10 | 11 | 12 | import javax.crypto.spec.SecretKeySpec; 13 | import java.security.MessageDigest; 14 | import java.util.Arrays; 15 | 16 | 17 | 18 | 19 | /* Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 11-Nov-22. 20 | */ 21 | 22 | public class DESMT { 23 | 24 | 25 | public String encode(String encrypt, String KEY) { 26 | 27 | try { 28 | SecretKeySpec secretKeySpec = createKey(KEY); 29 | Cipher cipher = Cipher.getInstance("DES"); 30 | cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); 31 | 32 | byte[] charac = encrypt.getBytes("UTF-8"); 33 | byte[] encrypted = cipher.doFinal(charac); 34 | String encrypted_charac = android.util.Base64.encodeToString(encrypted,android.util.Base64.DEFAULT); 35 | return encrypted_charac.replaceAll("\n",""); 36 | 37 | } catch (Exception e) { 38 | return e.toString(); 39 | } 40 | } 41 | 42 | 43 | 44 | public String decode(String decrypt, String KEY) { 45 | 46 | try { 47 | SecretKeySpec secretKeySpec = createKey(KEY); 48 | Cipher cipher = Cipher.getInstance("DES"); 49 | cipher.init(Cipher.DECRYPT_MODE, secretKeySpec); 50 | 51 | byte[] charac = android.util.Base64.decode(decrypt,android.util.Base64.DEFAULT); 52 | byte[] decryption = cipher.doFinal(charac); 53 | String decrypted_charac = new String(decryption); 54 | return decrypted_charac.replaceAll("\n",""); 55 | 56 | } catch (Exception e) { 57 | return e.toString(); 58 | } 59 | } 60 | 61 | 62 | public SecretKeySpec createKey(String chave) { 63 | try { 64 | byte[] charac = chave.getBytes("UTF-8"); 65 | MessageDigest md = MessageDigest.getInstance("SHA-1"); 66 | charac = md.digest(charac); 67 | charac = Arrays.copyOf(charac, 8); 68 | SecretKeySpec secretKeySpec = new SecretKeySpec(charac, "DES"); 69 | return secretKeySpec; 70 | } catch (Exception e) { 71 | return null; 72 | } 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /mt/base_converter/HexMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | import mt.base_converter.MTUtil; 12 | import org.apache.commons.codec.binary.Hex; 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 17 | */ 18 | 19 | public class HexMT extends MTImpl { 20 | 21 | /** 22 | @Maharna's Tech 23 | * convert text to hex 24 | */ 25 | private String hexToTex(String text) { 26 | try{ 27 | byte[] bytes = Hex.decodeHex(text.toCharArray()); 28 | return new String(bytes, "UTF-8").toString(); 29 | }catch(Exception e){ 30 | return "Error"; 31 | 32 | } 33 | 34 | 35 | 36 | 37 | } 38 | 39 | /** 40 | @Maharna's Tech 41 | * convert text to hex 42 | */ 43 | private String textToHex(String text) { 44 | StringBuffer hex = new StringBuffer(); 45 | 46 | // loop chars one by one 47 | for (char temp : text.toCharArray()) { 48 | 49 | // convert char to int, for char `a` decimal 97 50 | int decimal = (int) temp; 51 | 52 | // convert int to hex, for decimal 97 hex 61 53 | hex.append(Integer.toHexString(decimal)); 54 | } 55 | 56 | return hex.toString(); 57 | } 58 | 59 | @NonNull 60 | @Override 61 | public String encode(@NonNull String text) { 62 | return textToHex(text); 63 | } 64 | 65 | @NonNull 66 | @Override 67 | public String decode(@NonNull String text) { 68 | return hexToTex(text); 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /mt/base_converter/MTUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | import android.support.annotation.NonNull; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Iterator; 11 | 12 | /** 13 | * ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 14 | */ 15 | 16 | public class MTUtil { 17 | @NonNull 18 | public static Iterable codePoints(final String string) { 19 | return new Iterable() { 20 | @NonNull 21 | public Iterator iterator() { 22 | return new Iterator() { 23 | int nextIndex = 0; 24 | 25 | public boolean hasNext() { 26 | return nextIndex < string.length(); 27 | } 28 | 29 | public Integer next() { 30 | int result = string.codePointAt(nextIndex); 31 | nextIndex += Character.charCount(result); 32 | return result; 33 | } 34 | 35 | public void remove() { 36 | throw new UnsupportedOperationException(); 37 | } 38 | }; 39 | } 40 | }; 41 | } 42 | 43 | public static ArrayList codePointsArr(String text) { 44 | Iterable iterable = codePoints(text); 45 | ArrayList codePoints = new ArrayList<>(); 46 | for (Integer codePoint : iterable) { 47 | codePoints.add(codePoint); 48 | } 49 | return codePoints; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /mt/base_converter/MorseMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | 12 | import java.util.HashMap; 13 | 14 | /** 15 | * Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 16 | */ 17 | 18 | public class MorseMT extends MTImpl { 19 | private static final char ALPHABET[] = { 20 | 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 21 | 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ' ', 22 | '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; 23 | 24 | private static final String MORSE_CODE[] = {".-", "-...", "-.-.", "-..", ".", "..-.", "--.", 25 | "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", 26 | "-", "..-", "...-", ".--", "-..-", "-.--", "--..", "/", 27 | "-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----."}; 28 | 29 | private static final HashMap TEXT_TO_MORSE_CODES; 30 | private static final HashMap MORSE_CODE_TO_TEXT; 31 | 32 | static { 33 | TEXT_TO_MORSE_CODES = new HashMap<>(); 34 | MORSE_CODE_TO_TEXT = new HashMap<>(); 35 | for (int i = 0; i < ALPHABET.length; i++) { 36 | TEXT_TO_MORSE_CODES.put(ALPHABET[i], MORSE_CODE[i]); 37 | MORSE_CODE_TO_TEXT.put(MORSE_CODE[i], ALPHABET[i]); 38 | } 39 | if (TEXT_TO_MORSE_CODES.size() != MORSE_CODE_TO_TEXT.size()) { 40 | throw new RuntimeException("Wrong size"); 41 | } 42 | } 43 | 44 | private String textToMorse(String text) { 45 | text = text.toLowerCase(); 46 | StringBuilder result = new StringBuilder(); 47 | char[] chars = text.toCharArray(); 48 | setMax(chars.length); 49 | for (int i = 0; i < chars.length; i++) { 50 | if (TEXT_TO_MORSE_CODES.get(chars[i]) != null) { 51 | result.append(TEXT_TO_MORSE_CODES.get(chars[i])); 52 | if (i != chars.length - 1) result.append(" "); 53 | incConfident(); 54 | } else { 55 | result.append(chars[i]); 56 | } 57 | } 58 | return result.toString(); 59 | } 60 | 61 | private String morseToText(String text) { 62 | text = text.toLowerCase(); 63 | String[] chars = text.split("\\s+"); 64 | StringBuilder converted = new StringBuilder(); 65 | setMax(chars); 66 | for (String aChar : chars) { 67 | if (MORSE_CODE_TO_TEXT.get(aChar) != null) { 68 | converted.append(MORSE_CODE_TO_TEXT.get(aChar)); 69 | incConfident(); 70 | } else { 71 | converted.append(aChar); 72 | } 73 | } 74 | return converted.toString(); 75 | } 76 | 77 | @NonNull 78 | @Override 79 | public String encode(@NonNull String text) { 80 | try{ 81 | return textToMorse(text); 82 | }catch(Exception e){ 83 | return "Error while encoding text (╥﹏╥)"; 84 | } 85 | } 86 | 87 | @NonNull 88 | @Override 89 | public String decode(@NonNull String text) { 90 | try{ 91 | return morseToText(text); 92 | }catch(Exception e){ 93 | return "Error while decoding text (╥﹏╥)"; 94 | } 95 | } 96 | 97 | 98 | 99 | } 100 | -------------------------------------------------------------------------------- /mt/base_converter/NPFogNormal.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | 5 | public class NPFogNormal { 6 | /** 7 | * Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 02-Feb-23. 8 | */ 9 | 10 | private static final String hexString = "0123456789ABCDEF"; 11 | 12 | public static String decode(String str, String KEY) { 13 | ByteArrayOutputStream baos = new ByteArrayOutputStream(str.length() / 2); 14 | for (int i = 0; i < str.length(); i += 2) { 15 | baos.write((hexString.indexOf(str.charAt(i)) << 4) | hexString.indexOf(str.charAt(i + 1))); 16 | } 17 | byte[] b = baos.toByteArray(); 18 | int len = b.length; 19 | int keyLen = KEY.length(); 20 | for (int i2 = 0; i2 < len; i2++) { 21 | b[i2] = (byte) (b[i2] ^ KEY.charAt(i2 % keyLen)); 22 | } 23 | return new String(b); 24 | } 25 | public static String encode(String str, String KEY) { 26 | int i = 0; 27 | byte[] bytes = str.getBytes(); 28 | int length = bytes.length; 29 | int length2 = KEY.length(); 30 | for (int i2 = 0; i2 < length; i2++) { 31 | bytes[i2] = (byte) (bytes[i2] ^ KEY.charAt(i2 % length2)); 32 | } 33 | StringBuilder encode = new StringBuilder(bytes.length * 2); 34 | while (i < bytes.length) { 35 | encode.append(hexString.charAt((bytes[i] & 240) >> 4)); 36 | encode.append(hexString.charAt((bytes[i] & 15) >> 0)); 37 | i++; 38 | } 39 | return encode.toString(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /mt/base_converter/OctalMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | import mt.base_converter.interfaces.MTImpl; 11 | import mt.base_converter.MTUtil; 12 | 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 17 | */ 18 | public class OctalMT extends MTImpl { 19 | 20 | 21 | private String octalToText(String text) { 22 | String[] arr = text.split(" "); 23 | setMax(arr); 24 | StringBuilder result = new StringBuilder(); 25 | for (String arg : arr) { 26 | try { 27 | int codePoint = Integer.parseInt(arg, 8); 28 | result.append(Character.toChars(codePoint)); 29 | incConfident(); 30 | } catch (Exception e) { 31 | result.append(" ").append(arg).append(" "); 32 | } 33 | } 34 | 35 | 36 | return result.toString(); 37 | 38 | 39 | 40 | } 41 | 42 | @NonNull 43 | @Override 44 | public String encode(@NonNull final String text) { 45 | final ArrayList chars = MTUtil.codePointsArr(text); 46 | setMax(chars.size()); 47 | setConfident(chars.size()); 48 | 49 | StringBuilder result = new StringBuilder(); 50 | for (int i = 0; i < chars.size(); i++) { 51 | Integer c = chars.get(i); 52 | result.append(Integer.toOctalString(c)); 53 | if (i != chars.size() - 1) { 54 | result.append(" "); 55 | } 56 | } 57 | 58 | return result.toString(); 59 | 60 | } 61 | 62 | @NonNull 63 | @Override 64 | public String decode(@NonNull String text) { 65 | 66 | return octalToText(text); 67 | 68 | 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /mt/base_converter/Rot13MT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | 6 | /** 7 | * Created by Duy on 28-Aug-17. 8 | */ 9 | 10 | public class Rot13MT extends CaesarMT { 11 | public Rot13MT() { 12 | super(13); 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /mt/base_converter/ToMillisMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | import java.util.Date; 10 | import java.util.Calendar; 11 | import java.util.TimeZone; 12 | import java.text.SimpleDateFormat; 13 | import java.text.DateFormat; 14 | import java.util.Scanner; 15 | 16 | /** 17 | * Created by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 18 | */ 19 | public class ToMillisMT { 20 | 21 | 22 | 23 | @NonNull 24 | 25 | public static String encode(@NonNull String text) { 26 | 27 | try { 28 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 29 | Date date = sdf.parse(text.toString()); 30 | int offsetFromUTC = Calendar.getInstance().getTimeZone().getOffset(date.getTime()); 31 | Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); 32 | gmtCal.setTime(date); 33 | gmtCal.add(14, offsetFromUTC); 34 | String result = new StringBuilder(String.valueOf(Long.toString(gmtCal.getTime().getTime() / 1000))).append("000").toString(); 35 | Long i = Long.parseLong(result); 36 | String hexadecimal = Long.toHexString(i); 37 | return "Milliseconds = "+result+"\nSmali hex ID = "+"0x"+hexadecimal+"L" ; 38 | } catch (Exception e) { 39 | return e.toString(); 40 | 41 | } 42 | } 43 | @NonNull 44 | 45 | public static String decode(@NonNull String text) { 46 | 47 | try { 48 | final byte[] utf16Bytes= text.getBytes("UTF-8"); 49 | if(utf16Bytes.length == 13){ 50 | 51 | DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); 52 | 53 | long milliSeconds= Long.parseLong(text.toString()); 54 | System.out.println(milliSeconds); 55 | 56 | Calendar calendar = Calendar.getInstance(); 57 | calendar.setTimeInMillis(milliSeconds); 58 | 59 | return formatter.format(calendar.getTime()); 60 | } else{ 61 | DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); 62 | String decstr = Long.toString(Long.parseLong(text.toString().replace("L",""),16)); 63 | long milliSeconds= Long.parseLong(decstr.toString()); 64 | System.out.println(milliSeconds); 65 | Calendar calendar = Calendar.getInstance(); 66 | calendar.setTimeInMillis(milliSeconds); 67 | return formatter.format(calendar.getTime()); 68 | } 69 | }catch (Exception e){ 70 | 71 | return e.toString(); 72 | 73 | } 74 | 75 | 76 | } 77 | 78 | 79 | } 80 | -------------------------------------------------------------------------------- /mt/base_converter/VigenereMT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter; 6 | /** 7 | * ReCreated by @Maharna's Tech (Subscribe our YT Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 4-Dec-22. 8 | */ 9 | 10 | public class VigenereMT { 11 | public static String encode(String text, String key) { 12 | 13 | text = text.toUpperCase(); 14 | key = key.toUpperCase(); 15 | String result = ""; 16 | int counter = 0; 17 | 18 | for (int i = 0; i < text.length(); i++) { 19 | 20 | char character = text.charAt(i); 21 | if (character < 'A' || character > 'Z') { continue; } 22 | result += (char)((character + key.charAt(counter) - 2 * 'A') % 26 + 'A'); 23 | counter = ++counter % key.length(); 24 | 25 | } 26 | 27 | return result; 28 | 29 | } 30 | 31 | public static String decode(String text, String key) { 32 | 33 | text = text.toUpperCase(); 34 | key = key.toUpperCase(); 35 | String result = ""; 36 | int counter = 0; 37 | 38 | for (int i = 0; i < text.length(); i++) { 39 | 40 | char character = text.charAt(i); 41 | if (character < 'A' || character > 'Z') { continue; } 42 | result += (char)((character - key.charAt(counter) +26) % 26 + 'A'); 43 | counter = ++counter % key.length(); 44 | 45 | } 46 | 47 | return result; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /mt/base_converter/WingdingMT.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | package mt.base_converter; 4 | 5 | import android.content.Context; 6 | import android.support.annotation.NonNull; 7 | 8 | 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | /** 13 | * Created by Duy on 2/13/2018. 14 | * Recreated by Maharna's Tech (Subscribe Maharna's Tech youtube channel and learn how to mod app using MT Manager) 15 | */ 16 | 17 | public class WingdingMT extends mt.base_converter.interfaces.MTImpl { 18 | static final HashMap WING_DINGS_MAP = new HashMap<>(); 19 | 20 | static { 21 | WING_DINGS_MAP.put('!', 9999); 22 | WING_DINGS_MAP.put('"', 9986); 23 | WING_DINGS_MAP.put('#', 9985); 24 | WING_DINGS_MAP.put('$', 128083); 25 | WING_DINGS_MAP.put('%', 128365); 26 | WING_DINGS_MAP.put('&', 128366); 27 | WING_DINGS_MAP.put('\'', 128367); 28 | WING_DINGS_MAP.put('(', 9742); 29 | WING_DINGS_MAP.put(')', 9990); 30 | WING_DINGS_MAP.put('*', 128386); 31 | WING_DINGS_MAP.put('+', 128387); 32 | WING_DINGS_MAP.put(',', 128234); 33 | WING_DINGS_MAP.put('-', 128235); 34 | WING_DINGS_MAP.put('.', 128236); 35 | WING_DINGS_MAP.put('/', 128237); 36 | WING_DINGS_MAP.put('0', 128193); 37 | WING_DINGS_MAP.put('1', 128194); 38 | WING_DINGS_MAP.put('2', 128196); 39 | WING_DINGS_MAP.put('3', 128463); 40 | WING_DINGS_MAP.put('4', 128464); 41 | WING_DINGS_MAP.put('5', 128452); 42 | WING_DINGS_MAP.put('6', 8987); 43 | WING_DINGS_MAP.put('7', 128430); 44 | WING_DINGS_MAP.put('8', 128432); 45 | WING_DINGS_MAP.put('9', 128434); 46 | WING_DINGS_MAP.put(':', 128435); 47 | WING_DINGS_MAP.put(';', 128436); 48 | WING_DINGS_MAP.put('<', 128427); 49 | WING_DINGS_MAP.put('=', 128428); 50 | WING_DINGS_MAP.put('>', 9991); 51 | WING_DINGS_MAP.put('?', 9997); 52 | WING_DINGS_MAP.put('@', 128398); 53 | WING_DINGS_MAP.put('A', 9996); 54 | WING_DINGS_MAP.put('B', 128076); 55 | WING_DINGS_MAP.put('C', 128077); 56 | WING_DINGS_MAP.put('D', 128078); 57 | WING_DINGS_MAP.put('E', 9756); 58 | WING_DINGS_MAP.put('F', 9758); 59 | WING_DINGS_MAP.put('G', 9757); 60 | WING_DINGS_MAP.put('H', 9759); 61 | WING_DINGS_MAP.put('I', 9995); 62 | WING_DINGS_MAP.put('J', 9786); 63 | WING_DINGS_MAP.put('K', 128528); 64 | WING_DINGS_MAP.put('L', 9785); 65 | WING_DINGS_MAP.put('M', 128163); 66 | WING_DINGS_MAP.put('N', 9760); 67 | WING_DINGS_MAP.put('O', 9872); 68 | WING_DINGS_MAP.put('P', 127985); 69 | WING_DINGS_MAP.put('Q', 9992); 70 | WING_DINGS_MAP.put('R', 9788); 71 | WING_DINGS_MAP.put('S', 128167); 72 | WING_DINGS_MAP.put('T', 10052); 73 | WING_DINGS_MAP.put('U', 128326); 74 | WING_DINGS_MAP.put('V', 10014); 75 | WING_DINGS_MAP.put('W', 128328); 76 | WING_DINGS_MAP.put('X', 10016); 77 | WING_DINGS_MAP.put('Y', 10017); 78 | WING_DINGS_MAP.put('Z', 9770); 79 | WING_DINGS_MAP.put('[', 9775); 80 | WING_DINGS_MAP.put(']', 9784); 81 | WING_DINGS_MAP.put('^', 9800); 82 | WING_DINGS_MAP.put('_', 9801); 83 | WING_DINGS_MAP.put('`', 9802); 84 | WING_DINGS_MAP.put('{', 10048); 85 | WING_DINGS_MAP.put('|', 10047); 86 | WING_DINGS_MAP.put('}', 10077); 87 | WING_DINGS_MAP.put('~', 10078); 88 | WING_DINGS_MAP.put(' ', (int) ' '); 89 | } 90 | 91 | @NonNull 92 | @Override 93 | public String decode(@NonNull String text) { 94 | setMax(text.length()); 95 | setConfident(0); 96 | 97 | StringBuilder decoded = new StringBuilder(); 98 | loop: 99 | for (Integer codePoint : MTUtil.codePoints(text)) { 100 | for (Map.Entry entry : WING_DINGS_MAP.entrySet()) { 101 | if (codePoint.equals(entry.getValue())) { 102 | decoded.append(entry.getKey()); 103 | incConfident(); 104 | continue loop; 105 | } 106 | } 107 | decoded.append(Character.toChars(codePoint)); 108 | } 109 | return decoded.toString(); 110 | } 111 | 112 | @NonNull 113 | @Override 114 | public String encode(@NonNull String text) { 115 | System.out.println("WingdingCodec.encode"); 116 | System.out.println("text = " + text); 117 | System.out.println(text.length()); 118 | 119 | setMax(text.length()); 120 | setConfident(0); 121 | StringBuilder encoded = new StringBuilder(); 122 | text = text.toUpperCase(); 123 | for (int i = 0; i < text.length(); i++) { //Iterating through string 124 | if (WING_DINGS_MAP.get(text.charAt(i)) != null) { //If that char of string can be found, 125 | int temp = WING_DINGS_MAP.get(text.charAt(i)); //get the number 126 | //and convert to real char, add to ArrayList //adding char[], because whole char[] needed for UTF-16 Unicode 127 | encoded.append((Character.toChars(temp))); 128 | incConfident(); 129 | } else { 130 | encoded.append(text.charAt(i)); 131 | } 132 | } 133 | return encoded.toString(); 134 | } 135 | 136 | 137 | } 138 | -------------------------------------------------------------------------------- /mt/base_converter/ZalgoMT.java: -------------------------------------------------------------------------------- 1 | package mt.base_converter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | 6 | 7 | 8 | import org.apache.commons.lang3.ArrayUtils; 9 | 10 | 11 | public class ZalgoMT extends mt.base_converter.interfaces.MTImpl { 12 | 13 | public static final char[] ZALGO_UP = 14 | { 15 | '\u030d', /* Ì? */'\u030e', /* ÌŽ */'\u0304', /* Ì„ */'\u0305', /* Ì… */ 16 | '\u033f', /* Ì¿ */'\u0311', /* Ì‘ */'\u0306', /* ̆ */'\u0310', /* Ì? */ 17 | '\u0352', /* Í’ */'\u0357', /* Í— */'\u0351', /* Í‘ */'\u0307', /* ̇ */ 18 | '\u0308', /* ̈ */'\u030a', /* ÌŠ */'\u0342', /* Í‚ */'\u0343', /* Ì“ */ 19 | '\u0344', /* ̈Ì? */'\u034a', /* ÍŠ */'\u034b', /* Í‹ */'\u034c', /* ÍŒ */ 20 | '\u0303', /* ̃ */'\u0302', /* Ì‚ */'\u030c', /* ÌŒ */'\u0350', /* Í? */ 21 | '\u0300', /* Ì€ */'\u0301', /* Ì? */'\u030b', /* Ì‹ */'\u030f', /* Ì? */ 22 | '\u0312', /* Ì’ */'\u0313', /* Ì“ */'\u0314', /* Ì” */'\u033d', /* ̽ */ 23 | '\u0309', /* ̉ */'\u0363', /* Í£ */'\u0364', /* ͤ */'\u0365', /* Í¥ */ 24 | '\u0366', /* ͦ */'\u0367', /* ͧ */'\u0368', /* ͨ */'\u0369', /* Í© */ 25 | '\u036a', /* ͪ */'\u036b', /* Í« */'\u036c', /* ͬ */'\u036d', /* Í­ */ 26 | '\u036e', /* Í® */'\u036f', /* ͯ */'\u033e', /* ̾ */'\u035b', /* Í› */ 27 | '\u0346', /* ͆ */'\u031a' /* Ìš */ 28 | }; 29 | 30 | public static final char[] ZALGO_DOWN = 31 | {'\u0316', /* Ì– */'\u0317', /* Ì— */'\u0318', /* ̘ */'\u0319', /* Ì™ */ 32 | '\u031c', /* Ìœ */'\u031d', /* Ì? */'\u031e', /* Ìž */'\u031f', /* ÌŸ */ 33 | '\u0320', /* Ì */'\u0324', /* ̤ */'\u0325', /* Ì¥ */'\u0326', /* ̦ */ 34 | '\u0329', /* Ì© */'\u032a', /* ̪ */'\u032b', /* Ì« */'\u032c', /* ̬ */ 35 | '\u032d', /* Ì­ */'\u032e', /* Ì® */'\u032f', /* ̯ */'\u0330', /* ̰ */ 36 | '\u0331', /* ̱ */'\u0332', /* ̲ */'\u0333', /* ̳ */'\u0339', /* ̹ */ 37 | '\u033a', /* ̺ */'\u033b', /* Ì» */'\u033c', /* ̼ */'\u0345', /* Í… */ 38 | '\u0347', /* ͇ */'\u0348', /* ͈ */'\u0349', /* ͉ */'\u034d', /* Í? */ 39 | '\u034e', /* ÍŽ */'\u0353', /* Í“ */'\u0354', /* Í” */'\u0355', /* Í• */ 40 | '\u0356', /* Í– */'\u0359', /* Í™ */'\u035a', /* Íš */'\u0323' /* Ì£ */ 41 | }; 42 | 43 | //those always stay in the middle 44 | public static final char[] ZALGO_MID = 45 | {'\u0315', /* Ì• */'\u031b', /* Ì› */'\u0340', /* Ì€ */'\u0341', /* Ì? */ 46 | '\u0358', /* ͘ */'\u0321', /* Ì¡ */'\u0322', /* Ì¢ */'\u0327', /* ̧ */ 47 | '\u0328', /* ̨ */'\u0334', /* Ì´ */'\u0335', /* ̵ */'\u0336', /* ̶ */ 48 | '\u034f', /* Í? */'\u035c', /* Íœ */'\u035d', /* Í? */'\u035e', /* Íž */ 49 | '\u035f', /* ÍŸ */'\u0360', /* Í */'\u0362', /* Í¢ */'\u0338', /* ̸ */ 50 | '\u0337', /* Ì· */'\u0361', /* Í¡ */'\u0489' /* Ò‰_ */ 51 | }; 52 | 53 | 54 | // rand funcs 55 | //--------------------------------------------------- 56 | 57 | //gets an int between 0 and max 58 | 59 | private static int rand(int max) { 60 | return (int) Math.floor(Math.random() * max); 61 | } 62 | 63 | //gets a random char from a zalgo char table 64 | 65 | private static char randomCharFrom(char[] array) { 66 | int ind = (int) Math.floor(Math.random() * array.length); 67 | return array[ind]; 68 | } 69 | 70 | //hide show element 71 | //lookup char to know if its a zalgo char or not 72 | 73 | private static boolean isZalgoChar(char c) { 74 | for (char aZalgo_up : ZALGO_UP) { 75 | if (c == aZalgo_up) { 76 | return true; 77 | } 78 | } 79 | for (char aZalgo_down : ZALGO_DOWN) { 80 | if (c == aZalgo_down) { 81 | return true; 82 | } 83 | } 84 | for (char aZalgo_mid : ZALGO_MID) { 85 | if (c == aZalgo_mid) { 86 | return true; 87 | } 88 | } 89 | return false; 90 | } 91 | 92 | public static String convert(final String text, boolean isMini, boolean isNormal, 93 | boolean up, boolean down, boolean mid) { 94 | StringBuilder result = new StringBuilder(); 95 | 96 | for (int i = 0; i < text.length(); i++) { 97 | if (isZalgoChar(text.charAt(i))) 98 | continue; 99 | 100 | int num_up; 101 | int num_mid; 102 | int num_down; 103 | 104 | //add the normal character 105 | result.append(text.charAt(i)); 106 | 107 | if (isMini) { 108 | num_up = rand(8); 109 | num_mid = rand(2); 110 | num_down = rand(8); 111 | } else if (isNormal) { 112 | num_up = rand(16) / 2 + 1; 113 | num_mid = rand(6) / 2; 114 | num_down = rand(16) / 2 + 1; 115 | } else { 116 | num_up = rand(64) / 4 + 3; 117 | num_mid = rand(16) / 4 + 1; 118 | num_down = rand(64) / 4 + 3; 119 | } 120 | 121 | if (up) { 122 | for (int j = 0; j < num_up; j++) { 123 | result.append(randomCharFrom(ZALGO_UP)); 124 | } 125 | } 126 | if (mid) { 127 | for (int j = 0; j < num_mid; j++) { 128 | result.append(randomCharFrom(ZALGO_MID)); 129 | } 130 | } 131 | if (down) { 132 | for (int j = 0; j < num_down; j++) { 133 | result.append(randomCharFrom(ZALGO_DOWN)); 134 | } 135 | } 136 | } 137 | 138 | 139 | return result.toString(); 140 | } 141 | 142 | 143 | @NonNull 144 | @Override 145 | public String encode(@NonNull String text) { 146 | return convert(text, true, false, true, true, true); 147 | } 148 | 149 | @NonNull 150 | @Override 151 | public String decode(@NonNull String text) { 152 | StringBuilder decoded = new StringBuilder(); 153 | char[] chars = text.toCharArray(); 154 | for (char aChar : chars) { 155 | if (ArrayUtils.contains(ZALGO_DOWN, aChar) 156 | || ArrayUtils.contains(ZALGO_MID, aChar) 157 | || ArrayUtils.contains(ZALGO_UP, aChar)) { 158 | continue; 159 | } 160 | decoded.append(aChar); 161 | } 162 | return decoded.toString(); 163 | } 164 | 165 | 166 | 167 | } 168 | -------------------------------------------------------------------------------- /mt/base_converter/interfaces/BeaufortImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter.interfaces; 6 | 7 | public interface BeaufortImpl { 8 | 9 | 10 | String removeInvalidCharacters(String s); 11 | 12 | 13 | String encrypt(String key, String text); 14 | 15 | 16 | String decrypt(String key, String text); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /mt/base_converter/interfaces/Decoder.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter.interfaces; 6 | 7 | import android.support.annotation.NonNull; 8 | 9 | /** 10 | * ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 11 | */ 12 | 13 | public interface Decoder { 14 | @NonNull 15 | String decode(@NonNull String text); 16 | 17 | int getMax(); 18 | 19 | int getConfident(); 20 | } 21 | -------------------------------------------------------------------------------- /mt/base_converter/interfaces/Encoder.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub. 3 | */ 4 | 5 | package mt.base_converter.interfaces; 6 | 7 | import android.support.annotation.NonNull; 8 | 9 | /** 10 | * ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 11 | */ 12 | 13 | public interface Encoder { 14 | @NonNull 15 | String encode(@NonNull String text); 16 | 17 | int getMax(); 18 | 19 | int getConfident(); 20 | } 21 | -------------------------------------------------------------------------------- /mt/base_converter/interfaces/MT.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source From Modder Hub 3 | */ 4 | 5 | package mt.base_converter.interfaces; 6 | 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | 10 | /** 11 | * ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 12 | */ 13 | public interface MT extends Decoder, Encoder { 14 | @NonNull 15 | 16 | 17 | int getMax(); 18 | 19 | int getConfident(); 20 | } 21 | -------------------------------------------------------------------------------- /mt/base_converter/interfaces/MTImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | Source from Modder Hub 3 | */ 4 | 5 | package mt.base_converter.interfaces; 6 | import bin.mt.plugin.api.MTPluginContext; 7 | import android.content.Context; 8 | 9 | /** 10 | * ReCreated by @Maharna's Tech (Subscribe our Channel and learn Android Application Reversing using Android Device by the Help of MT Manager) on 26-Oct-22. 11 | */ 12 | 13 | public abstract class MTImpl implements MT { 14 | 15 | protected int max = 0; 16 | protected int confident = 0; 17 | 18 | @Override 19 | public int getMax() { 20 | return max; 21 | } 22 | 23 | public void setMax(int max) { 24 | this.max = max; 25 | } 26 | 27 | protected void setMax(char[] arr) { 28 | setMax(arr.length); 29 | } 30 | 31 | protected void setMax(Object[] arr) { 32 | setMax(arr.length); 33 | } 34 | 35 | @Override 36 | public int getConfident() { 37 | return confident; 38 | } 39 | 40 | public void setConfident(int confident) { 41 | this.confident = confident; 42 | } 43 | 44 | public void incConfident() { 45 | confident++; 46 | } 47 | 48 | 49 | } 50 | --------------------------------------------------------------------------------