Location: PHPKode > projects > Warp.cms - php/mysql content management > warp_121/secure.php
<?php

// [direct access security module v.1.2.1]
// xantis.warp.cms - version 1.2
// (c) 2002 xantis - all rights reserved
// this code is registered and protected by international copyrights laws


//####### Register Globals !

extract($HTTP_ENV_VARS);
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);

//#########################


$xnt_control_var = 'xnt2002warp.cms';
require("lib_adv.php");

if (empty($ywff)) {
	$ywff = base64_encode('secure.php');
	$ywff = rawurlencode($ywff);
} //end if


//-------------------------------- functions
function xtext_warn ($ytext) {
	echo ("<font face=\"Verdana, Tahoma, Arial, sans-serif\" size=\"2\" color=\"#FF3300\">$ytext</font>");
} //end function


function xregister_hacking () {

	global 	$PHP_SELF, $HTTP_USER_AGENT, $REMOTE_ADDR, $PHP_AUTH_USER, $PHP_AUTH_PW, 
		$arr_var_result, $y_warp_xdate, $y_warp_xtime, $ywff,
		$ywebsite_addr ;

//---------------------------------------------- header
	xheader ('RESTRICTED AREA !', '');
//----------------------------------------------

	xnewline ();

	xcenter_start ();
	xtable_start ('580');

		xtable_row_start ();

			xtable_column_start_vcenter ('1', '30', '#F6F7EB');
				xspace ();
			xtable_column_end ();

			xtable_column_start_vcenter ('1', '530', '#F6F7EB');
				xvline ('100%');

				xcenter_start ();
					xwriteflash_bg_var ('flagger.swf',
					"&xaction=".rawurlencode('err').
					"&"
					, '30', '30', '#F6F7EB');
				xcenter_end ();

				xtext_warn (
					'<b>[ '."$ywebsite_addr".' ]</b> '.
					'<b>- website secured by :: xantis &reg; warp &#153; content.management.server '.
					'version 1.2 :: &copy; 2002 xantis - all rights reserved</b><br>'.
					'You have NOT the right to access this page directly under warp.cms ! '.
					'Security does not allow this operation. If the access is restricted that means '.
					'you may violate the privacy on this website. This website is legally protected '.
					'by international copyright and intellectual property laws. '.
					'You are now under strictly monitoring as try violating the privacy on this website. '.
					'Please exit this web page or if you do NOT you will be registered as a cracker. '
				);
				xvline ('100%');
			xtable_column_end ();

			xtable_column_start_vcenter ('1', '20', '#F6F7EB');
				xspace ();
			xtable_column_end ();

		xtable_row_end ();


	xtable_end ();
	xcenter_end ();


//---------------------------------------------- footer
	xfooter ();
//----------------------------------------------

	//--------------------identify browser & OS

	// browser identify
	$wp_browser = '';
	$wp_browser = 'other';
	if (eregi("Netscape", $HTTP_USER_AGENT) OR eregi("Mozilla", $HTTP_USER_AGENT)) {
		$wp_browser = "netscape";
	} //end if
	if (eregi("MSIE", $HTTP_USER_AGENT)) {
		$wp_browser = "msie";
	} //end if
	if (eregi("Opera", $HTTP_USER_AGENT)) {
		$wp_browser = "opera";
	} //end if

	// os identify
	$wp_os = '';
	$wp_os = 'other';
	if (eregi("Win", $HTTP_USER_AGENT)) {
		$wp_os = "windows";
	} //end if
	if (eregi("Mac", $HTTP_USER_AGENT) OR eregi("PPC", $HTTP_USER_AGENT)) {
		$wp_os = "mac";
	} //end if
	if (eregi("Linux", $HTTP_USER_AGENT)) {
		$wp_os = "linux";
	} //end if
	if (eregi("SunOS", $HTTP_USER_AGENT) OR eregi("Solaris", $HTTP_USER_AGENT)) {
		$wp_os = "sun";
	} //end if
	if (eregi("IRIX", $HTTP_USER_AGENT)) {
		$wp_os = "irix";
	} //end if
	if (eregi("FreeBSD", $HTTP_USER_AGENT)) {
		$wp_os = "freebsd";
	} //end if

	//------------------------ get user auth

	//read from users
	$WARP_B64_ENC_AUTH_PASSW = base64_encode($PHP_AUTH_PW);
	xmysql_read_data ("SELECT id FROM users WHERE ( (usr_name='$PHP_AUTH_USER') AND (usr_pass='$WARP_B64_ENC_AUTH_PASSW') )");

	$y_cnt_new_usr_id = '<anonymous>, ';
	if (!empty($arr_var_result[0])) {
		$y_cnt_new_usr_id = '<'.$arr_var_result[0].'>, ';
	} //end if

	//------------------------ register the possible hacker

	$y_forced_file_name = rawurldecode($ywff);
	$y_forced_file_name = base64_decode($y_forced_file_name);

	xmysql_write_data ("INSERT INTO hack_register (w_browser, w_os, w_date, w_time, w_ipaddr, w_usr, w_forced) VALUES ('$wp_browser', '$wp_os', '$y_warp_xdate', '$y_warp_xtime', '$REMOTE_ADDR', '$y_cnt_new_usr_id', '$y_forced_file_name')");

	die ("");
} //end function

//----------------------------------------------


//--------------------

xregister_hacking ();

//--------------------


// end of php code
?>
Return current item: Warp.cms - php/mysql content management