AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Protect private amxx plugin (https://forums.alliedmods.net/showthread.php?t=155835)

saintjimmygd 04-27-2011 06:52

Protect private amxx plugin
 
Hi.
My friend made a private amxx plugin but when i tryed to use a decompiler it shows informations that shouldn't be seen by anybody like SQL_HOST or database password :(
What can i do to protect the plugin from decompiler programs ?
Here is part of the plugin (example):
Quote:

#include <amxmodx>
#include <amxmisc>
#include <sqlx>

new Handle:g_SqlTuple;
new SQL_HOST[32]="myHost", SQL_USER[32]="theUser", SQL_PASS[32]="thePass", SQL_DB[32]="someDB";
public plugin_init()
{
register_plugin("plugin","1.0","author");
g_SqlTuple = SQL_MakeDbTuple(SQL_HOST,SQL_USER,SQL_PASS,SQ L_DB);
}
And here is what decompiler shows:
Quote:

.DATA
var_000 variable ( 0x0 )
str_000 string "myHost"
arr_000 array 25 fill 0x0
str_001 string "theUser"
arr_001 array 24 fill 0x0
str_002 string "thePass"
arr_002 array 24 fill 0x0
str_003 string "someDB"
arr_003 array 25 fill 0x0
str_004 string "plugin"
str_005 string "1.0"
str_006 string "author"


.CODE
halt 0x0

PROC plugin_init
break
break
push.c 0x230
push.c 0x220
push.c 0x204
push.c 0xC
sysreq.c [BAD SYSREQ]
stack 0x10
break
push.c 0x0
push.c 0x184
push.c 0x104
push.c 0x84
push.c 0x4
push.c 0x14
sysreq.c [BAD SYSREQ]
stack 0x18
stor.pri 0x0
zero.pri
retn
ENDP
I want to hide from decompiler program : string "myHost" , string "theUser" , string "thePass" !

killergirl 04-27-2011 07:02

Re: Protect private amxx plugin
 
Use cvar's than format the SQL lines.

fysiks 04-27-2011 18:39

Re: Protect private amxx plugin
 
Quote:

Originally Posted by saintjimmygd (Post 1458784)
Hi.
My friend made a private amxx plugin but when i tryed to use a decompiler it shows informations that shouldn't be seen by anybody like SQL_HOST or database password :(
What can i do to protect the plugin from decompiler programs ?

Anything hardcoded can be retrieved by the decompiler.

minimiller 04-27-2011 19:01

Re: Protect private amxx plugin
 
Just don't give out the amxx
Problem solved

fysiks 04-27-2011 20:49

Re: Protect private amxx plugin
 
Quote:

Originally Posted by minimiller (Post 1459192)
Just don't give out the amxx
Problem solved

Very good point.

saintjimmy 04-28-2011 15:49

Re: Protect private amxx plugin
 
So is it possible or not ?
The plugin contains data like:
#define SQL_HOST "IP"
#define SQL_USER "user"
#define SQL_PASS "password"
#define SQL_DB "path"
Can i hide those from a decompiler program or not ?

Exolent[jNr] 04-28-2011 17:21

Re: Protect private amxx plugin
 
I've already replied in topics like this.
Search for them.

saintjimmygd 04-29-2011 03:12

Re: Protect private amxx plugin
 
Quote:

Originally Posted by Exolent[jNr] (Post 1459758)
I've already replied in topics like this.
Search for them.

You've replied in over 500 posts, by what criteria should i search ? If you can please give me an ideea of what to do.

minimiller 04-29-2011 06:27

Re: Protect private amxx plugin
 
maybe a few words such as 'private' and 'plugin'?

saintjimmy 05-01-2011 07:34

Re: Protect private amxx plugin
 
Nothing ... just say, is it possible ?
I don't wanna waste your time if it isn't.


All times are GMT -4. The time now is 04:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.