 |
Menu |
 |
|
Home |
| |
|
Discussions |
| |
|
Tools |
| |
|
Affiliates |
| |
|
Content |
| |
|
Info |
| | |
|
|
|
|
 |
User Info |
 |
Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144
People Online:
Visitors: 443
Members: 0
Total: 443
|
|
|
|
|
 |
Full disclosure |
 |
CyberDanube Security Research 20251014-0 | Multiple Vulnerabilities in Phoenix Contact QUINT4 UPS
apis.google.com - Insecure redirect via __lu parameter(exploited in the wild)
Urgent Security Vulnerabilities Discovered in Mercku Routers Model M6a
Re: Security Advisory: Multiple High-Severity Vulnerabilities in Suno.com (JWT Leakage, IDOR, DoS)
Security Advisory: Multiple High-Severity Vulnerabilities in Suno.com (JWT Leakage, IDOR, DoS)
[SBA-ADV-20250730-01] CVE-2025-39664: Checkmk Path Traversal
[SBA-ADV-20250724-01] CVE-2025-32919: Checkmk Agent Privilege Escalation via Insecure Temporary Files
CVE-2025-59397 - Open Web Analytics SQL Injection
Re: [FD]Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Re: Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Re: Defense in depth -- the Microsoft way (part 93): SRP/SAFERwhitelisting goes black on Windows 11
Re: [FD]: "Glass Cage" – Zero-Click iMessage ? Persistent iOS Compromise + Bricking (CVE-2025-24085 / 24201, CNVD-2025-07885)
Re: [FD]Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Samtools v1.22.1 Uncontrolled Memory Allocation from Large BED Intervals Causes Denial-of-Service in Samtools/HTSlib
Samtools v1.22.1 Improper Handling of Excessive Histogram Bin Counts in Samtools Coverage Leads to Stack Overflow
|
|
|
|
|
|
 |
|
 |
 |
|
 |
IT Security and Insecurity Portal |
|
 |
SOlved |
 |
Posted: Fri Jan 04, 2013 8:13 pm |
|
|
david |
Advanced user |

 |
|
Joined: Jan 04, 2013 |
Posts: 58 |
|
|
|
 |
 |
 |
|
|
Last edited by david on Thu Mar 07, 2013 10:53 pm; edited 1 time in total |
|
|
|
 |
Can somebody help please |
 |
Posted: Sat Jan 05, 2013 8:48 pm |
|
|
david |
Advanced user |

 |
|
Joined: Jan 04, 2013 |
Posts: 58 |
|
|
|
 |
 |
 |
|
|
Last edited by david on Thu Mar 07, 2013 10:53 pm; edited 1 time in total |
|
|
|
 |
 |
|
 |
Posted: Mon Jan 07, 2013 10:30 am |
|
|
vv456 |
Advanced user |

 |
|
Joined: Aug 24, 2012 |
Posts: 190 |
|
|
|
 |
 |
 |
|
Decoded
Code: | <?php class template { public $tplpath = './templates/'; public $currenttpl = 'clipcms'; public $cache = true; private $variables = array(); private $blockvars = array(); public function reparse($str) { $return = $this->parser($str); return $return; } public function display($filename) { global $url; $file = $this->tplpath . $this->currenttpl . '/' . $filename; $this->assignarray(array( 'TPL_PATH' => $url."/".$this->tplpath . $this->currenttpl, 'TPL_PATH_COMMON' => $url."/".$this->tplpath . "common" )); if(!file_exists($file)) { $error = debug_backtrace(); echo "<html><head><title>Error in file "; print_r($error[0]['file']); echo " ;;on line "; @print_r($error[0]['line']); echo "</title></head><body><font face='Arial'><h4 title='File ";@print_r($error[0]['file']);echo " line ";@print_r($error[0]['line']);echo "'>Template Error in file '";@print_r($error[0][file]);echo "' on line '";@print_r($error[0]['line']);echo "':</h4><div title='File $file' style='border:1px solid grey;padding:0.2em;text-align:justify;font-size:9pt'>File <b>$file</b> does not exists!</div></font></body></html>"; exit; } $lastmodify = filemtime($file); $cacher = new tplcacher($filename, $lastmodify, $this->currenttpl); if($cacher->checkvalid() === true && $this->cache) { $tpl = $cacher->getdata(); } else { $tpl = $this->parser(file_get_contents($file)); if($this->cache){ $cacher->write($tpl); $cache_file = dirname(__FILE__) . "/../cache/".$filename.".php"; if(file_exists($cache_file)) touch($cache_file, $lastmodify); } } if($this->cache){ include($cacher->getfile()); }else{ eval('?>'.$tpl); } } private function parser($data) { preg_match_all('/<!-- BEGIN (.*) -->(.*)<!-- END \\1 -->/Usi',$data,$blockvars); foreach($blockvars[1] as $key => $value) { $tmpdata = $blockvars[2][$key]; $tmpdata = preg_replace('/{'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)}/Ui','<?php echo $row["\\1"]; ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*IF\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*-->/Ui','<?php if(isset($row["\\1"]) && $row["\\1"]) { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*IF\s*NOT\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*-->/Ui','<?php if(!isset($row["\\1"]) || !$row["\\1"]) { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*IF\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*=\s*\'([^\']+)\'\s*-->/Ui','<?php if(isset($row["\\1"]) && $row["\\1"] == \'\\2\') { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*IF\sNOT\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*=\s*\'([^\']+)\'\s*-->/Ui','<?php if(isset($row["\\1"]) && $row["\\1"] != \'\\2\') { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*ELSEIF\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*-->/Ui','<?php } else if(isset($row["\\1"]) && $row["\\1"]) { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*ELSEIF\s*NOT\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*-->/Ui','<?php } else if(!isset($row["\\1"]) || !$row["\\1"]) { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*ELSEIF\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*=\s*\'([^\']+)\'\s*-->/Ui','<?php } else if(isset($row["\\1"]) && $row["\\1"] == \'\\2\') { ?>',$tmpdata); $tmpdata = preg_replace('/<!--\s*ELSEIF\sNOT\s*'.preg_quote($value,'/').'\.([a-zA-Z0-9_\-]+)\s*=\s*\'([^\']+)\'\s*-->/Ui','<?php } else if(isset($row["\\1"]) && $row["\\1"] != \'\\2\') { ?>',$tmpdata); $data = preg_replace('/'.preg_quote($blockvars[0][$key],'/').'/','<?php foreach($this->blockvars["'.preg_quote($value, '/').'"] as $row) { ?>' . $tmpdata . '<?php } ?> ',$data); } $data = preg_replace('#<!--\s*PHP\s*-->(.*)<!--\s*ENDPHP\s*-->#Usi','<?php \\1 ?>',$data); $data = preg_replace('/{([a-zA-Z0-9_\-]+)}/iU','<?php echo isset($this->variables["\\1"]) ? $this->variables["\\1"] : "{\\1}"; ?>',$data); $data = preg_replace('/<!--\s*INCLUDE\s+([^"]*)\s*-->/Usi','<?php echo $this->display("\\1"); ?>',$data); $data = preg_replace('/<!--\s*DEFINE\s+([^"]*)\s*=\s*\'([^\']*)\'\s*-->/Usi','<?php $this->variables["\\1"] = \'\\2\' ?>',$data); $data = preg_replace('/<!--\s*IF\s([a-zA-Z0-9_]*)\s+=\s+([^"]+)\s*-->/Usi','<?php if($this->variables[\'\\1\'] == "\\2") { ?>',$data); $data = preg_replace('/<!--\s*IF\s([a-zA-Z0-9_]*)\s*-->/Usi','<?php if(isset($this->variables[\'\\1\']) && $this->variables[\'\\1\']) { ?>',$data); $data = preg_replace('/<!--\s*IF\sNOT\s([a-zA-Z0-9_]*)\s+=\s+([^"]+)\s*-->/Usi','<?php if(isset($this->variables[\'\\1\']) && $this->variables[\'\\1\'] != "\\2") { ?>',$data); $data = preg_replace('/<!--\s*IF\sNOT\s([a-zA-Z0-9_]*)\s*-->/Usi','<?php if(!isset($this->variables[\'\\1\']) || !$this->variables[\'\\1\']) { ?>',$data); $data = preg_replace('/<!--\s*IF\sNOT\s([a-zA-Z0-9_]*)\s*AND\s*NOT\s*([a-zA-Z0-9_]*)\s*-->/Usi','<?php if((!isset($this->variables[\'\\1\']) || !$this->variables[\'\\1\']) && (!isset($this->variables[\'\\2\']) || !$this->variables[\'\\2\'])) { ?>',$data); $data = preg_replace('/<!--\s*IF\s([a-zA-Z0-9_]*)\s*AND\s*([a-zA-Z0-9_]*)\s*-->/Usi','<?php if((isset($this->variables[\'\\1\']) && $this->variables[\'\\1\']) && isset($this->variables[\'\\2\']) && $this->variables[\'\\2\']) { ?>',$data); $data = preg_replace('/<!--\s*IF\s([a-zA-Z0-9_]*)\s+is\s+([^"]+)\s*-->/Usi','<?php if (strcasecmp($this->variables[\'\\1\'],"\\2")==0) { ?>',$data); $data = preg_replace('/<!--\s*IF\sNOT\s([a-zA-Z0-9_]*)\s*OR\s*NOT\s*([a-zA-Z0-9_]*)\s*-->/Usi','<?php if((!isset($this->variables[\'\\1\']) OR !$this->variables[\'\\1\']) OR (!isset($this->variables[\'\\2\']) || !$this->variables[\'\\2\'])) { ?>',$data); $data = preg_replace('/<!--\s*IF\s([a-zA-Z0-9_]*)\s*OR\s*([a-zA-Z0-9_]*)\s*-->/Usi','<?php if((isset($this->variables[\'\\1\']) OR isset($this->variables[\'\\2\']) )) { ?>',$data); $data = preg_replace('/<!--\s*IF\s([a-zA-Z0-9_]*)\s*OR\s*([a-zA-Z0-9_]*)\sOR\s*([a-zA-Z0-9_]*)\s*-->/Usi','<?php if((isset($this->variables[\'\\1\']) OR isset($this->variables[\'\\2\']) OR isset($this->variables[\'\\3\']) )) { ?>',$data); $data = preg_replace('/<!--\s*ELSEIF\s([a-zA-Z0-9_]*)\s*-->/Usi','<?php }elseif(isset($this->variables[\'\\1\']) && $this->variables[\'\\1\']) { ?>',$data); $data = preg_replace('/<!--\s*ELSE\s*-->/Usi','<?php }else{ ?>',$data); $data = preg_replace('/<!--\s*ENDIF\s(.*)\s*-->/Usi','<?php } ?>',$data); if(isset($GLOBALS['tplrules'])) { foreach($GLOBALS['tplrules'] as $pattern => $repl) { $data = preg_replace($pattern, $repl, $data); } } return $data; } public function assign($name, $value) { $this->variables[$name] = $value; } public function assignarray($array) { foreach($array as $key => $value) { $this->variables[$key] = $value; } } public function assign_vars($name, $array) { $this->blockvars[$name][] = $array; } public function __construct () { $this->license_check(); } public function license_check() { global $database, $db, $admin, $querycount, $host; if(empty($db)) { include(__DIR__."/../config.php"); define('DB_PREFIX', $database['prefix']); $querycount = 0; $db = new errorhandler_mysqli($database['location'], $database['username'], $database['password'], $database['database']); if (mysqli_connect_errno()) { error_handler("Couldn't establish connection to the database."); } } if(ini_get('allow_url_fopen') != 1){ error_handler("You need 'allow_url_fopen' to be set to '1' (i.e. it needs to be enabled).\n<br />Without that, this script won't work - sorry."); } $last_check_db = $db->query("SELECT content FROM ".DB_PREFIX."settings WHERE `name` = 'last_check'")->fetch_assoc(); $last_check_db = $last_check_db['content']; $timestamp_last = @simple_crypt($database['password'], $last_check_db, "decrypt"); if(!isValidTimestamp($timestamp_last)){ $timestamp_last = 0; } $now = new DateTime(); $now->setTimestamp(time()); $last_check = new DateTime(); $last_check->setTimestamp($timestamp_last); $interval = $now->diff($last_check); $diff = (int)$interval->format('%a'); if($diff >= 1){ $reachable = urlOK("http://licensing.clipcms.de/check.php?ping=1"); if($host == ""){ $host = preg_replace("/^(.*\.)?([^.]*\..*)$/", "$2", $_SERVER['HTTP_HOST']); } if($reachable){ $result = file_get_contents_curl("http://licensing.clipcms.de/check.php", array("host" => $host)); if($result != "1"){ error_handler("Your license file is invalid.<br />\nPlease contact me.<br /><br /><span style='font-size: 11px;'>Response:<br />".$result."</span>"); }else{ $db->query("UPDATE ".DB_PREFIX."settings SET `content` = '".@simple_crypt($database['password'], time(), "encrypt")."' WHERE `name` = 'last_check'"); } }else{ error_handler("The license server is not reachable.<br />Please check your firewall settings or contact me."); } }else{ return; } } } class tplcacher { private $filename; private $lastmodify; private $clastmodify; private $data; private $valid; public function __construct($name, $lastmodify, $currenttpl) { $name = str_replace("../", "", $name); $name = str_replace("./", "", $name); $name = str_replace('/','_', $name); $this->filename = dirname(__FILE__) . "/../cache/".$currenttpl."_".$name.".php"; $this->lastmodify = $lastmodify; if(file_exists($this->filename)) { $this->clastmodify = filemtime($this->filename); if($this->clastmodify > $this->lastmodify) { $this->valid = true; $this->data = file_get_contents($this->filename); } else { $this->valid = false; } } else { $this->valid = false; } } public function checkvalid() { return $this->valid; } public function getdata() { return $this->data; } public function write($data) { if($dh = @fopen($this->filename, 'w')) { fwrite($dh, $data); fclose($dh); } } public function getfile() { return $this->filename; } }
?> |
|
|
|
|
|
 |
www.waraxe.us Forum Index -> PHP script decode requests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|
|