Jump to content

php noob question


ctcp

Recommended Posts

require_once 'config.php';
require_once 'functions.php';


$file_basename = basename( __FILE__ );

$corp_id = false;


$rm_addr = @$_SERVER['REMOTE_ADDR'];


$psw_value = strtolower(trim((@$_GET['pswc'])));
if( isset($pswConfig[$psw_value]) ) {
$corp_id = (int)$pswConfig[$psw_value];
} else {
print "\n<center>";
print "\n<h1>wrong password</h1>";


print "\n<form action='".$file_basename."' method='GET'>";
print "\n password:<input type='text' name='pswc'>";
print "\n<input type='submit' value='submit'>";
print "\n</form>";

_google_viststat();

print "\n</center>";


die;
}
$file = $file_basename.'?pswc='.rawurlencode($psw_value);

 

i can't found  from where this script request the password for DB or from confiq.php ?

 

this is confiq.php

 

<?php  
/*
Ratter by Siim Tiilen aka Baron Holbach <[email protected]> is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
http://creativecommons.org/licenses/by-sa/3.0/us/

all isk donations welcome in eve

All Eve Related Materials are Property Of CCP Games (  http://www.ccpgames.com/ )
*/


// database config
$dbhost = 'xxx';
$dbport = '';
$dbname = 'xxxx';
$dbuser = 'xxxx';
$dbpasswd = 'xxx';

// for images etc...
$img_cache_directory = dirname(__FILE__).'/img/';
// api cache directory
$api_cache_directory = dirname(__FILE__).'/apicache/';

// api keys used to fetch api
$config_keys_eve = array(

'key1' => array( 
		'apiKey' => 'EA3B3D58832C43AB94E2B861E41529804EC976F44F994E3984BFAFB38E51BFA1',
		'characterID' => '1822897175',
		'userID' => '1336076',	
	),

);

// list of password to get access, 
// id of array is password, and value is corp_id in db ( same as in eve-api)
$pswConfig = array(
 // password => corp_id
'test_password' => '123456', // .EE 
);

// web urls for images
define('rats_img_url','npc/%d.png');

define('char_port_img_url','cache.php?getcharimg=%d&usecache=true');

// define eve-api url
$eve_api = 'http://api.eve-online.com';

define('body_font_color_common','#333333');
define('body_link_color_common','#0000FF');



// function for collecting vitising data etc google ...
function _google_viststat() {
/* place your stat code here, echo it simply */
}


// do not change, init db object 
$db = new mysqli( $dbhost, $dbuser, $dbpasswd,  $dbname, ( !$dbport ? null : $dbport ) );


if ($db->connect_error) {
error_log( "ratter db error, msg: ".$db->connect_error.", code: ".$db->connect_errno );
die("database error, check logs for more!");
}

 

i try to login from Test password 123456 but not work ..

 

Link to comment
https://forums.phpfreaks.com/topic/228590-php-noob-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.