コード例 #1
0
ファイル: mambo.php プロジェクト: EZDM/omeyocan
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// Mambo 4.5.2
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../index.php?option=com_registration&task=register";
$auth_disable_guest = true;
// Get the mambo Configuration File
include_once "../configuration.php";
// Make a database connection to the PhpBB2 database
$mamdb = new x7chat_db($mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db);
// Introduced in Version 2.0.1 for Joomla Support
$session_cookie_name = "sessioncookie";
// Check for existing sessions
if (isset($_COOKIE[$session_cookie_name])) {
    $_COOKIE[$session_cookie_name] = md5($_COOKIE[$session_cookie_name] . $_SERVER['REMOTE_ADDR']);
    $query = $mamdb->DoQuery("SELECT userid FROM {$mosConfig_dbprefix}session WHERE session_id='{$_COOKIE[$session_cookie_name]}'");
    $row = $mamdb->Do_Fetch_Row($query);
    if ($row[0] != 0) {
        $query = $mamdb->DoQuery("SELECT username,password FROM {$mosConfig_dbprefix}users WHERE id='{$row['0']}'");
        $row = $mamdb->Do_Fetch_Row($query);
        $_COOKIE[$auth_ucookie] = $row[0];
        $_COOKIE[$auth_pcookie] = $row[1];
    }
}
function auth_encrypt($data)
コード例 #2
0
ファイル: xoops.php プロジェクト: EZDM/omeyocan
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// Xoops
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../register.php";
$auth_disable_guest = true;
// Get the Xoops config file
$xoopsOption['nocommon'] = 1;
require "../../mainfile.php";
// Make a database connection to the PhpBB2 database
$xoopsdb = new x7chat_db(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS, XOOPS_DB_NAME);
$table_prefix = XOOPS_DB_PREFIX . "_";
if (isset($_COOKIE["PHPSESSID"])) {
    $cvalue = $_COOKIE["PHPSESSID"];
    $q = $xoopsdb->DoQuery("SELECT sess_data FROM {$table_prefix}session WHERE sess_id='{$cvalue}'");
    $cinfo = $xoopsdb->Do_Fetch_Row($q);
    if ($cinfo[0] != "") {
        // Get user ID
        eregi("^xoopsUserId|[^;]*", $cinfo[0], $match);
        $match[0] = eregi_replace("xoopsUserID\\|", "", $match[0]);
        $suid = unserialize($match[0]);
        $q = $xoopsdb->DoQuery("SELECT uname,pass FROM {$table_prefix}users WHERE uid='{$suid}'");
        $xoopsname = $xoopsdb->Do_Fetch_Row($q);
        $_COOKIE['X7C2U'] = $xoopsname[0];
        $_COOKIE['X7C2P'] = $xoopsname[1];
    }
コード例 #3
0
ファイル: phpbb2.php プロジェクト: EZDM/omeyocan
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// PHPBB 2.0.11
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../profile.php?mode=register";
$auth_disable_guest = true;
// Get the PhpBB2 Configuration File
include_once "../config.php";
// Make a database connection to the PhpBB2 database
$phpbbdb = new x7chat_db($dbhost, $dbuser, $dbpasswd, $dbname);
// Check for existing functions
$query = $phpbbdb->DoQuery("SELECT config_value FROM {$table_prefix}config WHERE config_name='cookie_name'");
$cname = $phpbbdb->Do_Fetch_Row($query);
if (isset($_COOKIE["{$cname['0']}_sid"])) {
    $cvalue = $_COOKIE["{$cname['0']}_sid"];
    $query = $phpbbdb->DoQuery("SELECT session_user_id,session_logged_in FROM {$table_prefix}sessions WHERE session_id='{$cvalue}'");
    $cinfo = $phpbbdb->Do_Fetch_Row($query);
    // Check if user exists on PhpBB Board
    if ($cinfo[0] != "") {
        $suid = $cinfo[0];
        // Check if they are logged in
        if ($cinfo[1] == 1) {
            $query = $phpbbdb->DoQuery("SELECT username,user_password FROM {$table_prefix}users WHERE user_id='{$suid}'");
            $phpbbname = $phpbbdb->Do_Fetch_Row($query);
            @setcookie($auth_ucookie, $phpbbname[0], time() + $x7c->settings['cookie_time'], $X7CHAT_CONFIG['COOKIE_PATH']);
コード例 #4
0
ファイル: postnuke.php プロジェクト: EZDM/omeyocan
$auth_pcookie = "X7C2P";
$auth_register_link = "../user.php?op=check_age&module=NS-NewUser";
$auth_disable_guest = true;
// Get the PostNuke Configuration File
// For some reason PostNuke still uses a damned deprecated extract statement which f***s up our prefix variable
$save_the_prefixs = $prefix;
include_once "../config.php";
$pn_prefix = $pnconfig['prefix'] . "_";
$prefix = $save_the_prefixs;
// Test for encoded values
if ($pnconfig['encoded'] == 1) {
    $pnconfig['dbuname'] = base64_decode($pnconfig['dbuname']);
    $pnconfig['dbpass'] = base64_decode($pnconfig['dbpass']);
}
// Make a database connection to the PhpBB2 database
$nukedb = new x7chat_db($pnconfig['dbhost'], $pnconfig['dbuname'], $pnconfig['dbpass'], $pnconfig['dbname']);
if (isset($_COOKIE["POSTNUKESID"])) {
    $cvalue = $_COOKIE["POSTNUKESID"];
    $q = $nukedb->DoQuery("SELECT pn_uid FROM {$pn_prefix}session_info WHERE pn_sessid='{$cvalue}'");
    $suid = $nukedb->Do_Fetch_Row($q);
    $q = $nukedb->DoQuery("SELECT pn_uname,pn_pass FROM {$pn_prefix}users WHERE pn_uid='{$suid['0']}'");
    $pnukename = $nukedb->Do_Fetch_Row($q);
    if ($pnukename[0] != "") {
        $_COOKIE['X7C2U'] = $pnukename[0];
        $_COOKIE['X7C2P'] = $pnukename[1];
    }
}
function auth_encrypt($data)
{
    return md5($data);
}
コード例 #5
0
ファイル: smf.php プロジェクト: EZDM/omeyocan
<?php

// The original SMF AuthMod for version 1 was programmed by Carl C
// Parts of the original AuthMod were used when converting this to Version 2
// Borrowed Work: Cookie Handling, Encryption Function
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../index.php?action=register";
$auth_disable_guest = true;
// Get the SMF Configuration File
include_once "../Settings.php";
// Make a database connection to the SMF database
$smfdb = new x7chat_db($db_server, $db_user, $db_passwd, $db_name);
$data = @stripslashes(stripslashes(eregi_replace("&quot;", "\"", $_COOKIE[$cookiename])));
$cookie = unserialize("{$data}");
$HTTP_COOKIE_VARS['smf_uc'] = $cookie[0];
$HTTP_COOKIE_VARS['smf_up'] = $cookie[1];
if ($HTTP_COOKIE_VARS['smf_uc'] != "") {
    $password = $smfdb->DoQuery("SELECT memberName,passwd,passwordSalt from {$db_prefix}members WHERE ID_MEMBER='{$HTTP_COOKIE_VARS['smf_uc']}'");
    $password = $smfdb->Do_Fetch_Row($password);
    $HTTP_COOKIE_VARS['smf_uc'] = $password[0];
    $_COOKIE['X7C2U'] = $HTTP_COOKIE_VARS['smf_uc'];
    $_COOKIE['X7C2P'] = $HTTP_COOKIE_VARS['smf_up'];
    $password_salt = $password[2];
}
function auth_encrypt($data)
{
    $enc = sha1(strtolower($_COOKIE['X7C2U']) . $data);
    if (isset($_POST['dologin'])) {
        $enc = auth_cookie_encrypt($enc);
コード例 #6
0
ファイル: punbb.php プロジェクト: EZDM/omeyocan
//        is forbidden and doing so will terminate
//        your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// PunBB 1.2
// Written by Smartys, PunBB Developer
// Modified by E-Oreo, X7 Chat Developer
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../register.php";
$auth_disable_guest = true;
// Get the PunBB Configuration File
require "../config.php";
// Make a database connection to the PunBB database
$pun_db = new x7chat_db($db_host, $db_username, $db_password, $db_name);
// Authenticate the user against the PunBB database
if (isset($_COOKIE[$cookie_name])) {
    $_COOKIE[$cookie_name] = stripslashes(str_replace('&quot;', '"', $_COOKIE[$cookie_name]));
    list($cookie['user_id'], $cookie['password_hash']) = unserialize($_COOKIE[$cookie_name]);
    if ($cookie['user_id'] > 1) {
        // Check if there's a user with the user ID and password hash from the cookie
        $result = $pun_db->DoQuery('SELECT u.id, u.username, u.password FROM ' . $db_prefix . 'users AS u WHERE u.id=' . intval($cookie['user_id']));
        $pun_user = $pun_db->Do_Fetch_Row($result);
        if (isset($pun_user[0])) {
            @setcookie($auth_ucookie, $pun_user[1], time() + $x7c->settings['cookie_time'], $X7CHAT_CONFIG['COOKIE_PATH']);
            @setcookie($auth_pcookie, $cookie['password_hash'], time() + $x7c->settings['cookie_time'], $X7CHAT_CONFIG['COOKIE_PATH']);
            $_COOKIE[$auth_ucookie] = $pun_user[1];
            $_COOKIE[$auth_pcookie] = $cookie['password_hash'];
        }
    }
コード例 #7
0
ファイル: mboard.php プロジェクト: EZDM/omeyocan
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// MercuryBoard 1.1.2
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../index.php?a=register";
$auth_disable_guest = true;
// Get the MB configuration file
include_once "../settings.php";
// Create MB database connection
$mbdb = new x7chat_db($set['db_host'], $set['db_user'], $set['db_pass'], $set['db_name']);
$tablepre = $set['prefix'];
// Get cookie name
$query = $mbdb->DoQuery("SELECT * FROM {$tablepre}settings");
$row = mysql_fetch_row($query);
$mcboard_settings = unserialize($row[1]);
// See if they are logged in already
if (isset($_COOKIE[$mcboard_settings['cookie_prefix'] . "user"])) {
    $query = $mbdb->DoQuery("SELECT user_name FROM {$tablepre}users WHERE user_id='" . $_COOKIE[$mcboard_settings['cookie_prefix'] . "user"] . "'");
    $row = $mbdb->Do_Fetch_Row($query);
    if ($row[0] != "") {
        $_COOKIE[$auth_ucookie] = $row[0];
        $_COOKIE[$auth_pcookie] = $_COOKIE[$mcboard_settings['cookie_prefix'] . "pass"];
    }
}
function auth_encrypt($data)
コード例 #8
0
ファイル: yabbse.php プロジェクト: EZDM/omeyocan
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// YabbSE 1.5.5
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../index.php?board=;action=register";
$auth_disable_guest = true;
// Get the yabbse Configuration File
include_once "../Settings.php";
// Make a database connection to the yabbse database
$yabbsedb = new x7chat_db($db_server, $db_user, $db_passwd, $db_name);
$cookie = @unserialize(stripslashes(eregi_replace("&quot;", "\"", $_COOKIE[$cookiename])));
$yabbse_uc = $cookie[0];
$yabbse_up = $cookie[1];
if ($yabbse_uc != "") {
    $username = $yabbsedb->DoQuery("SELECT memberName,passwd from {$db_prefix}members WHERE ID_MEMBER='{$yabbse_uc}'");
    $username = $yabbsedb->Do_Fetch_Row($username);
    $yabbse_uc = $username[0];
    $_COOKIE[$auth_ucookie] = $yabbse_uc;
    $_COOKIE[$auth_pcookie] = $yabbse_up;
}
function yabben($data, $key)
{
    if (strlen($key) > 64) {
        $key = pack('H*', md5($key));
    }
コード例 #9
0
ファイル: vbulletin.php プロジェクト: EZDM/omeyocan
require_once "../includes/config.php";
// found vBulletin 3.5
if (!empty($config)) {
    $servername =& $config['MasterServer']['servername'];
    $dbusername =& $config['MasterServer']['username'];
    $dbpassword =& $config['MasterServer']['password'];
    $dbname =& $config['Database']['dbname'];
    $tableprefix =& $config['Database']['tableprefix'];
    $cookieprefix =& $config['Misc']['cookieprefix'];
}
// This is the license number for you vB. You can find it in your docmunents
// or in every vB file at the top or bottom
// It works still if it is empty but the password in the cookie is NOT checked
// if it is valid!
$license_nr = '';
$vbc = new x7chat_db($servername, $dbusername, $dbpassword, $dbname);
if (isset($_COOKIE[$cookieprefix . 'userid']) && isset($_COOKIE[$cookieprefix . 'password'])) {
    $result = $vbc->DoQuery("SELECT userid, username, usergroupid, password, salt FROM {$tableprefix}user WHERE userid='" . intval($_COOKIE[$cookieprefix . 'userid']) . "'");
    $member = $vbc->Do_Fetch_Row($result);
    // Check to make a better check ...
    if ($license_nr != '') {
        // Check if the pass from the cookie is valid
        if (md5($member[5] . $license_nr) == $_COOKIE[$cookieprefix . 'password']) {
            # OK Pass/Userid exists
            @setcookie("{$auth_ucookie}", $member[1], time() + 140000, "/");
            @setcookie("{$auth_pcookie}", $member[3], time() + 140000, "/");
            $_COOKIE[$auth_ucookie] = $member[1];
            $_COOKIE[$auth_pcookie] = $member[3];
            $vb_salt = $member[4];
        }
        // Simple check ..
コード例 #10
0
ファイル: index.php プロジェクト: EZDM/omeyocan
if (!isset($X7CHAT_CONFIG['INSTALLED'])) {
    header("location: ./install.php");
    echo "<a href=\"./install.php\">Click Here to Install X7 Chat 2.0.0A3</a>";
    exit;
}
// Test to make sure the user didn't miss the last install step
if (@$_GET['act'] != "frame") {
    if (file_exists("./install.php") || file_exists("./upgradev1.php")) {
        print "<div align='center'><font color='red'>You must delete the files \n            install.php and upgradev1.php before using the chatroom.\n            </font></div>";
        exit;
    }
}
// Import the database library
include_once "./lib/db/" . strtolower($X7CHAT_CONFIG['DB_TYPE']) . ".php";
// Create a new database connection
$db = new x7chat_db();
// Include the classes needed for loading
// Include the security
include_once "./lib/security.php";
// Clean all incoming data
parse_incoming();
include_once "./lib/load.php";
// Load the server variables
$x7c = new settings();
// Include the authentication functions
include_once "./lib/auth.php";
// Include the AuthMod file
include_once "./lib/auth/" . strtolower($X7CHAT_CONFIG['AUTH_MODE']) . ".php";
// Force Settings from AuthMod
if ($auth_disable_guest) {
    $x7c->settings['allow_guests'] = 0;
コード例 #11
0
ファイル: invision1.php プロジェクト: EZDM/omeyocan
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// Invision 1.3.1 Final
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../index.php?act=Reg&code=00";
$auth_disable_guest = true;
// Get the IB configuration file
include_once "../conf_global.php";
// Create IB database connection
$ibdb = new x7chat_db($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass'], $INFO['sql_database']);
// Handle Invision login data conversion
if (@$_COOKIE['member_id'] != "" && @$_COOKIE['member_id'] != 0) {
    $q = $ibdb->DoQuery("SELECT name FROM {$INFO['sql_tbl_prefix']}members WHERE id='{$_COOKIE['member_id']}'");
    $row = $ibdb->Do_Fetch_Row($q);
    $_COOKIE[$auth_ucookie] = $row[0];
    $_COOKIE[$auth_pcookie] = @$_COOKIE['pass_hash'];
}
function auth_encrypt($data)
{
    return md5($data);
}
function auth_getpass($auth_ucookie)
{
    global $ibdb, $INFO, $db, $prefix, $g_default_settings, $x7c, $txt;
    $query = $ibdb->DoQuery("SELECT password FROM {$INFO['sql_tbl_prefix']}members WHERE name='{$_COOKIE[$auth_ucookie]}'");
コード例 #12
0
ファイル: e107.php プロジェクト: EZDM/omeyocan
//		Removing this copyright and/or any other
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../signup.php";
$auth_disable_guest = true;
// Include the e107 cooookie
include_once "../e107_config.php";
// Init a new DB session to grab the cookie name
$e107 = new x7chat_db($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
// Get name of cookie
$query = $e107->doQuery("SELECT e107_value FROM {$mySQLprefix}core WHERE e107_name='pref'");
$row = $e107->Do_Fetch_row($query);
$pref = unserialize($row[0]);
session_start();
// This next line of code is straight from e107
@(list($uid, $upw) = @$_COOKIE[$pref['cookie_name']] ? @explode(".", $_COOKIE[$pref['cookie_name']]) : @explode(".", $_SESSION[$pref['cookie_name']]));
if ($uid > 0) {
    // They are logged into E107, do a pass comparison
    $query = $e107->DoQuery("SELECT user_name,user_password FROM {$mySQLprefix}user WHERE user_id='{$uid}'");
    $row = $e107->Do_Fetch_row($query);
    if ($upw == md5($row[1])) {
        $_COOKIE[$auth_ucookie] = $row[0];
        $_COOKIE[$auth_pcookie] = $row[1];
    }
コード例 #13
0
ファイル: invision2.php プロジェクト: EZDM/omeyocan
//		X7 Group or X7 Chat copyright from any
//		of the files included in this distribution
//		is forbidden and doing so will terminate
//		your right to use this software.
//
////////////////////////////////////////////////////////////////EOH
// Invision 2
// This file holds data on authentication
$auth_ucookie = "X7C2U";
$auth_pcookie = "X7C2P";
$auth_register_link = "../index.php?act=Reg&CODE=00";
$auth_disable_guest = true;
// Get the IB configuration file
include_once "../conf_global.php";
// Create IB database connection
$ibdb = new x7chat_db($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass'], $INFO['sql_database']);
// Handle Invision login data conversion
if (isset($_COOKIE['member_id']) && @$_COOKIE['member_id'] != 0) {
    // Yes they are logged in, do a cookie transfer
    $uid = intval($_COOKIE['member_id']);
    $_COOKIE['X7C2P'] = $_COOKIE['pass_hash'];
    $q = $ibdb->DoQuery("SELECT name,member_login_key FROM {$INFO['sql_tbl_prefix']}members WHERE id='{$uid}'");
    $row = $ibdb->Do_Fetch_Row($q);
    $_COOKIE['X7C2U'] = $row[0];
    $ib2_member_login_key = $row[1];
    // Grab password information
    $query = $ibdb->DoQuery("SELECT converge_pass_salt,converge_pass_hash FROM {$INFO['sql_tbl_prefix']}members_converge WHERE converge_id='{$uid}'");
    $row = $ibdb->Do_Fetch_Row($query);
    $ib2_salt = $row[0];
    $ib2_pash_hash = $row[1];
    if ($ib2_member_login_key == $_COOKIE['X7C2P']) {