LittleDemon WebShell


Linux hosting5.siteguarding.com 3.10.0-962.3.2.lve1.5.88.el7.x86_64 #1 SMP Fri Sep 26 14:06:42 UTC 2025 x86_64
Path : /home/devsafetybis/verd.dev.safetybis.com/securemailer/
File Upload :
Command :
Current File : /home/devsafetybis/verd.dev.safetybis.com/securemailer/image.php

<?php
//----------------------------------------------+
// Secure Mailer :.: Version 1.08.7             |
// Last updated 17 August 2007                  |
//----------------------------------------------+
// Copyright (C) 2007 Alec Baker                |
//----------------------------------------------+
// Author:  Alec Baker  (alecbaker@gmail.com)   |
// Author:  Paul Dancey                         |
//----------------------------------------------+
// This source code file is subject to the End  |
// User License Agreement (EULA) that should be |
// supplied with the script. If you do not have |
// this please visit our website.               |
//----------------------------------------------+
// CREDIT: 										|
// This file has been adapted from a tutorial	|
// posted on php-mysql-tutorial.com which		|
// provides excellent tutorials.				|
//----------------------------------------------+

//---------------------------------------------------------------------+
// Please see installation.txt in the documentation folder for a full  |
// explanation of the required file structure for Secure Mailer.       |
//                                                                     |
// IF YOU USE THE RECOMENDED FILE STRUCTURE FOR SECURE MAILER,         |
// THERE IS NOTHING TO SET IN THIS FILE                                |
//---------------------------------------------------------------------+


// Version Info
define("VERSION",      "1.08.7");

// Definition required for valid inclusion
define('IN_SECURE__MAILER', true);

// Include all required files
include_once("admin/config_dir.php");

//----------------------------------------------+
// Start session				                |
//----------------------------------------------+

session_cache_limiter('private, must-revalidate');
session_set_cookie_params(0,'/','','');
session_name($session_name);
session_start();

//----------------------------------------------+
// Generate the verification code               |
//----------------------------------------------+

$rand = substr(str_shuffle($CONF[image_alphanum]), 0, $CONF[image_code_length]);

//----------------------------------------------+
// Select a background image to use             |
//----------------------------------------------+

$bgNum = rand(1, $CONF[image_bgimages]);

//----------------------------------------------+
// Create and size image object using bg image  |
//----------------------------------------------+

$newheight = $CONF['image_height']; // sets new image height
$newwidth = $CONF['image_code_length']*12; // sets new image width to suit code length
$image = imagecreatetruecolor($newwidth,$newheight);
$fullimage = imagecreatefromjpeg($CONF['image_bgpath']."/background$bgNum.jpg");
// Resize image to suit code length
imagecopyresized($image, $fullimage, 0, 0, 0, 0, $newwidth, $newheight, $CONF['image_width'], $newheight);


//----------------------------------------------+
// Create image object using bg image           |
//----------------------------------------------+

// Select random text colours
$textColor1 = rand(1, 5);
if($textColor1 == "1") $textColor1 = imagecolorallocate ($image, 255,0,0); // Red
elseif($textColor1 == "2") $textColor1 = imagecolorallocate ($image, 0,355,0); // Green
elseif($textColor1 == "3") $textColor1 = imagecolorallocate ($image, 0,0,245); // Blue
elseif($textColor1 == "4") $textColor1 = imagecolorallocate ($image, 255,0,255); // Magenta
else $textColor1 = imagecolorallocate ($image, 0,0,0); // Black
  
$textColor2 = rand(1, 5);
if($textColor2 == "1") $textColor2 = imagecolorallocate ($image, 0,355,0); // Green
elseif($textColor2 == "2") $textColor2 = imagecolorallocate ($image, 0,0,245); // Blue
elseif($textColor1 == "3") $textColor2 = imagecolorallocate ($image, 255,0,255); // Magenta
elseif($textColor2 == "4") $textColor2 = imagecolorallocate ($image, 0,0,0); // Black
else $textColor2 = imagecolorallocate ($image, 255,0,0); // Red
  
$textColor3 = rand(1, 5);
if($textColor1 == "1") $textColor1 = imagecolorallocate ($image, 100,0,100); // Magenta
elseif($textColor3 == "2") $textColor3 = imagecolorallocate ($image, 0,0,245); // Blue
elseif($textColor1 == "3") $textColor3 = imagecolorallocate ($image, 255,0,255); // Magenta
elseif($textColor3 == "4") $textColor3 = imagecolorallocate ($image, 0,0,0); // Black
elseif($textColor3 == "5") $textColor3 = imagecolorallocate ($image, 255,0,0); // Red
else $textColor2 = imagecolorallocate ($image, 0,355,0); // Green
  
$textColor4 = rand(1, 5);
if($textColor4 == "1") $textColor4 = imagecolorallocate ($image, 0,0,0); // Black
elseif($textColor4 == "2") $textColor4 = imagecolorallocate ($image, 255,0,0); // Red
elseif($textColor4 == "3") $textColor4 = imagecolorallocate ($image, 0,355,0); // Green
elseif($textColor4 == "4") $textColor4 = imagecolorallocate ($image, 0,0,245); // Blue
else $textColor2 = imagecolorallocate ($image, 255,0,255); // Magenta
  
$textColor5 = rand(1, 5);
if($textColor5 == "1") $textColor5 = imagecolorallocate ($image, 255,0,0); // Red
elseif($textColor5 == "2") $textColor5 = imagecolorallocate ($image, 0,355,0); // Green
elseif($textColor5 == "3") $textColor5 = imagecolorallocate ($image, 0,0,245); // Blue
elseif($textColor1 == "4") $textColor5 = imagecolorallocate ($image, 255,0,255); // Magenta
else $textColor5 = imagecolorallocate ($image, 0,0,0); // Black
  
$textColor6 = rand(1, 5);
if($textColor6 == "1") $textColor6 = imagecolorallocate ($image, 0,355,0); // Green
elseif($textColor6 == "2") $textColor6 = imagecolorallocate ($image, 0,0,245); // Blue
elseif($textColor1 == "3") $textColor6 = imagecolorallocate ($image, 255,0,255); // Magenta
elseif($textColor6 == "4") $textColor6 = imagecolorallocate ($image, 0,0,0); // Black
else $textColor6 = imagecolorallocate ($image, 255,0,0); // Red
  

//----------------------------------------------+
// Write verification code on image             |
//----------------------------------------------+
	
$str_array = array();
$len = $CONF['image_code_length'];
for($i=0; $i<$len; $i++) $str_array[] = $rand{$i};
imagestring($image, 5, 4, rand(2,11), $str_array[0], $textColor1);
imagestring($image, 5, 15, rand(2,11), $str_array[1], $textColor2);
imagestring($image, 5, 26, rand(2,11), $str_array[2], $textColor3);
imagestring($image, 5, 37, rand(2,11), $str_array[3], $textColor4);
imagestring($image, 5, 48, rand(2,11), $str_array[4], $textColor5);
imagestring($image, 5, 59, rand(2,11), $str_array[5], $textColor6);


//----------------------------------------------+
// Create hash and store in session value       |
//----------------------------------------------+

$_SESSION['image_random_value'] = md5($rand);

//----------------------------------------------+
// Create headers to prevent cached image       |
//----------------------------------------------+
	
header("Expires: Sat, 01 Jan 2000 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

//----------------------------------------------+
// Send the content type header		            |
//----------------------------------------------+

header('Content-type: image/jpeg');

//----------------------------------------------+
// Send image to browser			            |
//----------------------------------------------+

imagejpeg($image);

//----------------------------------------------+
// Destroy the image after being sent           |
//----------------------------------------------+

imagedestroy($fullimage);
imagedestroy($image);

// unset variables to free up memory
unset($rand, $bgNum, $newheight, $newwidth, $image, $fullimage, $textColor1, $textColor2, $textColor3, $textColor4, $textColor5, $textColor6, $image_id, $realip, $len);
?>

LittleDemon - FACEBOOK
[ KELUAR ]