ZenHAX
http://zenhax.com/

Help me,decrypt the sql connect config!!!thanks!
http://zenhax.com/viewtopic.php?f=16&t=4083
Page 1 of 1

Author:  wahaha [ Wed Apr 12, 2017 11:50 am ]
Post subject:  Help me,decrypt the sql connect config!!!thanks!

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 46 times

Author:  atom0s [ Fri Apr 14, 2017 12:14 am ]
Post subject:  Re: Help me,decrypt the sql connect config!!!thanks!

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

Author:  wahaha [ Fri Apr 14, 2017 11:14 am ]
Post subject:  Re: Help me,decrypt the sql connect config!!!thanks!

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!

Author:  atom0s [ Fri Apr 14, 2017 5:22 pm ]
Post subject:  Re: Help me,decrypt the sql connect config!!!thanks!

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.

Author:  wahaha [ Sat Apr 15, 2017 8:05 am ]
Post subject:  Re: Help me,decrypt the sql connect config!!!thanks!

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.....

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/