PDA

View Full Version : Hm Security


Smoky
12-15-2004, 10:39 PM
Hey...

When i came to HM i your client tracker picked me up like it should. But you first didnt allow me a web hosting account because you thought i had made serveral users. I believe it was Creator that accused me of this.. But the problem was that when your tracker recieves the information it stores the NTLs Cache Server address rather than the REAL clients address.

Below is coding to a daddy of trackers.. You might want to make some changes to it to suite your needs but this will return the correct address.

if (getenv("HTTP_CLIENT_IP"))
{
*$ip = getenv("HTTP_CLIENT_IP");
} *
else if(getenv("HTTP_X_FORWARDED_FOR"))
{
*$ip = getenv("HTTP_X_FORWARDED_FOR");
}
else if(getenv("REMOTE_ADDR"))
{
*$ip = getenv("REMOTE_ADDR");
}
else
{
$ip = $_SERVER['REMOTE_ADDR'];
}

$browser= $_SERVER['HTTP_USER_AGENT'];
$remote = gethostbyaddr($_SERVER['REMOTE_ADDR']).";".gethost byname($_SERVER['REMOTE_ADDR']);
$date * = date(d)."/".date(m)."/".date(y);
$time * = date(H).";".date(i).";".date(s);
$script = $_SERVER['SCRIPT_FILENAME'];
$log = "\n^".$date.":".$time.":".$ip.":".$remote.":".$bro wser.":".$script.":".$width.":".$height;

This will provide information about:

*Users Real IP Address, Rather Than There ISP Cache Server
*Date & Time
*Page Requested
*Browser Type
*ISP IP Adddress
*ISP Domain Name View

Let me know if this helps... Always like to help..! :D
Cheers
Mark

oooo.... By the way you still asking for moderaters i sore something on the main page. If so where do i go to ask..? Or can i ask you?

Creator
12-16-2004, 04:49 PM
smoky could you add somemore info so that we can track members log-in times too? ( If you want the exact reason for that PM me ;-) )

mahangee
12-16-2004, 05:00 PM
Originally posted by Smoky@Dec 15 2004, 10:39 PM
oooo.... By the way you still asking for moderaters i sore something on the main page. If so where do i go to ask..? Or can i ask you?
17973

I believe what you are refering to is HM agents recruiting. Look inside the Announcements Forum for an application thread :D

Also for your code you could add the $_SERVER value of PHP_AUTH_USER which should show you the username of which the person is logged in as. :D

shwaza
12-16-2004, 10:30 PM
I figured that ipb would do that kinda stuff already for you wouldnt it? btw creator if you click on someones name it will tell you their last log in time.

Smoky
12-16-2004, 11:38 PM
Hey...


if (getenv("HTTP_CLIENT_IP"))
{
$ip = getenv("HTTP_CLIENT_IP");
}
else if(getenv("HTTP_X_FORWARDED_FOR"))
{
$ip = getenv("HTTP_X_FORWARDED_FOR");
}
else if(getenv("REMOTE_ADDR"))
{
$ip = getenv("REMOTE_ADDR");
}
else
{
$ip = $_SERVER['REMOTE_ADDR'];
}

$browser= $_SERVER['HTTP_USER_AGENT'];
$remote = gethostbyaddr($_SERVER['REMOTE_ADDR']).";".gethost byname($_SERVER['REMOTE_ADDR']);
$date = date(d)."/".date(m)."/".date(y);
$time = date(H).";".date(i).";".date(s);
$script = $_SERVER['SCRIPT_FILENAME'];
$auth = $_SERVER['PHP_AUTH_USER'];
if($auth == "")
$auth = "nouser";
$loggin = $_POST['loggin'];
if($loggin == "")
$loggin = 0;
$log = "\n^".$date."~".$time."~".$auth."~".$loggin."~".$i p."~".$remote."~".$browser."~".$script."~".$width. "~".$height;


You would have to edit the login in page to include loggin:
<input type="hidden" value="1">

This would pick up if the user has just been signed in and redirected. When it comes to looking in the logs you can see if the loggin is 0 or 1. 1 meaning they had just logged in. :lol:

Also auth will show if the user is logged in the system with a user name which was pointed out by mahangee.

Is this what you meant Creator....?

Now where are them sign up forms :blink: