ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Jun 22, 2017 2:19 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Apr 12, 2017 11:50 am 

Joined: Fri Mar 20, 2015 2:04 pm
Posts: 17
the as file runing on linux...it connect mysql...but the config file is crypted.....help me ...decrypt the config file:define.lua....

i want to kown the connect mysql: db,pass,port,ip.....
thanks,very much!!!


Attachments:
decrypt.7z [3.96 MiB]
Downloaded 23 times
Top
   
PostPosted: Fri Apr 14, 2017 12:14 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 90
Here are the strings decoded from the games functions:
Code:
SNIFF_DATABASE_CONFIG_STRING
172.23.27.139;3306;rdbapp;EKuF5EMJ;sd_sniff0101

GAME_DATABASE_CONFIG_STRING
172.23.27.139;3306;rdbapp;EKuF5EMJ;sd_game0101

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Fri Apr 14, 2017 11:14 am 

Joined: Fri Mar 20, 2015 2:04 pm
Posts: 17
atom0s wrote:
Here are the strings decoded from the games functions:
Code:
SNIFF_DATABASE_CONFIG_STRING
172.23.27.139;3306;rdbapp;EKuF5EMJ;sd_sniff0101

GAME_DATABASE_CONFIG_STRING
172.23.27.139;3306;rdbapp;EKuF5EMJ;sd_game0101



hi,bro,how to decrypt it and re-crypt config? thank you very much!!! plz!


Top
   
PostPosted: Fri Apr 14, 2017 5:22 pm 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 90
You can decrypt the configuration like this:
Code:
/**
 * define.lua String Decryption
 * (c) atom0s 2017 [atom0s@live.com]
 */
#include <Windows.h>
#include <cinttypes>
#include <iostream>
#include <string>

const char* MAP1 = "q2zwsxed6rfvtg0yhn9jmikolp";
const char* MAP2 = "73918abcu4";

int32_t find_pos(const char* str, int32_t len, char target)
{
    if (str == nullptr || len == 0)
        return 0;

    auto i = 0;
    auto r = 0;

    while (str[i] != target)
    {
        ++i;
        if (i >= len)
            return 0;
        r = i;
    }

    return r;
}

std::string string_decode(const std::string& str)
{
    size_t i = 0;
    int8_t buffer[512] = { 0 };

    do
    {
        if (i >= str.length())
            break;

        auto v1 = str.at(i);
        auto v2 = find_pos(MAP1, 26, v1);
        auto v3 = str.at(i + 1);
        auto v4 = find_pos(MAP2, 10, v3);
        auto v5 = v2 + 26 * v4;

        buffer[i / 2] = (v2 + 26 * v4 - 127) ^ 0x9D;
        i += 2;
    } while (i <= 512);

    return std::string((char*)buffer);
}

int __cdecl main(int argc, char* argv[])
{
    auto sniffEncryptedString = "n3y3m3l3m3j3l3m3y3l3n3j3r3v3j3j393h3v3e8h8k8j8s8s8v3r1d1p1t1g3r12161v3x8h8g9x8f8v8989893n393n3";
    auto gameEncryptedString = "n3y3m3l3m3j3l3m3y3l3n3j3r3v3j3j393h3v3e8h8k8j8s8s8v3r1d1p1t1g3r12161v3x8h8g9n8j8d8y893n393n3";

    std::cout << string_decode(sniffEncryptedString) << std::endl;
    std::cout << string_decode(gameEncryptedString) << std::endl;

    return 0;
}


For reencrypting, you would have to reverse this process.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Sat Apr 15, 2017 8:05 am 

Joined: Fri Mar 20, 2015 2:04 pm
Posts: 17
atom0s wrote:
You can decrypt the configuration like this:
Code:
/**
 * define.lua String Decryption
 * (c) atom0s 2017 [atom0s@live.com]
 */
#include <Windows.h>
#include <cinttypes>
#include <iostream>
#include <string>

const char* MAP1 = "q2zwsxed6rfvtg0yhn9jmikolp";
const char* MAP2 = "73918abcu4";

int32_t find_pos(const char* str, int32_t len, char target)
{
    if (str == nullptr || len == 0)
        return 0;

    auto i = 0;
    auto r = 0;

    while (str[i] != target)
    {
        ++i;
        if (i >= len)
            return 0;
        r = i;
    }

    return r;
}

std::string string_decode(const std::string& str)
{
    size_t i = 0;
    int8_t buffer[512] = { 0 };

    do
    {
        if (i >= str.length())
            break;

        auto v1 = str.at(i);
        auto v2 = find_pos(MAP1, 26, v1);
        auto v3 = str.at(i + 1);
        auto v4 = find_pos(MAP2, 10, v3);
        auto v5 = v2 + 26 * v4;

        buffer[i / 2] = (v2 + 26 * v4 - 127) ^ 0x9D;
        i += 2;
    } while (i <= 512);

    return std::string((char*)buffer);
}

int __cdecl main(int argc, char* argv[])
{
    auto sniffEncryptedString = "n3y3m3l3m3j3l3m3y3l3n3j3r3v3j3j393h3v3e8h8k8j8s8s8v3r1d1p1t1g3r12161v3x8h8g9x8f8v8989893n393n3";
    auto gameEncryptedString = "n3y3m3l3m3j3l3m3y3l3n3j3r3v3j3j393h3v3e8h8k8j8s8s8v3r1d1p1t1g3r12161v3x8h8g9n8j8d8y893n393n3";

    std::cout << string_decode(sniffEncryptedString) << std::endl;
    std::cout << string_decode(gameEncryptedString) << std::endl;

    return 0;
}


For reencrypting, you would have to reverse this process.



thank you so much!!! and i recrypt it.....


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited