| Author |
Message |
soc Hangin' Around

Joined: Apr 14, 2004 Posts: 26
|
Posted:
Wed Apr 14, 2004 12:44 pm |
|
Hello,
i put the hackalert code in my site(code in mainfile, image and hackattempt.php) in my site, but it gives me an error when i hit the "test" url INSTALL file has.
error :
Parse error: parse error in /home/mysite/public_html/hackattempt.php
on line 25
(line 25 is $msgToHacker = <<< _MSG_)
I use a clear phpnuke 6.5.
Any idea about?
Thanks in advance  |
|
|
|
 |
bones Hangin' Around

Joined: Sep 18, 2003 Posts: 36
|
Posted:
Wed Apr 14, 2004 1:31 pm |
|
you have to make sure that the code goes at the top of the mainfile.php like this.
<?php
if (stristr($_SERVER["QUERY_STRING"],'%20union%20')) {
$loc = $_SERVER['QUERY_STRING'];
header("Location: hackattempt.php?$loc");
die();
}
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
and the hackattemp.php file gones into your root |
|
|
|
 |
Nukeum66 Life Cycles Becoming CPU Cycles

Joined: Jul 30, 2003 Posts: 551 Location: Neurotic, State, USA
|
Posted:
Wed Apr 14, 2004 2:04 pm |
|
Have you edited the message? |
|
|
|
 |
soc Hangin' Around

Joined: Apr 14, 2004 Posts: 26
|
Posted:
Wed Apr 14, 2004 3:17 pm |
|
i didn't change nothing, i use the default code. In mainfile.php the code i put is ok and in hackattempt.php file i have the original from here.
I can't understand why it gives me parsing error.
Strange things ...  |
|
|
|
 |
Nukeum66 Life Cycles Becoming CPU Cycles

Joined: Jul 30, 2003 Posts: 551 Location: Neurotic, State, USA
|
Posted:
Wed Apr 14, 2004 7:29 pm |
|
PM me the hackattempt.php (copy paste) so I can compare it with mine  |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Apr 14, 2004 8:58 pm |
|
What version of php are you using? If you are using a version prior to 4.1 you will need to change $_SERVER to $HTTP_SERVER_VARS. Also, some setups require fully qualified urls in the header. Try this
header("Location: ");
Of course if your hackattempt script is in a subfolder you will need to add that also. |
Last edited by Raven on Thu Apr 15, 2004 12:06 pm; edited 1 time in total |
|
|
 |
soc Hangin' Around

Joined: Apr 14, 2004 Posts: 26
|
Posted:
Thu Apr 15, 2004 11:59 am |
|
hi,
i rewrote on hand the code again in another txt file and uploaded it, and ... it works now.
mysterious things, mysterious php ...
thanks  |
|
|
|
 |
|
|
|
|