コード例 #1
0
ファイル: functions.php プロジェクト: kkrolikowski/spine
function checkServerAlias($dbh, $saname, $sid)
{
    $status = "NaN";
    foreach ($saname as $host) {
        if (($status = checkHost($dbh, $host, $sid)) != "NaN") {
            return $status;
        }
    }
    return $status;
}
コード例 #2
0
ファイル: template.php プロジェクト: hellobhanu/TxtConnect
function phptemplate_body_class($left, $right)
{
    if ($left != '' && $right != '') {
        $class = 'sidebars';
    } else {
        if ($left != '') {
            $class = 'sidebar-left';
        }
        if ($right != '') {
            $class = 'sidebar-right';
        }
    }
    $class .= " " . checkHost();
    if (isset($class)) {
        print ' class="' . $class . '"';
    }
}
コード例 #3
0
is part of many firmwares on embedded devices like SOHO routers.</p>
<p>This tool will check the header send by a HTTP server for a Rom Pager Signature.
It will warn you if your version is vulnerable. It will also check for older
RomPager vulnerabilities (CVE-2013-6786, CVE-2000-0470).</p>
<p>
Check Point advises people to buy their personal firewall (ZoneAlarm),
which is almost certainly not helpful at all.</p>
<?php 
} elseif (!isset($argv[1]) && $console) {
    echo "Need IP or hostname\n";
} else {
    if ($console) {
        $ip = $argv[1];
    } else {
        $ip = $_GET['ip'];
    }
    output("<h4>Port 80</h4>\n");
    checkHost($ip, 80);
    output("<h4>Port 7547</h4>\n");
    checkHost($ip, 7547);
    if (!$console) {
        echo '<p><a href="/">Test another host</a></p>';
    }
}
if (!$console) {
    ?>
<p class="sign">This tool is provided by <a href="https://hboeck.de/">Hanno Böck</a>,
<a href="https://github.com/hannob/rompager-check">code available on github</a></p>
</body>
<?php 
}
コード例 #4
0
ファイル: poller_hmib.php プロジェクト: khoimt/cacti-sample
/* Do not process if not enabled */
if (read_config_option("hmib_enabled") == "" || db_fetch_cell("SELECT status FROM plugin_config WHERE directory='hmib'") != 1) {
    echo "WARNING: The Host Mib Collection is Down!  Exiting\n";
    exit(0);
}
if ($seed == "") {
    $seed = rand();
}
if ($start == "") {
    list($micro, $seconds) = explode(" ", microtime());
    $start = $seconds + $micro;
}
if ($mainrun) {
    process_hosts();
} else {
    checkHost($host_id);
}
exit(0);
function runCollector($start, $lastrun, $frequency)
{
    global $forcerun;
    if ((empty($lastrun) || $start - $lastrun > $frequency) && $frequency > 0 || $forcerun) {
        return true;
    } else {
        return false;
    }
}
function debug($message)
{
    global $debug;
    if ($debug) {
コード例 #5
0
 * GNU General Public License for more details.                              *
 *                                                                           *
 * You should have received a copy of the GNU General Public License         *
 * along with the Prestashop Netbanx payment module (iitc).                  *
 * If not, see <http://www.gnu.org/licenses/>.                               */
include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/iitc_netbanx.php';
if (intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) {
    $rewrited_url = __PS_BASE_URI__;
}
// Init variables
$output = array();
$message = '';
$params = $_POST;
// Process the callback
if (!checkHost($_SERVER['REMOTE_ADDR'])) {
    $output[] = 'security check failed';
} else {
    $output[] = 'security check passed';
    // Make sure orderID + amount is present
    if (!checkParams($params)) {
        $output[] = 'No orderID / payment amount given';
    } else {
        // Open the order
        $netbanx = new Iitc_netbanx();
        $cartID = intval($params['nbx_merchant_reference']);
        $cart = new Cart($cartID);
        // Format payment amount correctly
        $orderTotal = formatAmount($params['nbx_payment_amount'], Configuration::get("IITC_NETBANX_MINORUNITS"));
        // Fun tip - Prestashop checks the order total for us :)
        // Check the order status