• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Monitor for images based on MD5 hash

mkerala

👽 Chevereto Freak
This nice PHP script will look for images based on MD5 hashes stored in a CSV file. If the image is found, it will output as HTML page with image thumbnail, IP address and link to the image. The CSV can be easily updated to add new MD5 hashes. The PHP script can be executed directly by opening the URL or a cron job can be set to send an email if the content is found.

Background: Somone kept uploading child abuse content on my site and started getting notice from hosting company and even the Interpol. Given the large no: of images uploaded per day, it was impossible to moderate every content and IP blocking is of no use since he used a new proxy/VPN every time. By using the below script I can easily find the content if he uploads again. Also can find any new images by using the IP search feature within the log.

PHP:
<html>
<?php
include('dbconnectfile.php'); //Your database config file
date_default_timezone_set('Asia/Kolkata'); // Your time zone
$time=date('Y-m-d H:i:s');
echo '<h2>Mod time '.$time.'</h2>';
$row = 1;
if (($handle = fopen("md5.csv", "r")) !== FALSE) {
  while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
    $num = count($data);
    $row++;
    for ($c=0; $c < $num; $c++) {      
        $result = mysqli_query($link,"SELECT * FROM images where image_md5='$data[$c]';");
$find=0;
if (mysqli_num_rows($result)>0){
while($r=mysqli_fetch_array($result))
{
$find++;
$imageid=$r["image_id"];
$imagename=$r["image_name"];
$imageview=$r["image_views"];
$imagex=$r["image_extension"];
$ip=$r["image_uploader_ip"];
$imagedate=$r["image_date"];
$size=$r["image_size"];
$storid=$r["image_storage_id"];
$times=date("Y-m-d", strtotime($imagedate));
$timesp=explode('-',$times);
$search='https://sitedomain.com/search/images/?as_q=&as_epq=%22'.$imagename.'%22&as_eq=&as_stor='.$storid.'';
$storid--;
$imgurl='https://s'.$storid.'.sitedomain.com/images/'.$imagename.'.'.$imagex.''; //change to your image direct link and folder type
$imgmd='https://s'.$storid.'.sitedomain.com/images/'.$imagename.'.md.'.$imagex.'';
$ipurl='https://sitedomain.com/search/images/?as_ip='.$ip.'';
echo '<p><a href='.$search.'><img src='.$imgmd.'></a></p>';
echo '<p> Size: '.$asize.'  '.$imagedate.' IP:<a href='.$ipurl.'>'.$ip.'</a> Views:'.$imageview.'<p>';
}
}      
    }
  }
  fclose($handle);
}
if ($find=1)
{
    $email = "youremail@gmail.com";
$content = "Alert:Image found";
$name = "Alert";
$sender = "alert@email.com";
$subject = "Alert: Image found";
$headers = "From: $name "."<".$sender.">\r\n";
mail($email, $subject, $content, $headers );
}
?>
</html>
 
Last edited:
Back
Top