Paste-1319595022:v:use_geshi-1:v:type-php

Started by SleePy, Oct 26, 2011, 02:10 am

previous topic - next topic

0 Members and 2 Guests are viewing this topic.

SleePy

<?php
error_reporting(E_ALL);
ini_set('display_errors', 'on');

$base_path = '/home/svn/sm-smf/trunk';
$settings_path = '/home/smf/svn_files';

$php_open = '<' . '?' . 'php';

$revision = trim(str_replace('Revision: ', '', shell_exec('svn info /home/svn/sm-smf/trunk | grep "Revision"')));

// Get.
$contents = file_get_contents($base_path . '/index.php');

// The revision.

// Edit.
$contents = strtr($contents, array(
   'require_once(dirname(__FILE__) . \'/Settings.php\');' => 'require(\'' . $settings_path . '/Settings.php\');',
));


if (isset($_GET['destory_session']))
{
   $contents = file_get_contents($base_path . '/SSI.php');
   $contents = substr($contents, strlen($php_open));
   eval($contents);

   require_once($sourcedir . '/Subs-Auth.php');
   setLoginCookie(-3600, 0);
   if (isset($_SESSION['login_' . $cookiename]))
      unset($_SESSION['login_' . $cookiename]);

   
   Header('location: ' . str_replace('session_destroy', '', $_SERVER['HTTP_REFERER']));
   exit;
}

// Prepare.
$contents = substr($contents, strlen($php_open));

// Send.
$forum_version = 'SMF test';

$GLOBALS['true_start'] = microtime();
eval($contents);
$GLOBALS['true_end'] = microtime();

// Its quite possible that this actually is overriding the apache call.
require_once($settings_path . '/exit_script.php');
?>
No siggy! :D

Browser ID: smf ()
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 3: index+Modifications.english (default), Post.english (default), Editor.english (default).
Style sheets: 3: index.css, jquery.sceditor.css, responsive.css.
Hooks called: 46 (show)
Files included: 27 - 991KB. (show)
Memory used: 1005KB.
Tokens: post-login.
Cache hits: 18: 0.00254s for 28,511 bytes (show)
Cache misses: 2: (show)
Queries used: 11.

[Show Queries]