• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Java [CLASS] Cifrado RxBot

Status
Not open for further replies.

chequinho

Leech
User
Joined
Sep 14, 2012
Messages
357
Reputation
0
Reaction score
1,933
Points
143
Credits
0
‎12 Years of Service‎
51%
Code:
>public class cRxBot {

   private int[] tabla = {0x24, 0x2C, 0xFA, 0x24, 0x7B, 0xE2, 0xD7, 0x51, 0x9D, 0x0C, 0x7E, 0xAA, 0x2E, 0x04, 0xAF, 0xC8,
       0xBF, 0xEF, 0x06, 0xA7, 0xAD, 0xDE, 0x8C, 0x47, 0xCD, 0x55, 0xDB, 0xF1, 0xF8, 0x11, 0x11, 0x9C,
       0xF6, 0xDF, 0xB4, 0xDC, 0xF3, 0x98, 0xF3, 0xD6, 0x70, 0xC9, 0xCE, 0x31, 0x34, 0xC8, 0x6A, 0x86,
       0xFD, 0xFB, 0x51, 0xB0, 0x07, 0xB4, 0x9D, 0xFD, 0xBA, 0xEC, 0x11, 0xC3, 0xB0, 0xF9, 0x30, 0xE9,
       0xC3, 0x73, 0xC8, 0x61, 0x0D, 0x1F, 0xEA, 0x16, 0xC0, 0xC8, 0xD0, 0x46, 0x2A, 0x21, 0xC7, 0xA0,
       0xFC, 0xB2, 0xD0, 0x84, 0xE8, 0x8B, 0x0A, 0x3C, 0x82, 0x28, 0x69, 0x46, 0xFF, 0xC6, 0x8E, 0xF8,
       0x10, 0xA3, 0x8F, 0xA0, 0x1B, 0xAB, 0x82, 0x2C, 0xED, 0x7F, 0x31, 0x2C, 0x30, 0xC1, 0x77, 0x1E,
       0x10, 0x3B, 0xB0, 0x96, 0xA9, 0x36, 0xD2, 0xCD, 0x1E, 0xE8, 0x96, 0x99, 0x3B, 0x5B, 0x3C, 0xF9,
       0xBD, 0x56, 0x0A, 0xED, 0x8D, 0x79, 0xF2, 0x05, 0x11, 0x64, 0x34, 0xE2, 0xAF, 0x13, 0x69, 0x24,
       0x2F, 0x2E, 0x78, 0xC7, 0x16, 0xEC, 0x6F, 0x1E, 0x7B, 0xC7, 0xA4, 0x6C, 0x69, 0xA1, 0xA1, 0xB1,
       0x65, 0xE0, 0x4C, 0xDE, 0x37, 0x5B, 0xCE, 0x85, 0xED, 0x36, 0x2C, 0xD1, 0x62, 0x36, 0xBB, 0x2F,
       0x74, 0x17, 0x50, 0x5E, 0xA9, 0xE5, 0xC1, 0xCB, 0x94, 0xCA, 0xE3, 0x0F, 0x8D, 0x10, 0xD1, 0xD7,
       0x4C, 0x24, 0x9E, 0x1E, 0x83, 0xC5, 0x02, 0x90, 0xBC, 0x92, 0x39, 0xDC, 0xB4, 0x87, 0x6F, 0xE8,
       0x78, 0xDB, 0x76, 0xF1, 0xAF, 0x0B, 0xD8, 0x02, 0xC3, 0x76, 0x3A, 0xA7, 0x62, 0x43, 0xCE, 0x54,
       0xA9, 0x7F, 0xC2, 0x70, 0x76, 0x58, 0xB7, 0x1E, 0x51, 0x0D, 0x74, 0x9A, 0x16, 0x2C, 0x40, 0x06,
       0x32, 0x4D, 0x96, 0xDB, 0xFC, 0x8F, 0xC2, 0xD9, 0xC9, 0xC1, 0xD9, 0xC2, 0xB5, 0x14, 0xB6, 0x91};

   public String Encode(String sText, int iType) {
       String sResult = "";
       for (int i = 0; i < sText.length(); i++) {
           String hexString = StringToHex(String.valueOf(sText.charAt(i)));
           int iTextValue = Integer.parseInt(hexString.replace("0x", ""), 16);
           int iXOR = iTextValue ^ tabla[i];
           if (iType == 1) {
               sResult = sResult + iXOR + ",";
           } else if (iType == 2) {
               sResult = sResult + "x" + Integer.toHexString(iXOR) + "\\";
           }
       }
       if (iType == 1) {
           sResult = "{" + sResult + "0};";
       } else if (iType == 2) {
           sResult = "\"\\" + sResult + "x;\"";
       }
       return sResult;
   }

   public String Decode(String sText, int iType) {
       String sResult = "";
       String sArray[];
       int iTextValue = 0;
       if (iType == 1) {
           sArray = sText.replace("0};", "").replace("{", "").split(",");
       } else if (iType == 2) {
           sArray = sText.replace("\"", "").replace("\\x", ",").replace(",;", "").replaceFirst(",", "").split(",");
       } else {
           return null;
       }
       for (int i = 0; i < sArray.length; i++) {
           if (iType == 1) {
               iTextValue = Integer.parseInt(sArray[i]);
           } else if (iType == 2) {
               iTextValue = Integer.parseInt(sArray[i], 16);
           }
           if (iTextValue < 0) {
               iTextValue += 256;
           }
           int iXOR = iTextValue ^ tabla[i];
           sResult += (char) (iXOR);
       }
       return sResult;
   }

   private String StringToHex(String str) {
       StringBuilder hex = new StringBuilder();
       char[] raw = str.toCharArray();
       for (int i = 0; i < raw.length; i++) {
           if (raw[i] <= 0x000F) {
               hex.append("0x0");
           } else if (raw[i] <= 0x00FF) {
               hex.append("0x");
           } else if (raw[i] <= 0x0FFF) {
               hex.append("0");
           }
           hex.append(Integer.toHexString(raw[i]).toUpperCase());
       }
       return hex.toString();
   }
}
 
Status
Not open for further replies.
Back
Top