EvilZone
Hacking and Security => Hacking and Security => : Nerotic7 November 15, 2012, 03:47:55 PM
-
I can program, but I was taught to program games, not IP Loggers.
I'm attempting to take baby steps when it comes to "hacking".
Webs doesn't allow you to see visitors IP's, just their first names.
So, is there anything I can do to see the IP's?
-
I'm assuming by "first names" you mean what IP resolves to (the hostname). In any case, PHP can log the IP in the decimal form.
-
You can get the ip with:
<?php
$IP = $_SERVER['REMOTE_ADDR'];
?>
then save $IP to a file with:
<?php
$file = "ip_log.csv";
$fh = fopen($file, 'a');
fwrite($fh, $IP . '\n');
fclose($fh);
?>
And don't forget to save it as a .php!
-
http://www.hotscripts.com/blog/logging-visitor-details-to-text-file/
You can also use different variables to get different IP information:
function getip() {
if (isset($_SERVER)) {
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$ip_addr = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif (isset($_SERVER["HTTP_CLIENT_IP"])) {
$ip_addr = $_SERVER["HTTP_CLIENT_IP"];
} else {
$ip_addr = $_SERVER["REMOTE_ADDR"];
}
} else {
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) {
$ip_addr = getenv( 'HTTP_X_FORWARDED_FOR' );
} elseif ( getenv( 'HTTP_CLIENT_IP' ) ) {
$ip_addr = getenv( 'HTTP_CLIENT_IP' );
} else {
$ip_addr = getenv( 'REMOTE_ADDR' );
}
}
return $ip_addr;
}
Have fun. You can also do one with javascript, as well as MySQL (and other databases)
Lastly, you can always do this as well:
http://bit.ly/UIZIYw
-
If you mean "Webs" like Webs.com, then you should enable Clicky on there, it tells you how much traffic your site gets and you can see the individual IPs, their location, OS and browser, how long they were on your site, and which pages they visited.
-
Can javascript log IPs too or is it just server side scripts that can do it?
-
There's no notion of hosts or ip-addresses in the javascript standard library. But i may be wrong again.
-
There's no notion of hosts or ip-addresses in the javascript standard library. But i may be wrong again.
I'll try to find it but I had a javascript do the logging to a text file. I'll have to try and find it again.
-
javascript:
function getip() {
req = new XMLHttpRequest();
url = "http://checkip.dyndns.com/";
req.open('GET', url, true);
req.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;
req.onreadystatechange = function(){
if (req.readyState != 4) { return; }
var IPn = req.responseText;
alert(IPn.substring(19)); // here you can have the ip
};
req.send(null);
}
dont know how to save to loggfile tho
maybe xmlhttprequest to other language script
or just check the webserver loggs
dont think you can save file directly with javascript on the server
-
dont think you can save file directly with javascript on the server
JavaScipt is a client-side scripting language,so it can't save files on the server (you would need a server-side language like PHP for that)
-
JavaScipt is a client-side scripting language,so it can't save files on the server (you would need a server-side language like PHP for that)
yeah ofc, was late ^^
-
If you mean "Webs" like Webs.com, then you should enable Clicky on there, it tells you how much traffic your site gets and you can see the individual IPs, their location, OS and browser, how long they were on your site, and which pages they visited.
How?
-
Seriously bro, you can't look around a bit? It is not hard to find, go to your control panel and click "Website Statistics" This will tell you how much traffic your site is getting, and if you go to the visitors tab you can look at individual visitors information like IP and such.