The Geek
03-30-2004, 10:00 PM
HowdA all...
Was looking for a decent and simple hack to issue a better IP Ban. Couldnt really find anything I liked so I did a quick hack job. Its not genius or anything... just copy and paste modification.
In includes/functions.php search for:
eval(print_standard_error('error_banip'));
And I replaced it with:
global $header, $footer, $headinclude, $forumjump;
global $timezone, $vboptions, $vbphrase, $stylevar, $session, $logincode;
global $_POST, $postvars, $formfile, $_REQUEST;
$title = 'You\'ve been banned!';
$message= '<p align=center>Your IP address has been banned from my site.<br>I am now sending you somewhere better suited for banishment.<br>Please ensure your volume is on.<br><b>NJoy</b></p>';
$url='http://www.e7.pl/~casha/swf/pmf.swf';
$pagetitle = $title;
$errormessage = $message;
// make sure no one has quotes in the url as it might break the js for mozilla
$url = str_replace('&', '&', $url); //moved here to stop the htmlspecialchars_uni() later having a negative effect
$js_url = addslashes($url);
$url = htmlspecialchars_uni($url); // make sure that no XSS can be done by breaking out of the HTML tags
unset($shutdownqueries['pmpopup']); // we aren't going to get a PM popup here because we don't have the footer
eval('print_output("' . fetch_template('STANDARD_REDIRECT') . '");');
Yes... this is semi sloppy as this is most of the code from the redirect function in the same file.
Anyway... thought I would share just in case it can help someone else. I am sure someone can gussy this up if it so moves them to.
Gotta love the page they are redirected to ;)
nJoy
Was looking for a decent and simple hack to issue a better IP Ban. Couldnt really find anything I liked so I did a quick hack job. Its not genius or anything... just copy and paste modification.
In includes/functions.php search for:
eval(print_standard_error('error_banip'));
And I replaced it with:
global $header, $footer, $headinclude, $forumjump;
global $timezone, $vboptions, $vbphrase, $stylevar, $session, $logincode;
global $_POST, $postvars, $formfile, $_REQUEST;
$title = 'You\'ve been banned!';
$message= '<p align=center>Your IP address has been banned from my site.<br>I am now sending you somewhere better suited for banishment.<br>Please ensure your volume is on.<br><b>NJoy</b></p>';
$url='http://www.e7.pl/~casha/swf/pmf.swf';
$pagetitle = $title;
$errormessage = $message;
// make sure no one has quotes in the url as it might break the js for mozilla
$url = str_replace('&', '&', $url); //moved here to stop the htmlspecialchars_uni() later having a negative effect
$js_url = addslashes($url);
$url = htmlspecialchars_uni($url); // make sure that no XSS can be done by breaking out of the HTML tags
unset($shutdownqueries['pmpopup']); // we aren't going to get a PM popup here because we don't have the footer
eval('print_output("' . fetch_template('STANDARD_REDIRECT') . '");');
Yes... this is semi sloppy as this is most of the code from the redirect function in the same file.
Anyway... thought I would share just in case it can help someone else. I am sure someone can gussy this up if it so moves them to.
Gotta love the page they are redirected to ;)
nJoy