Scripts

Scripts:

Joomla script (Updated)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
//
// KUrlLogin.php Joomla authentication script
//
// Author: Jaka Konda
// Plugin: KUrlLogin
// Plugin Link: http://dev.bukkit.org/server-mods/kurllogin/
// Contact: [email protected]

// base64 must be set to true in config (base64: true)

// I recommend that you add IP of your MC server to bottom comented line ( and uncomment)
//( if it's on local network, IP will probaby be your default gateway, otherwise
// try IP of your MC server directly.

//if($_SERVER['REMOTE_ADDR'] != "192.168.1.20") die(0);

include('configuration.php');

if(isset($_GET['user']) || isset($_GET['exists']))
{    
    $_GET['user'] = base64_decode(isset($_GET['user']) ? $_GET['user'] : $_GET['exists']);

    $cfg = new JConfig;
    $c = mysql_connect($cfg->host, $cfg->user, $cfg->password);
    
    if(!$c)
        die('0');
        mysql_select_db($cfg->db, $c);
        
    $q = mysql_query("SELECT id, password FROM " . $cfg->dbprefix . "users WHERE username = '" . mysql_real_escape_string($_GET['user']) . "' AND block = 0 AND activation = ''  LIMIT 1");

    while($r = mysql_fetch_assoc($q))
    {
        if(isset($_GET['exists']))
            die('1');
                
        $p = explode(':' , $r['password']);
        
        if(isset($_GET['pass']))
        {
            $_GET['pass'] = base64_decode($_GET['pass']);
            if($p[0] == md5($_GET['pass'].$p[1]))
                echo $r['id'];
                
            else
                echo '0';
        }
        
        else
            echo $r['id'];
    }
    
    die('0');
}
?>

WordPress script

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
//
// KUrlLogin.php Wordpress authentication script
//
// Author: Jaka Konda
// Plugin: KUrlLogin
// Plugin Link: http://dev.bukkit.org/server-mods/kurllogin/
// Contact: [email protected]

// base64 must be set to true in config (base64: true)

// EXAMPLE URL:
//        Url: 'http://your.domain.orIP/KUrlLogin(Wordpress).php?user={user}&pass={pass}'
//        Exists: 'http://your.domain.orIP/KUrlLogin(Wordpress).php?exists={user}'

// I recommend that you add IP of your MC server to bottom comented line ( and uncomment)
//( if it's on local network, IP will probaby be your default gateway, otherwise
// try IP of your MC server directly.

//if($_SERVER['REMOTE_ADDR'] != "192.168.1.20") die(0);

include('wp-config.php');
include('wp-includes/class-phpass.php');

if(isset($_GET['user']) || isset($_GET['exists']))
{    
    $_GET['user'] = base64_decode(isset($_GET['user']) ? $_GET['user'] : $_GET['exists']);

    $c = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
    
    if(!$c)
        die('0');
     mysql_select_db(DB_NAME, $c);
        
    $q = mysql_query("SELECT ID, user_pass FROM " . $table_prefix . "users WHERE user_login = '" . mysql_real_escape_string($_GET['user']) . "' LIMIT 1");

    while($r = mysql_fetch_assoc($q))
    {
        if(isset($_GET['exists']))
            die('1');
        
        $_GET['pass'] = base64_decode($_GET['pass']);
        $hasher = new PasswordHash(8, TRUE);
        
        if(isset($_GET['pass']))
        {
            if($hasher->CheckPassword($_GET['pass'], $r['user_pass']) || ($r['user_pass'] == md5($_GET['pass'])))
                echo $r['ID'];
                
            else
                echo '0';
        }
        
        else
            echo $r['ID'];
    }
    
    die('0');
}
?>


Comments

Posts Quoted:
Reply
Clear All Quotes