<commit_before><?php

if (session_id() == "") session_start();

$_SESSION['cryptdir'] = dirname($cryptinstall);


function dsp_crypt($cfg = 0, $reload = 1) {
    // Affiche le cryptogramme
    echo "<table><tr><td><img id='cryptogram' src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."'></td>";
    if ($reload) echo "<td>&nbsp;&nbsp;<a title='".($reload==1?'':$reload)."' style=\"cursor:pointer\" onclick=\"javascript:document.images.cryptogram.src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."&'+Math.round(Math.random(0)*1000)+1\"><img src=\"".$_SESSION['cryptdir']."/images/reload.png\"></a></td>";
    echo "</tr></table>";
}


function chk_crypt($code) {
    
    // V?rifie si le code est correct
    include ($_SESSION['configfile']);
    $code = addslashes ($code);
    $code = str_replace(' ', '', $code);  // supprime les espaces saisis par erreur.
    $code = ($difuplow ? $code : strtoupper($code));
    switch (strtoupper($cryptsecure)) {  
        case "MD5"  : $code = md5($code); break;
        case "SHA1" : $code = sha1($code); break;<commit_msg>Crypt Capthca: small updates<commit_after><?php

if (session_id() == "") session_start();

$_SESSION['cryptdir'] = dirname($cryptinstall);


/**
 * Render Capthca
 */
function dsp_crypt($cfg = 0, $reload = 1) {
    echo "<table><tr><td><img id='cryptogram' src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."'></td>";
    if ($reload) echo "<td>&nbsp;&nbsp;<a title='".($reload==1?'':$reload)."' style=\"cursor:pointer\" onclick=\"javascript:document.images.cryptogram.src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."&'+Math.round(Math.random(0)*1000)+1\"><img src=\"".$_SESSION['cryptdir']."/images/reload.png\"></a></td>";
    echo "</tr></table>";
}


/**
 * Verify Code
 */
function chk_crypt($code) {
    include ($_SESSION['configfile']);
    $code = addslashes ($code);
    $code = str_replace(' ', '', $code);  // supprime les espaces saisis par erreur.
    $code = ($difuplow ? $code : strtoupper($code));
    switch (strtoupper($cryptsecure)) {  
        case "MD5"  : $code = md5($code); break;
        case "SHA1" : $code = sha1($code); break;
{'fraction_non_alphanumeric': 0.2497721057429353, 'fraction_numerical': 0.011850501367365542, 'mean_word_length': 4.433168316831683, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5205605', 'n_tokens_mistral': 811, 'n_tokens_neox': 767, 'n_words': 129}