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!!!
Help me,decrypt the sql connect config!!!thanks!
-
- Posts: 26
- Joined: Fri Mar 20, 2015 2:04 pm
-
- Posts: 250
- Joined: Sat Dec 27, 2014 8:49 pm
Re: Help me,decrypt the sql connect config!!!thanks!
Here are the strings decoded from the games functions:
Code: Select all
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
-
- Posts: 26
- Joined: Fri Mar 20, 2015 2:04 pm
Re: Help me,decrypt the sql connect config!!!thanks!
atom0s wrote:Here are the strings decoded from the games functions:Code: Select all
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!
-
- Posts: 250
- Joined: Sat Dec 27, 2014 8:49 pm
Re: Help me,decrypt the sql connect config!!!thanks!
You can decrypt the configuration like this:
For reencrypting, you would have to reverse this process.
Code: Select all
/**
* 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.
-
- Posts: 26
- Joined: Fri Mar 20, 2015 2:04 pm
Re: Help me,decrypt the sql connect config!!!thanks!
atom0s wrote:You can decrypt the configuration like this:Code: Select all
/**
* 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.....