コード例 #1
0
ファイル: capture-data.php プロジェクト: neelaryan/mutillidae
            // This code is fairly secure
            $lProtectAgainstSQLInjection = TRUE;
            break;
            //case "5"
    }
    // end switch ($_SESSION["security-level"])
} catch (Exception $e) {
    echo $CustomErrorHandler->FormatError($e, $lQueryString);
}
// end try
try {
    /* Grab as much information about visiting browser as possible. Most of this
     * is available in the HTTP request header.
     */
    $lClientHostname = $lClientInformationHandler->getClientHostname();
    $lClientIP = $lClientInformationHandler->getClientIP();
    $lClientUserAgentString = $lClientInformationHandler->getClientUserAgentString();
    $lClientReferrer = $lClientInformationHandler->getClientReferrer();
    $lClientPort = $lClientInformationHandler->getClientPort();
    if ($lProtectAgainstSQLInjection) {
        $lClientHostname = $MySQLHandler->escapeDangerousCharacters($lClientHostname);
        $lClientUserAgentString = $MySQLHandler->escapeDangerousCharacters($lClientUserAgentString);
        $lClientReferrer = $MySQLHandler->escapeDangerousCharacters($lClientReferrer);
    }
    // end if $lProtectAgainstSQLInjection
} catch (Exception $e) {
    echo $CustomErrorHandler->FormatError($e, $lQueryString);
}
// end try
try {
    // Declare a temp varaible to hold our collected data
コード例 #2
0
ファイル: browser-info.php プロジェクト: neelaryan/mutillidae
             */
            // encode the output following OWASP standards
            // this will be HTML encoding because we are outputting data into HTML
            $lEncodeOutput = TRUE;
            $luseSafeJavaScript = "true";
            break;
    }
    // end switch
    require_once __ROOT__ . '/classes/ClientInformationHandler.php';
    $lClientInformationHandler = new ClientInformationHandler();
    if ($lEncodeOutput) {
        $lWhoIsInformation = $Encoder->encodeForHTML($lClientInformationHandler->whoIsClient());
        $lOperatingSystem = $Encoder->encodeForHTML($lClientInformationHandler->getOperatingSystem());
        $lBrowser = $Encoder->encodeForHTML($lClientInformationHandler->getBrowser());
        $lClientHostname = $Encoder->encodeForHTML($lClientInformationHandler->getClientHostname());
        $lClientIP = $Encoder->encodeForHTML($lClientInformationHandler->getClientIP());
        $lClientUserAgentString = $Encoder->encodeForHTML($lClientInformationHandler->getClientUserAgentString());
        $lClientReferrer = $Encoder->encodeForHTML($lClientInformationHandler->getClientReferrer());
        $lClientPort = $Encoder->encodeForHTML($lClientInformationHandler->getClientPort());
    } else {
        $lWhoIsInformation = $lClientInformationHandler->whoIsClient();
        $lOperatingSystem = $lClientInformationHandler->getOperatingSystem();
        $lBrowser = $lClientInformationHandler->getBrowser();
        $lClientHostname = $lClientInformationHandler->getClientHostname();
        $lClientIP = $lClientInformationHandler->getClientIP();
        $lClientUserAgentString = $lClientInformationHandler->getClientUserAgentString();
        $lClientReferrer = $lClientInformationHandler->getClientReferrer();
        $lClientPort = $lClientInformationHandler->getClientPort();
    }
    // end if
} catch (Exception $e) {