Results 1 to 2 of 2
  1. #1
    Coders jmpnop's Avatar
    Join Date
    May 2007
    Posts
    330

    etpro encryption

    This may be a little technical, but for those interested & who know how to make good use of it, here is the algorithm to decrypt etpro's secret servercommands.

    They always start with '*'

    Code:
    void etpro_decrypt(char *msg)
    {
        char table[] = 
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x3E\x00\x3F\x00\x00"
            "\x34\x35\x36\x37\x38\x39\x3A\x3B" "\x3C\x3D\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x01\x02\x03\x04\x05\x06" "\x07\x08\x09\x0A\x0B\x0C\x0D\x0E"
            "\x0F\x10\x11\x12\x13\x14\x15\x16" "\x17\x18\x19\x00\x00\x00\x00\x00"
            "\x00\x1A\x1B\x1C\x1D\x1E\x1F\x20" "\x21\x22\x23\x24\x25\x26\x27\x28"
            "\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30" "\x31\x32\x33\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"
            "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00";
    
        char decoded[1024];
        char encoded[1024];
        strncpy_s(encoded, sizeof(encoded), msg+1, 1024);
    
        int j,i = 0;
        int decIdx = 0;
        int msgLen = strlen(encoded);
    
        char c, b1,b2,b3;
        char tc, t1,t2,t3;
        int p,q;
    
        while (i<msgLen){
    
            c = *(encoded+i);
            b1 = b2 = b3 = 0x41;
            
            if (i+1 < msgLen)
                b1 = *(encoded+i+1);
            if (i+2 < msgLen)
                b2 = *(encoded+i+2);
            if (i+3 < msgLen)
                b3 = *(encoded+i+3);
    
            tc = table[c] << 2;
            t1 = table[b1];
            t2 = table[b2];
            t3 = table[b3];
    
            p = (int)t1 >> 4;
            p |= (int)tc;
            
            decoded[decIdx] = (char)p;
    
            if (i+2 < msgLen){
                p = 0xf & (int)t1;
                p = p << 4;
                q = (int)t2;
                q = q >> 2;
                p |= q;
                decoded[decIdx+1] = (char)p;
                decIdx+=2;                        
            } else {
                decIdx++;
            }
    
            if (i+3 < msgLen){
                p = 3 & (int)t2;
                p = p << 6;
                p |= t3;
                decoded[decIdx] = (char)p;
                decIdx++;
            }
    
            i+=4;
        }
    
        char commandByte = decoded[0];
    }
    So basically its just base64 with a rather limited and custom alphabet. The first char of the decoded message is a command number, which determines a particular kind of action (see, for instance, 0x30014C20). There are 14 commands, and they appear to do a wide range of things varying from printing mundane messages "Constructing...." to setting up and or requesting security information.

    Have fun!

  2. #2
    VIP
    Join Date
    Apr 2006
    Posts
    440

    Re: etpro encryption

    nice work :baby:

Similar Threads

  1. SMF Password Encryption
    By FreckleS in forum Visual Basic
    Replies: 2
    Last Post: December 27th, 2011, 18:53
  2. Replies: 15
    Last Post: July 4th, 2008, 08:14
  3. Etpro 2.0.7
    By Scruie in forum Enemy Territory Cheats
    Replies: 3
    Last Post: February 1st, 2008, 19:57
  4. Etpro 2.0.7
    By Scruie in forum ETH32
    Replies: 2
    Last Post: January 31st, 2008, 13:14
  5. New ETpro WH
    By pimpy01 in forum Enemy Territory Cheats
    Replies: 6
    Last Post: January 9th, 2007, 13:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •