예제 #1
0
function benkey65($sesIp = 0)
{
    $b65 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_";
    $b30 = @substr($b65, 0, 32);
    $key = @md5(@SIDU_PK());
    if ($sesIp) {
        $ses = @session_id();
        $key = @md5($key . @str_repeat($ses, @substr(@ord(@substr($key, 0, 1)), 0, 1) + 1));
        $key = @md5($key . @str_repeat($_SERVER['REMOTE_ADDR'], @substr(@ord(@substr($key, 0, 1)), -1) + 1));
    }
    $key = @strtoupper($key);
    $key = @str_replace(@array("U", "V", "W", "X", "Y", "Z"), "0", $key);
    for ($i = 0; $i < 32; $i++) {
        $cur = @strpos($b30, @substr($key, $i, 1)) - 10;
        $arr[] = $cur;
        $b65 = @cook65($b65, $i, $cur);
    }
    $arr[] = $b65;
    return $arr;
}
예제 #2
0
function siduMD5($str)
{
    $ip = $_SERVER['HTTP_X_REMOTE_ADDR'] ? $_SERVER['HTTP_X_REMOTE_ADDR'] : $_SERVER['REMOTE_ADDR'];
    return $str . @substr(@md5($str . @SIDU_PK() . $ip), 0, 8);
}