Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Exploit POST data logging endpoint?

Hey all!

I'm new to this forum and let me say that it looks cool.

I have a question for y'all:

How would you exploit a PHP endpoint (Nginx server) which uses file_put_contents to log all that comes from post request?

Let me give you a code example:

function logtxt($log)
{
        $log .= "\n";
        $bt = debug_backtrace();
        $caller = array_shift($bt);
        $line = $caller['line'];
        file_put_contents('./log_' . date("j.n.Y") . '.log', $line . ':' . $log, FILE_APPEND);
}

$message= json_decode(file_get_contents('php://input'),true);

logtxt(json_encode($message));


Possibly Related Threads...
Thread / Author Replies Views Last Post
by StanleyMar 26, 2026 05:55 PM 0 151 Mar 26, 2026 05:55 PM
Last Post: Stanley
by StanleyFeb 8, 2026 07:55 AM 2 122 Feb 8, 2026 07:55 AM
Last Post: SIM-5735617
by StanleyJan 26, 2026 02:05 PM 0 142 Jan 26, 2026 02:05 PM
Last Post: Stanley