This Lua script performs a low-level HTTP GET request to a specified remote URL using raw socket programming. It is useful for triggering lightweight HTTP endpoints, particularly in embedded or constrained environments.
The script connects to a hardcoded URL (defined in remote_url_to_trigger) and sends a basic HTTP/1.0 GET request. It does not use any external libraries, instead relying on low-level memory manipulation and syscall interfaces.
- Lua 5.2+ (for bit32 support)
- Custom syscall and memory libraries
remote_url_to_trigger = "http://10.0.0.2:88/lua.sh"You can call the send_http_request() function to trigger the remote server:
send_http_request()The script manually parses the IP address and handles byte-order conversion. It currently only supports IPv4 addresses. HTTPS is not supported. You must define or provide syscall and memory objects with expected functions: syscall.socket, syscall.connect, syscall.write, syscall.close memory.alloc, memory.write_byte, memory.write_word, memory.write_dword, memory.write_buffer