added PrestaShop version
This commit is contained in:
122
sc.php
122
sc.php
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Moved to the README.md*/
|
||||
|
||||
$version = "v4.0.0";
|
||||
$released = "October/16";
|
||||
$version = "v4.0.2";
|
||||
$released = "November/16";
|
||||
$author = "Malin Cenusa";
|
||||
$mail = "malin.cenusa@lunarpages.com";
|
||||
$ip = "84.124.94.176";
|
||||
@@ -1546,6 +1546,9 @@ system("find ../ type f -path '*/includes/pixelpost.php' -exec grep -H 'Pixelpos
|
||||
echo $GLOBALS["red"] . $GLOBALS["br"] . "SquirrelCart<br /><br /></span>";
|
||||
system("find ../ type f -path '*/squirrelcart/functions/base/sc_version.func.php' -exec grep -HA1 'function sc_version() {' {} \;");
|
||||
|
||||
echo $GLOBALS["red"] . $GLOBALS["br"] . "PrestaShop<br /><br /></span>";
|
||||
system("find ../ type f -path '*/config/settings.inc.php' -exec grep -H \"define('_PS_VERSION_',\" {} \;");
|
||||
|
||||
/*
|
||||
PmWiki doesn't output the version properly for some reason and it will be checked later
|
||||
phpNuke support removed as newer phpNuke installs store the version in the database
|
||||
@@ -1680,121 +1683,6 @@ system("find ../ -name VERSION.txt -exec head -n 1 {} \;");
|
||||
|
||||
}
|
||||
|
||||
/* function iframe(){
|
||||
$pwd = system('whoami');
|
||||
class PHPScan
|
||||
{
|
||||
private $infctions = array("htm","php","html");
|
||||
private $rules = array(
|
||||
'/<div.*style=.*display:none.*[^>]*>.*<iframe .*\/.*div[^>]*>/i',
|
||||
'/<!-- ad --><script[^>]*>.*<\/script><!-- \/ad -->/i',
|
||||
'/visitorTracker_isMob/i',
|
||||
'/ConfigSpy/i'
|
||||
|
||||
);
|
||||
|
||||
private $dir = "./";
|
||||
|
||||
function PHPScan($dir)
|
||||
{
|
||||
$this->dir = $dir;
|
||||
$files = $this->getfile($this->dir);
|
||||
echo "<pre>".print_r($files,true)."</pre>";
|
||||
echo "<br /><b>Result :</b> [".count($files)."] infected";
|
||||
}
|
||||
|
||||
function infected($fullpath)
|
||||
{
|
||||
$data = file_get_contents($fullpath);
|
||||
foreach($this->rules as $item)
|
||||
{
|
||||
if(preg_match($item,$data))
|
||||
{
|
||||
print_r($fullpath);
|
||||
echo addshashes($item);
|
||||
return true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getfile($directory)
|
||||
{
|
||||
if( substr($directory, -1) == "/" ) $directory = substr($directory, 0, strlen($directory) - 1);
|
||||
$code = explode("<br />",$this->getdir($directory));
|
||||
return $code;
|
||||
}
|
||||
|
||||
function getdir($directory)
|
||||
{
|
||||
if( function_exists("scandir") ) $file = scandir($directory); else $file = $this->php4_scandir($directory);
|
||||
natcasesort($file);
|
||||
$files = $dirs = array();
|
||||
foreach($file as $this_file)
|
||||
{
|
||||
if( is_dir("$directory/$this_file" ) )
|
||||
{
|
||||
$dirs[] = $this_file;
|
||||
}
|
||||
else
|
||||
{
|
||||
$files[] = $this_file;
|
||||
}
|
||||
}
|
||||
$file = array_merge($dirs, $files);
|
||||
if( count($file) > 2 )
|
||||
{
|
||||
foreach( $file as $this_file )
|
||||
{
|
||||
if( $this_file != "." && $this_file != ".." )
|
||||
{
|
||||
if( is_dir("$directory/$this_file") )
|
||||
{
|
||||
$file_tree .= $this->getdir($directory."/".$this_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ext = substr($this_file, strrpos($this_file, ".") + 1);
|
||||
if(in_array($ext,$this->infctions))
|
||||
{
|
||||
if($this->infected($directory."/".$this_file))
|
||||
{
|
||||
$file_tree .= $directory."/".$this_file .' <span style="color:red"><b>[Possibly Infected]'.$this->infctions.'</b></span><br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $file_tree;
|
||||
}
|
||||
|
||||
|
||||
function php4_scandir($dir) {
|
||||
$dh = opendir($dir);
|
||||
while( false !== ($filename = readdir($dh)) ) {
|
||||
$files[] = $filename;
|
||||
}
|
||||
sort($files);
|
||||
return($files);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo "<B>malicious iframe scanner </b><br />";
|
||||
$scan = &new PHPScan('/home/'.$pwd.'/public_html');
|
||||
|
||||
} */
|
||||
|
||||
//custom pattern scanner
|
||||
function custom(){
|
||||
echo '<form method="post" enctype="multipart/form-data"><br /><hr>';
|
||||
|
||||
Reference in New Issue
Block a user