Quiz Hack

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Mandy
Mitglied
Beiträge: 281
Registriert: 18.01.2003 15:44
Kontaktdaten:

Beitrag von Mandy »

ich komme auch nicht mehr auf den Pfad der install_hack.php
Ich werde immer auf die indexseite verwiesen.
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

wie auf die index verwiesen? die datei heißt normalerweise install_quiz_hack.php

ah
Mandy
Mitglied
Beiträge: 281
Registriert: 18.01.2003 15:44
Kontaktdaten:

Beitrag von Mandy »

ok, so müsste es aussehen:

webadresse/admin/index/install_quiz_hack.php

????
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

ja vorausgesetzt die datei liegt in webadresse/admin/index/ und wurde nicht umbenannt...

ah
Mandy
Mitglied
Beiträge: 281
Registriert: 18.01.2003 15:44
Kontaktdaten:

Beitrag von Mandy »

und genau das funktioniert eben nicht, dann kann die Seite nicht angezeigt werden und ich werde auf die Webseite verwiesen.
Mandy
Mitglied
Beiträge: 281
Registriert: 18.01.2003 15:44
Kontaktdaten:

Beitrag von Mandy »

nee, stop mal:

Die Datei liegt nicht im Ordner admin, sie liegt vorne bei der install.php, aber wenn ich /admin/ weglasse, dann wird mir angezeigt, dass
Forbidden
You don't have permission to access /index/install_quiz_hack.php on this server.
Patricia

...

Beitrag von Patricia »

Nein Saerdnaer, in der phpbb_quiz_config habe ich das feld mit dem
Datum der zuletzt gestellten quizfrage auf 1 gesetzt und das datum
der nächsten quizfrage belassen (stand im acp auf 18.januar) das
andere feld musste ich auf 1 setzen weil der Wert darin grösser
war als der Wert im Feld mit der nächsten Quizfrage, was wohl
der Grund war, warum die Automatik nicht funktionierte. Frag
mich aber bitte nicht warum das Datum der zuletzt gestellten
Frage grösser war als das Datum der nächten Frage, das kann
ich dir wirklich nicht sagen ;-)
diplomsiedler
Mitglied
Beiträge: 47
Registriert: 28.05.2001 02:00
Wohnort: Hamburg
Kontaktdaten:

Beitrag von diplomsiedler »

saerdnaer hat geschrieben: @diplomsiedler: führe folgende query aus:

Code: Alles auswählen

UPDATE phpbb_quiz_config SET config_value = '1042920875' WHERE config_name = 'next_quiz'
saerdnaer ich danke Dir!
Leider werden im Forum die Fragen noch nicht angezeigt?! Ebenso werden bei vorgeschlagenen Fragen die Name nicht übergeben.
Ich glaube, da stimmt einiges noch nicht bei mir. :)

Gruß diplomsiedler
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

@diplomsiedler: das mit dem namen übermitteln wurde eine seite voher nochmals von spaßforum erklärt... und wegen dem andernen problem: führe folgende query in phpmyadmin aus und poste dann was dann angezeigt wird:

Code: Alles auswählen

select * from phpbb_quiz_config
@patrica: ach du meinst das last_start_time feld oder?

ah
95Nasty
Mitglied
Beiträge: 20
Registriert: 22.12.2002 16:23

Beitrag von 95Nasty »

Meine common.php

Code: Alles auswählen

<?php


if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
	if( is_array($HTTP_GET_VARS) )
	{
		while( list($k, $v) = each($HTTP_GET_VARS) )
		{
			if( is_array($HTTP_GET_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
				{
					$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_GET_VARS[$k]);
			}
			else
			{
				$HTTP_GET_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_GET_VARS);
	}

	if( is_array($HTTP_POST_VARS) )
	{
		while( list($k, $v) = each($HTTP_POST_VARS) )
		{
			if( is_array($HTTP_POST_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
				{
					$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_POST_VARS[$k]);
			}
			else
			{
				$HTTP_POST_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_POST_VARS);
	}

	if( is_array($HTTP_COOKIE_VARS) )
	{
		while( list($k, $v) = each($HTTP_COOKIE_VARS) )
		{
			if( is_array($HTTP_COOKIE_VARS[$k]) )
			{
				while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
				{
					$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
				}
				@reset($HTTP_COOKIE_VARS[$k]);
			}
			else
			{
				$HTTP_COOKIE_VARS[$k] = addslashes($v);
			}
		}
		@reset($HTTP_COOKIE_VARS);
	}
}

//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$gen_simple_header = FALSE;

include($phpbb_root_path . 'config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
	header("Location: install.$phpEx");
	exit;
}

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);

//
// Mozilla navigation bar
// Default items that should be valid on all pages.
// Defined here and not in page_header.php so they can be redefined in the code
//
$nav_links['top'] = array ( 
	'url' => append_sid($phpbb_root_dir."index.".$phpEx),
	'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
);
$nav_links['search'] = array ( 
	'url' => append_sid($phpbb_root_dir."search.".$phpEx),
	'title' => $lang['Search']
);
$nav_links['help'] = array ( 
	'url' => append_sid($phpbb_root_dir."faq.".$phpEx),
	'title' => $lang['FAQ']
);
$nav_links['author'] = array ( 
	'url' => append_sid($phpbb_root_dir."memberlist.".$phpEx),
	'title' => $lang['Memberlist']
);

//
// Obtain and encode users IP
//
if( getenv('HTTP_X_FORWARDED_FOR') != '' )
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );

	if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
	{
		$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
		$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
	}
}
else
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
}
$user_ip = encode_ip($client_ip);

//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//

$sql = "SELECT *
	FROM " . CONFIG_TABLE;

if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$board_config[$row['config_name']] = $row['config_value'];
}
if ($language) 
{ 
   $board_config['default_lang'] = $language; 
   setcookie('default_lang',$language , (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); 
   if (!isset($HTTP_COOKIE_VARS['default_lang']))
   {
	$sql = "UPDATE " . SESSIONS_TABLE . " SET  session_lang='$language' WHERE session_id='$sid'";
	if( !($result = $db->sql_query($sql)) )
	{
		message_die(CRITICAL_ERROR, "Could not update session lang information".$sql, "", __LINE__, __FILE__, $sql);
	}
   }
} else 
{
	if (isset($HTTP_COOKIE_VARS['default_lang']) ) 
	   $board_config['default_lang']=$HTTP_COOKIE_VARS['default_lang']; 
	else
	{
		$sql = "SELECT session_lang
		FROM " . SESSIONS_TABLE . " WHERE session_id='$sid'";
		if( !($result = $db->sql_query($sql)) )
		{
			message_die(CRITICAL_ERROR, "Could not query session lang information", "", __LINE__, __FILE__, $sql);
		}
		$lang = $db->sql_fetchrow($result);
		{
			$board_config['default_lang'] = ($lang['session_lang'])? $lang['session_lang']:$board_config['default_lang'];
		}
	}
}

//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}
// BEGIN Quiz Hack
$sql = "SELECT config_name, config_value FROM " . QUIZ_CONFIG_TABLE . " WHERE config_name IN ('next_quiz','last_start_time','disable')";
if ( !$quiz_result = $db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, "Could not get quiz config information", "", __LINE__, __FILE__, $sql);
}
while ( $quiz_row = $db->sql_fetchrow($quiz_result) )
{
	$quiz_config[$quiz_row['config_name']] = $quiz_row['config_value'];
}
$current_time = time();
if( !$quiz_config['disable'] && $quiz_config['next_quiz'] <= $current_time && $quiz_config['last_start_time'] + 30 <= $current_time )
{
	include($phpbb_root_path . 'includes/quiz.'.$phpEx);
	if ( $quiz->set_last_start_time() )
	{
		if ( $quiz->make_question_post( $quiz->get_random_quiz_id() ) )
		{
			$quiz->set_next_quiz_time();
		}
	}
}
// END Quiz Hack

?>
Gesperrt

Zurück zu „phpBB 2.0: Mod Support“