PHP Code:
#include <amxmodx>
#include <sockets_async>
#define PLUGIN "Test ASync Null Bytes"
#define VERSION "1.0"
#define AUTHOR "AImpressor"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_srvcmd("test_send", "test_send")
}
public test_send() {
new SOCKET:socket = socket_create(SOCK_TYPE_TCP, 0)
socket_connect(socket, "127.0.0.1", 80)
}
public fw_sockConnected(SOCKET:socket, customID)
{
new packet[256]
formatex(packet, 255, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00)
new len = socket_send(socket, packet)
log_amx("Sending packet len: %d", len)
}
When im using "test_send", it gives me answer "Sending packet len: 0" - that means it ignores all my null bytes. Tested it on windows server with web. Could you please resolve this issue?
__________________