[TOOL] AMXX UnCompress 1.0

For scripting examples for learning how to use AMXX.
User avatar
Archive-Poster
Posts: 1090
Gender:
United States of America

[TOOL] AMXX UnCompress 1.0

Post by Archive-Poster »

[TOOL] AMXX UnCompress 1.0
(Edit compilated plugins in .amxx)

Description:

This is a program to uncompress an .amxx and show the raw generated in the compilation of the plugin. Also it's possible return compile the raw, in addition to change the code used in the file .memory

Info:

When a script (.sma) is compiled it is generated all necesary information for run in the virtual machine of pawn, if it's qualified also it is generated the information for the depuration (debug). When the compilation it finishes it compresses and packs in a file .amxx.



amxx file header: Have the information of the file composition
amxx header: Have the information about the plugin.
debug header: Have the information about the depuration.

Use:

Basic:
Drag the .amxx into the .exe, in seconds the program generate two files, one .raw and the other .memory with the same name of the .amxx.

File .RAW:

Have all information of the compilation without compressing, it's possible edit some things with a hexadecimal editor.

File .MEMORY:

This is a file that the AMXX UnCompress use for do modifications in the plugin. In this it define directions of memory to modificate, already be dates(data) or codes(code). The most easy it's use for modificate a string, since the directions of the memory there are auto generated and the value it's a string and not a hexadecimal.

Format:
Type: Address = Value

Type: code or data

Address: Direction of the memory in hexadecimal format 0x00000000
Value: A string between "" only for a tipe data or values hexadecimals without [ ] separateds for a space. The hexadecimal value is 4bytes, it is to say up to 8 characters.
Comment line: Use ; for coment a line.

(To replace a string)
data:address="string"
ex.:
data:0x00000008="hi"

(To replace a string and force writing exceeding the lenght)
data:address="string"f
ex.:
data:0x000000A1="hi wooorld"f

(Edit date)
data:address=[hex value]
ex.:
data:0x00000050=[ff 23CEFF f0ff00a AAEFD01 33]

(Edit code)
code:address=[hex value]
ex.:
code:0x0000012F=[ff 33 C000E]

Example of .memory file auto generated:
;data:0x00000000="Message 1"
;data:0x00000028="Hacked :P"
;data:0x00000050="Final"
;data:0x00000068="Test amxx uncompress"
;data:0x000000C4="1.0"
;data:0x000000D4="Destro"
;data:0x000000F0="%s"
;data:0x000000FC="test
;data:0x00000118="svcmd_test"
;data:0x00000154="string:[%s] static:[%d]"
Replace String:

Basic:

Using an example the .memory file of above.

We open it with any text editor and modify.
data:0x00000000="changed"
data:0x00000068="Title of the plugin"
Save it.
Drag the .raw file to .exe and we compresses the .raw with the modifications about .memory in a new .amxx.

Plugin used

Code: Select all

#include <amxmodx>

#define PLUGIN "Test amxx uncompress"
#define VERSION "1.0"
#define AUTHOR "Destro"

new const string[] = "Message 1"
new const string2[] = "Hacked :P"
new const string3[] = "Final"
const const_value = 2

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    server_print("%s", string)
    
    new value = 1
    
    if(value == const_value)
    {
        server_print(string2)
        return
    }
    
    funtion_print2()
    
    register_srvcmd("test", "svcmd_test")
}

public svcmd_test()
{
    funtion_print()
}

funtion_print()
{
    static value
    
    value++
    
    server_print("string:[%s] static:[%d]", string, value)
}

funtion_print2()
{
    server_print(string3)
} 
Protect Plugin:

To avoid that your plugin was descompresed with this program, add this string "no_amxx_uncompress" in any part of your plugin.

Example:

Code: Select all

server_print("no_amxx_uncompress")
Attachments
amxx_uncompress_source.zip
(6.26 KiB) Downloaded 3 times
amxx_uncompress.zip
(47.88 KiB) Downloaded 3 times

Who is online

Users browsing this forum: No registered users and 0 guests