Exemple #1
0
        <meta charset="utf-8">
        <meta name="author" content="Benjamin Citrin">
        <meta name="description" content="testdev!">

        
        <meta name="viewport" content="width=device-width, initial-scale=1">
    </head>

<?php 
function Greeting($hrs)
{
    if ($hrs > 0 && $hrs < 12) {
        return 'Good morning';
    } else {
        if ($hrs == 12 || $hrs > 12 && $hrs < 17) {
            return 'Good Afternoon';
        } else {
            if ($hrs < 20 && $hrs > 17 || $hrs == 17) {
                return 'Good Evening';
            } else {
                if ($hrs < 24 && $hrs > 20 || $hrs == 20) {
                    return 'Good night';
                }
            }
        }
    }
}
$hrs = 11;
print Greeting($hrs);
?>
</html>
Exemple #2
0
    $Dictionaries = GetDictionaries(DICTIONARIES_DIR);
    foreach ($Dictionaries as $Key => $Value) {
        $Dictionary[] = $Key;
    }
}
/*
 *	Let us check to see if we should use a file to store
 *	the scripts report in? 
 */
if ($UseFileStorage) {
    $Filename = $Options['file'];
} else {
    $Filename = false;
}
/*
 *	Display the greeting message
 */
echo Greeting();
/*
 *	Store the CheckHash return value in $Result, 
 *	if true, return the hashed value of the password
 *	along with the password in clear text
 *
 *	if false, return bool
 * 	if true, return array. array[0] = hash, array[1] = word/password (CLEARTEXT)
 */
if ($Result = CheckHash($Dictionary, $Options['a'], $Options['h'], $Filename)) {
    print_r("\n-----------------------------------------------------------------------------\n[SUCCESS] Found a matching hash: {$Result[0]} \n[MATCHES] Matched the word: {$Result[1]}\n-----------------------------------------------------------------------------\r\n");
} else {
    print_r("\n-----------------------------------------------------------------------------\n[FAILURE] No hash matching {$Options['h']} in dictionary!\n-----------------------------------------------------------------------------\r\n");
}