/trunk/plugins/roundcube_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/roundcube_version/check_roundcube_version.phps |
---|
File deleted |
/trunk/plugins/roundcube_version/RoundcubeVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/ipfm/INSTALL |
---|
File deleted |
/trunk/plugins/ipfm/index.php |
---|
File deleted |
/trunk/plugins/ipfm/dygraph/excanvas.js |
---|
File deleted |
/trunk/plugins/ipfm/dygraph/update-dygraph.sh |
---|
File deleted |
/trunk/plugins/ipfm/dygraph/dygraph-combined.js |
---|
File deleted |
\ No newline at end of file |
/trunk/plugins/ipfm/IpFlowMonitorCheck.class.php |
---|
File deleted |
/trunk/plugins/ipfm/icinga2.conf |
---|
File deleted |
/trunk/plugins/ipfm/check_ipfm.phps |
---|
File deleted |
/trunk/plugins/4images_version/FourImagesVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/4images_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/4images_version/check_4images_version.phps |
---|
File deleted |
/trunk/plugins/owncloud_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/owncloud_version/check_owncloud_version.phps |
---|
File deleted |
/trunk/plugins/owncloud_version/OwnCloudVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/phpbb_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/phpbb_version/check_phpbb_version.phps |
---|
File deleted |
/trunk/plugins/phpbb_version/PhpBbVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/file_timestamp/check_file_timestamp.phps |
---|
File deleted |
/trunk/plugins/file_timestamp/FileTimestampCheck.class.php |
---|
File deleted |
/trunk/plugins/file_timestamp/icinga2.conf |
---|
File deleted |
/trunk/plugins/last/check_last.phps |
---|
File deleted |
/trunk/plugins/last/LastCheck.class.php |
---|
File deleted |
/trunk/plugins/last/icinga2.conf |
---|
File deleted |
/trunk/plugins/overview |
---|
File deleted |
/trunk/plugins/gitlab_version/check_gitlab_version.phps |
---|
File deleted |
/trunk/plugins/gitlab_version/GitLabVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/gitlab_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/viewvc_version/check_viewvc_version.phps |
---|
File deleted |
/trunk/plugins/viewvc_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/viewvc_version/ViewVCVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/websvn_version/check_websvn_version.phps |
---|
File deleted |
/trunk/plugins/websvn_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/websvn_version/WebSvnVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/megaraid/check_megaraid.phps |
---|
File deleted |
/trunk/plugins/megaraid/icinga2.conf |
---|
File deleted |
/trunk/plugins/megaraid/MegaRaidCheck.class.php |
---|
File deleted |
/trunk/plugins/megaraid/status_battery.mock_ |
---|
File deleted |
\ No newline at end of file |
/trunk/plugins/megaraid/status_ld.mock_ |
---|
File deleted |
\ No newline at end of file |
/trunk/plugins/megaraid/status_pd.mock_ |
---|
File deleted |
\ No newline at end of file |
/trunk/plugins/nextcloud_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/nextcloud_version/check_nextcloud_version.phps |
---|
File deleted |
/trunk/plugins/nextcloud_version/NextCloudVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/phpmyadmin_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/phpmyadmin_version/check_phpmyadmin_version.phps |
---|
File deleted |
/trunk/plugins/phpmyadmin_version/PhpMyAdminVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/smart/check_smart.phps |
---|
File deleted |
/trunk/plugins/smart/SmartCheck.class.php |
---|
File deleted |
/trunk/plugins/smart/icinga2.conf |
---|
File deleted |
/trunk/plugins/net2ftp_version/check_net2ftp_version.phps |
---|
File deleted |
/trunk/plugins/net2ftp_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/net2ftp_version/Net2FtpVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/nocc_version/check_nocc_version.phps |
---|
File deleted |
/trunk/plugins/nocc_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/nocc_version/NoccVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/aastra_430_voicemail/check_aastra_430_voicemail.phps |
---|
File deleted |
/trunk/plugins/aastra_430_voicemail/icinga2.conf |
---|
File deleted |
/trunk/plugins/aastra_430_voicemail/VNagAastra430VoiceMail.class.php |
---|
File deleted |
/trunk/plugins/disk_running/check_disk_running.phps |
---|
File deleted |
/trunk/plugins/disk_running/icinga2.conf |
---|
File deleted |
/trunk/plugins/disk_running/DiskRunningCheck.class.php |
---|
File deleted |
/trunk/plugins/mdstat/mdadm_test/mdadm_md2.example |
---|
File deleted |
/trunk/plugins/mdstat/mdadm_test/mdadm_md3.example |
---|
File deleted |
/trunk/plugins/mdstat/mdadm_test/mdstat.example |
---|
File deleted |
/trunk/plugins/mdstat/mdadm_test/mdadm_md0.example |
---|
File deleted |
/trunk/plugins/mdstat/mdadm_test/mdadm_md1.example |
---|
File deleted |
/trunk/plugins/mdstat/check_mdstat.phps |
---|
File deleted |
/trunk/plugins/mdstat/MdStatCheck.class.php |
---|
File deleted |
/trunk/plugins/mdstat/icinga2.conf |
---|
File deleted |
/trunk/plugins/ping/icinga2.conf |
---|
File deleted |
/trunk/plugins/ping/check_ping.phps |
---|
File deleted |
/trunk/plugins/ping/PingCheck.class.php |
---|
File deleted |
/trunk/plugins/ping/index.php |
---|
File deleted |
/trunk/plugins/wordpress_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/wordpress_version/check_wordpress_version.phps |
---|
File deleted |
/trunk/plugins/wordpress_version/WordPressVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/webreader/icinga2.conf |
---|
File deleted |
/trunk/plugins/webreader/check_vnag_webreader.phps |
---|
File deleted |
/trunk/plugins/webreader/VNagWebReader.class.php |
---|
File deleted |
/trunk/plugins/openbugbounty/icinga2.conf |
---|
File deleted |
/trunk/plugins/openbugbounty/check_openbugbounty.phps |
---|
File deleted |
/trunk/plugins/openbugbounty/OpenBugBountyCheck.class.php |
---|
File deleted |
/trunk/plugins/pmwiki_version/PmWikiVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/pmwiki_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/pmwiki_version/check_pmwiki_version.phps |
---|
File deleted |
/trunk/plugins/mediawiki_version/check_mediawiki_version.phps |
---|
File deleted |
/trunk/plugins/mediawiki_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/mediawiki_version/MediaWikiVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/open_deleted_files/OpenDeletedFilesCheck.class.php |
---|
File deleted |
/trunk/plugins/open_deleted_files/check_open_deleted_files.phps |
---|
File deleted |
/trunk/plugins/open_deleted_files/icinga2.conf |
---|
File deleted |
/trunk/plugins/hp_smartarray/check_hp_smartarray.phps |
---|
File deleted |
/trunk/plugins/hp_smartarray/HpSmartArrayCheck.class.php |
---|
File deleted |
/trunk/plugins/hp_smartarray/status_ld.mock_ |
---|
File deleted |
/trunk/plugins/hp_smartarray/status_pd.mock_ |
---|
File deleted |
/trunk/plugins/hp_smartarray/status_ctrl.mock_ |
---|
File deleted |
/trunk/plugins/hp_smartarray/icinga2.conf |
---|
File deleted |
/trunk/plugins/minecraft_java_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/minecraft_java_version/check_minecraft_java_version.phps |
---|
File deleted |
/trunk/plugins/minecraft_java_version/MinecraftJavaVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/x509_expire/X509ExpireCheck.class.php |
---|
File deleted |
/trunk/plugins/x509_expire/icinga2.conf |
---|
File deleted |
/trunk/plugins/x509_expire/check_x509_expire.phps |
---|
File deleted |
/trunk/plugins/virtual_mem/check_virtual_mem.phps |
---|
File deleted |
/trunk/plugins/virtual_mem/VirtualMemCheck.class.php |
---|
File deleted |
/trunk/plugins/virtual_mem/icinga2.conf |
---|
File deleted |
/trunk/plugins/joomla_version/JoomlaVersionCheck.class.php |
---|
File deleted |
/trunk/plugins/joomla_version/icinga2.conf |
---|
File deleted |
/trunk/plugins/joomla_version/check_joomla_version.phps |
---|
File deleted |
/trunk/build.phps |
---|
File deleted |
/trunk/framework/vnag_framework.inc.php |
---|
File deleted |
/trunk/Makefile |
---|
1,5 → 1,5 |
plugins: plugins/*/*.php framework/vnag_framework.inc.php |
php --define phar.readonly=0 build.phps |
plugins: src/plugins/*/*.php src/framework/vnag_framework.inc.php |
php --define phar.readonly=0 src/build.phps |
clean: |
rm -f bin/*.phar |
/trunk/TODO.md |
---|
1,10 → 1,4 |
Big change 2023 |
--------------- |
- put all sources in src/ |
TODO |
---- |
/trunk/bin/4images_version.phar |
---|
0,0 → 1,300 |
#!/usr/bin/env php |
<?php |
$web = 'index.php'; |
if (in_array('phar', stream_get_wrappers()) && class_exists('Phar', 0)) { |
Phar::interceptFileFuncs(); |
set_include_path('phar://' . __FILE__ . PATH_SEPARATOR . get_include_path()); |
Phar::webPhar(null, $web); |
include 'phar://' . __FILE__ . '/' . Extract_Phar::START; |
return; |
} |
if (@(isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'POST'))) { |
Extract_Phar::go(true); |
$mimes = array( |
'phps' => 2, |
'c' => 'text/plain', |
'cc' => 'text/plain', |
'cpp' => 'text/plain', |
'c++' => 'text/plain', |
'dtd' => 'text/plain', |
'h' => 'text/plain', |
'log' => 'text/plain', |
'rng' => 'text/plain', |
'txt' => 'text/plain', |
'xsd' => 'text/plain', |
'php' => 1, |
'inc' => 1, |
'avi' => 'video/avi', |
'bmp' => 'image/bmp', |
'css' => 'text/css', |
'gif' => 'image/gif', |
'htm' => 'text/html', |
'html' => 'text/html', |
'htmls' => 'text/html', |
'ico' => 'image/x-ico', |
'jpe' => 'image/jpeg', |
'jpg' => 'image/jpeg', |
'jpeg' => 'image/jpeg', |
'js' => 'application/x-javascript', |
'midi' => 'audio/midi', |
'mid' => 'audio/midi', |
'mod' => 'audio/mod', |
'mov' => 'movie/quicktime', |
'mp3' => 'audio/mp3', |
'mpg' => 'video/mpeg', |
'mpeg' => 'video/mpeg', |
'pdf' => 'application/pdf', |
'png' => 'image/png', |
'swf' => 'application/shockwave-flash', |
'tif' => 'image/tiff', |
'tiff' => 'image/tiff', |
'wav' => 'audio/wav', |
'xbm' => 'image/xbm', |
'xml' => 'text/xml', |
); |
header("Cache-Control: no-cache, must-revalidate"); |
header("Pragma: no-cache"); |
$basename = basename(__FILE__); |
if (!strpos($_SERVER['REQUEST_URI'], $basename)) { |
chdir(Extract_Phar::$temp); |
include $web; |
return; |
} |
$pt = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $basename) + strlen($basename)); |
if (!$pt || $pt == '/') { |
$pt = $web; |
header('HTTP/1.1 301 Moved Permanently'); |
header('Location: ' . $_SERVER['REQUEST_URI'] . '/' . $pt); |
exit; |
} |
$a = realpath(Extract_Phar::$temp . DIRECTORY_SEPARATOR . $pt); |
if (!$a || strlen(dirname($a)) < strlen(Extract_Phar::$temp)) { |
header('HTTP/1.0 404 Not Found'); |
echo "<html>\n <head>\n <title>File Not Found<title>\n </head>\n <body>\n <h1>404 - File Not Found</h1>\n </body>\n</html>"; |
exit; |
} |
$b = pathinfo($a); |
if (!isset($b['extension'])) { |
header('Content-Type: text/plain'); |
header('Content-Length: ' . filesize($a)); |
readfile($a); |
exit; |
} |
if (isset($mimes[$b['extension']])) { |
if ($mimes[$b['extension']] === 1) { |
include $a; |
exit; |
} |
if ($mimes[$b['extension']] === 2) { |
highlight_file($a); |
exit; |
} |
header('Content-Type: ' .$mimes[$b['extension']]); |
header('Content-Length: ' . filesize($a)); |
readfile($a); |
exit; |
} |
} |
class Extract_Phar |
{ |
static $temp; |
static $origdir; |
const GZ = 0x1000; |
const BZ2 = 0x2000; |
const MASK = 0x3000; |
const START = 'plugins/4images_version/check_4images_version.phps'; |
const LEN = 6684; |
static function go($return = false) |
{ |
$fp = fopen(__FILE__, 'rb'); |
fseek($fp, self::LEN); |
$L = unpack('V', $a = fread($fp, 4)); |
$m = ''; |
do { |
$read = 8192; |
if ($L[1] - strlen($m) < 8192) { |
$read = $L[1] - strlen($m); |
} |
$last = fread($fp, $read); |
$m .= $last; |
} while (strlen($last) && strlen($m) < $L[1]); |
if (strlen($m) < $L[1]) { |
die('ERROR: manifest length read was "' . |
strlen($m) .'" should be "' . |
$L[1] . '"'); |
} |
$info = self::_unpack($m); |
$f = $info['c']; |
if ($f & self::GZ) { |
if (!function_exists('gzinflate')) { |
die('Error: zlib extension is not enabled -' . |
' gzinflate() function needed for zlib-compressed .phars'); |
} |
} |
if ($f & self::BZ2) { |
if (!function_exists('bzdecompress')) { |
die('Error: bzip2 extension is not enabled -' . |
' bzdecompress() function needed for bz2-compressed .phars'); |
} |
} |
$temp = self::tmpdir(); |
if (!$temp || !is_writable($temp)) { |
$sessionpath = session_save_path(); |
if (strpos ($sessionpath, ";") !== false) |
$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1); |
if (!file_exists($sessionpath) || !is_dir($sessionpath)) { |
die('Could not locate temporary directory to extract phar'); |
} |
$temp = $sessionpath; |
} |
$temp .= '/pharextract/'.basename(__FILE__, '.phar'); |
self::$temp = $temp; |
self::$origdir = getcwd(); |
@mkdir($temp, 0777, true); |
$temp = realpath($temp); |
if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) { |
self::_removeTmpFiles($temp, getcwd()); |
@mkdir($temp, 0777, true); |
@file_put_contents($temp . '/' . md5_file(__FILE__), ''); |
foreach ($info['m'] as $path => $file) { |
$a = !file_exists(dirname($temp . '/' . $path)); |
@mkdir(dirname($temp . '/' . $path), 0777, true); |
clearstatcache(); |
if ($path[strlen($path) - 1] == '/') { |
@mkdir($temp . '/' . $path, 0777); |
} else { |
file_put_contents($temp . '/' . $path, self::extractFile($path, $file, $fp)); |
@chmod($temp . '/' . $path, 0666); |
} |
} |
} |
chdir($temp); |
if (!$return) { |
include self::START; |
} |
} |
static function tmpdir() |
{ |
if (strpos(PHP_OS, 'WIN') !== false) { |
if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) { |
return $var; |
} |
if (is_dir('/temp') || mkdir('/temp')) { |
return realpath('/temp'); |
} |
return false; |
} |
if ($var = getenv('TMPDIR')) { |
return $var; |
} |
return realpath('/tmp'); |
} |
static function _unpack($m) |
{ |
$info = unpack('V', substr($m, 0, 4)); |
$l = unpack('V', substr($m, 10, 4)); |
$m = substr($m, 14 + $l[1]); |
$s = unpack('V', substr($m, 0, 4)); |
$o = 0; |
$start = 4 + $s[1]; |
$ret['c'] = 0; |
for ($i = 0; $i < $info[1]; $i++) { |
$len = unpack('V', substr($m, $start, 4)); |
$start += 4; |
$savepath = substr($m, $start, $len[1]); |
$start += $len[1]; |
$ret['m'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($m, $start, 24))); |
$ret['m'][$savepath][3] = sprintf('%u', $ret['m'][$savepath][3] |
& 0xffffffff); |
$ret['m'][$savepath][7] = $o; |
$o += $ret['m'][$savepath][2]; |
$start += 24 + $ret['m'][$savepath][5]; |
$ret['c'] |= $ret['m'][$savepath][4] & self::MASK; |
} |
return $ret; |
} |
static function extractFile($path, $entry, $fp) |
{ |
$data = ''; |
$c = $entry[2]; |
while ($c) { |
if ($c < 8192) { |
$data .= @fread($fp, $c); |
$c = 0; |
} else { |
$c -= 8192; |
$data .= @fread($fp, 8192); |
} |
} |
if ($entry[4] & self::GZ) { |
$data = gzinflate($data); |
} elseif ($entry[4] & self::BZ2) { |
$data = bzdecompress($data); |
} |
if (strlen($data) != $entry[0]) { |
die("Invalid internal .phar file (size error " . strlen($data) . " != " . |
$stat[7] . ")"); |
} |
if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { |
die("Invalid internal .phar file (checksum error)"); |
} |
return $data; |
} |
static function _removeTmpFiles($temp, $origdir) |
{ |
chdir($temp); |
foreach (glob('*') as $f) { |
if (file_exists($f)) { |
is_dir($f) ? @rmdir($f) : @unlink($f); |
if (file_exists($f) && is_dir($f)) { |
self::_removeTmpFiles($f, getcwd()); |
} |
} |
} |
@rmdir($temp); |
clearstatcache(); |
chdir($origdir); |
} |
} |
Extract_Phar::go(); |
__HALT_COMPILER(); ?> |
ð framework/vnag_framework.inc.phpLÙ ^*eLÙ 4p¤ 8 plugins/4images_version/FourImagesVersionCheck.class.php |