Jul 6 2021
PHP – detecting new uploaded images and sending an e-mail with attachments
Quick example today if a php script that I wanted to detect new uploaded images, and then send an e-mail.
I think it’s pretty self-explanatory so won’t go into details. However, keep in mind that it’s mostly simple PHP (not too object-oriented) and also that I make use of the wp_mail function.
$menPath = "path-to-uploaded-files/*.jpg";
$menLast = file_get_contents('timestampFile.txt');
if($menLast === false){
echo 'it is zero';
$menLast = 0;
}
$menFiles = glob($menPath);
$menFiles = array_filter($menFiles, function ($file) use ($menLast) {
$mentest = $menLast - filemtime($file);
return filemtime($file) > $menLast; });
file_put_contents('timestampFile.txt', time());
if (count($menFiles) > 0 )
{
$menText = "images uploaded\r\nFound images count:".count($menFiles)
."Current last timestamp recorded:".date('d-m-Y h:i:s', $menLast )."\r\n"
."Images found:\r\n";
<code>foreach ($menFiles as &$file) { $menText = $menText.date('d-m-Y h:i:s', filemtime($file))."-".basename($file)."\r\n"; }</code>
wp_mail( "[email protected]", "files-uploaded", $menText ,'',$menFiles);
}
?>
RTMPT streams provided by RED5 are notorious for randomly disconnecting.


Nov 23 2025
Breaking Down an Iron Seal Vulnerability: How a Hard-Coded Secret Key Broke Authentication
Modern authentication systems rely heavily on token-based mechanisms to securely identify users across multiple requests. While industry-standard formats like JWT are widely adopted, some systems use alternative approaches such as the @hapi/iron library. Iron provides encrypted, tamper-proof tokens that allow completely stateless authentication.
However, when implemented incorrectly—especially when secrets are exposed—the entire authentication chain collapses. This blog post examines a real-world example taken from the security exercise OWASP login challenge, explains why the implementation was insecure, and shows how the vulnerability was detected and exploited.
1. What Is @hapi/iron?
Iron is a token sealing and unsealing system created by the Hapi project. At its core, Iron:
A sealed Iron token has the form:
Unlike JWTs, which are typically signed but not encrypted, Iron tokens are fully encrypted, meaning their contents cannot be read without the secret key.
The downside:
Iron uses symmetric cryptography. If an attacker obtains the secret key, they can generate arbitrary tokens—including administrative ones.
By Menelaos Bakopoulos • Uncategorized 0