View Full Version : gaining IP's through a myspace listener?
GH0STce11
12-19-2005, 02:52 AM
okay,
here's the deal.
I know there is a method of gaining someone's IP by setting up a network listener set to port 80 (http) then directing someone to your IP, which will show the remote IP in the listener.
what i was wondering was if it'd be possible (i'm pretty sure it is) to create a small HMTL script that would run on a myspace.com page (or any other page for that matter) that would record all remote IP connections made with that page then relay the log to an email address or an ftp account. (much like a remote keylogger)
I am pretty good with HTML, but i'm not profecient[sic] enough to write this out myself. also, i think all javascript tags are 'blacklisted' and maybe some more HMTL tags aswell.
-any and all replies welcomed
~GH0STce**
SyntaXmasteR
12-19-2005, 11:19 AM
GH0STce**
This should not be a problem for you if the <embed> tag is allowed on myspace. If so this is how you can log all of your viewers IP addresses.
*. Create a .php file on any server you have read write access to.
2. Here is what the .PHP file can look like:
<?php
$filename = 'myspace_iplog.txt';
$ip = $_SERVER['REMOTE_ADDR'];
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
exit;
}
if (fwrite($handle, $ip) === FALSE) {
exit;
}
fclose($handle);
}
?>
More info on fwrite can be viewed here: http://us2.php.net/fwrite
*. On your myspace page include this html:
<embed src=yourpage.php width=* height=*></embed>
4. Everytime someone views your page it will record their ip to the file myspace_iplog.txt on your server (this blank text file needs to be created before the script will work)
Is this what you were looking for?
SyntaXmasteR
12-19-2005, 11:31 AM
If you would like to recieve the IP addresses through email you can embed my page i created http://www.boninroad.com/funny2.php?friend=YOUREMAIL and you will be emailed each users IP.
GH0STce11
12-19-2005, 04:21 PM
yes, it's perfect.
i have my own server to use for this, except when it logs the IP, it loges it three times over, with no spaces in between.
i'm not great with php, and have only done a few things with it, but is there any way to seperate the IPs, say by one IP per line?
and also, what about listing the DNS along with it, or am i better off just finding the DNS for the specific IPs already logged?
-thanks
EDIT:it doesn't actually log the IP three times, that's just the users web browser accessing different sections of myspace.com
but it doesn't separate them, so if you could add that, it'd be appreciated!
SyntaXmasteR
12-19-2005, 05:05 PM
Yeah no problem:
Change this line:
$ip = $_SERVER['REMOTE_ADDR'];
to this:
$ip = $_SERVER['REMOTE_ADDR'] . "\n";
The \n should tell it to go to the next line of the file
GH0STce11
12-19-2005, 06:54 PM
thanks!
that fixed the problem!
EDIT:not to bother you any more, but is there a way you could add a line to exclude a certain IP (ie, my own)?
that would be helpful, thanks
SyntaXmasteR
12-19-2005, 07:28 PM
lol Yupp :D
Put the entire script in these:
<?
if ($_SERVER['REMOTE_ADDR'] != 'YOURIP')
{
PASTE SCRIPT HERE
}
?>
This will execute whatever is pasted in "PASTE SCRIPT HERE" only if the ip of the person viewing the page does not equal YOURIP
GH0STce11
12-19-2005, 08:05 PM
works great!
thanks!
i'm writing a small vb6 app to open the log.txt and find the dns of all the ip listed.
not really necsessary, but i want to learn vb6, haha.
GH0STce11
12-22-2005, 12:04 AM
i wanted to add the date and time the page was accessed, would i just do this:
<?php
$filename = 'myspace_iplog.txt';
$ip = $_SERVER['REMOTE_ADDR'];
$dt = $date $time;
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
exit;
}
if (fwrite($handle, $ip, $dt) === FALSE) {
exit;
}
fclose($handle);
}
?>
im not sure what the actual command for the date and time is, but is that how id set it up?
also, just a little rant here, the /n starts a new line, but i can only see the new line in wordpad, not notepad. in notepad all i see is a square box where the new line should start.
EDIT:I was told today that putting /r/n at the end should clear up the problem in notepad.
SyntaXmasteR
12-22-2005, 11:23 AM
No i would do it like this:
<?php
$filename = 'myspace_iplog.txt';
$ip = $_SERVER['REMOTE_ADDR'] . date('l dS \of F Y h:i:s A');
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
exit;
}
if (fwrite($handle, $ip) === FALSE) {
exit;
}
fclose($handle);
}
?>
I havnt tried any of these out ive just been typing them off the top of my head so i hope they are working right ~
GH0STce11
12-23-2005, 03:56 PM
how would i adjust to Mountain Standard Time (-7:00hours)?
GH0STce11
12-23-2005, 04:07 PM
also,
i fixed the problem of the new lines in wordpad by adding . "\r\n"; to the end of the $ip line.
then i rearranged the data format to get this:
$ip = $_SERVER['REMOTE_ADDR'] . " on " . date('l F dS Y @ h:i:s A') . "\r\n";
which generates:
24.*.xxx.xxx on Friday December 2*rd 2005 @ 08:04:*0 PM
24.*.xxx.xxx on Friday December 2*rd 2005 @ 08:04:*5 PM
now only to get it in mountain time...
EDIT:would it also be possible to retrieve the computer name? as in the name set at the beginning for XP setup?
i don't know if this information is given to the server, or if it can be retrieved, but if you know how, it'd be helpful!
manchestor
01-05-2006, 10:06 PM
anyone kno how i can get information to view users who viewed my profile on myspace?
kbrmagic
01-10-2006, 12:46 AM
im stupid, i admit it. but i like wat evryone had said i just dont know wat it means never the less how to do it. i understand a little bit, but im just learningm so plz can u help me. sum*
kbrmagic
01-10-2006, 12:58 AM
wat i dont know how to do is the .PHP file, cuz i dont kno much about it bu ti get how u put the html code on ur myspace that i understand :)
Ezekiel
01-10-2006, 01:10 PM
im stupid, i admit it. but i like wat evryone had said i just dont know wat it means never the less how to do it. i understand a little bit, but im just learningm so plz can u help me. sum*
It's explained pretty well here, including source of the php and instructions on how to include it on your page. If you don't know a lot of html and at least some php, then you should not try to attempt this, it would be impossible for someone to explain it to you if you have no knowledge at all, and we would end up having to do all the work for you. You should learn php then you will understand how its all working. Anyway, an ip number will not do anything, so if you are expecting to be able to hack someone by just knowing an ip then you shouldnt be doing this. Of course, it's useful to know if you wanted to know what country and isp they were using and if you had already installed a trojan then you would be able to connect. It would probably be easier to log ip numbers and other useful stuff if you did it on a proper web server where you can use ftp etc. but I suppose the whole point of this thread is about how to do this with myspace.
Popcorn1
02-13-2006, 03:42 PM
Well what about their myspace ID number or their myspace URL. Is it possible to know who's loging in to yourspace?
I'm trying to figure all of this out and I understand most of it. Except the server for the file. How do I create a server for the php file. SyntX****** posted one but for some reason it's not working.:o
Okay so I just went on to myspace and put in the code that SyntX****** has on here and it gave me a pl***in. Not exactly a pop up box but now I'm confused for sure.
Ezekiel
02-13-2006, 05:37 PM
Well what about their myspace ID number or their myspace URL. Is it possible to know who's loging in to yourspace?
I'm trying to figure all of this out and I understand most of it. Except the server for the file. How do I create a server for the php file. SyntX****** posted one but for some reason it's not working.:o
Okay so I just went on to myspace and put in the code that SyntX****** has on here and it gave me a pl***in. Not exactly a pop up box but now I'm confused for sure.
"I understand most of it. Except the server for the file."
It's probably the easiest part, it doesn't require any knowledge to set up a website/server where you have ftp access. All you have to do is find a good free hosting service (I use http://www.byethost.com/ click on storage max free) then when you have a free site set up that supports php, all you have to do is put his php script in a .php text file, then upload it to your site by ftp. Then, remember the exact url to your php script (if it's in htdocs/the main directory for your site, then it's just http://yoursite/script.php) and use that url in the myspace script to embed php scripts from other servers. Then when users access your myspace they will also be accessing the php file you uploaded on your private server. You have actually set up a proper website now, so you might as well just direct them directly to your page and include the ip logging function in the main page.
mheinjr
02-17-2006, 09:53 PM
OK, For some reason this is not working for me...... I have my .php file on a server with php capabilities etc...
Now when I go to my .php file "IT WORKS"
When I enter the code into myspace.com.. :( "NO GOOD"
When I go to Preview it says I have to install a Plugin. WTF? Why do I get that on my page?
EDIT: Also I saw you spoke of redirecting. Well I also would like to use the PHP command Header (http://www.somewhere.com) "For redirecting the person, but again I can't get the .php to be embeded into my myspace.com page... "DID MYSPACE change something???"
If you know how I can redirect that would be great.
THanks
Ezekiel
02-18-2006, 04:26 AM
OK, For some reason this is not working for me...... I have my .php file on a server with php capabilities etc...
Now when I go to my .php file "IT WORKS"
When I enter the code into myspace.com.. :( "NO GOOD"
When I go to Preview it says I have to install a Plugin. WTF? Why do I get that on my page?
EDIT: Also I saw you spoke of redirecting. Well I also would like to use the PHP command Header (http://www.somewhere.com) "For redirecting the person, but again I can't get the .php to be embeded into my myspace.com page... "DID MYSPACE change something???"
If you know how I can redirect that would be great.
THanks
Are you sure you used the <embed> tag instead of putting the whole code into myspace, because they filter most stuff. I don't use myspace so I can't really know what the problem is. Why don't you give up on myspace and set up a real site, you now have your own site that supports php, you wouldn't have to try and get around filters, just put whatever code you want in.
mheinjr
02-18-2006, 10:43 AM
Well, I am obviously doing somthing wrong, because even when I create a index.html file on my own web site IT DOES THE SAME THING "It's not just myspace". For some reason that embed command is calling for a plugin on a simple script.
Ezekiel
02-18-2006, 12:56 PM
Well, I am obviously doing somthing wrong, because even when I create a index.html file on my own web site IT DOES THE SAME THING "It's not just myspace". For some reason that embed command is calling for a plugin on a simple script.
You can't put the php script in a .html page, it is php so needs to be in a .php file. HTML pages can only have html, javascript, vbscript, .php files can have all that html pages have, and php. The php script inside the .php page has this structure:
<?php
SCRIPT HERE
?>
murderous
07-24-2006, 01:33 AM
i was told the guys at myspace disabled this ...ive tried several times and nothing happend
necrosoft
11-07-2006, 12:19 PM
hello, this script goes very well on my page. I have nevertheless a problem with firefox 2.0, it asks me to install a plugin (text/HTML) when I consult my page.
necrosoft
11-17-2006, 02:04 PM
Hello?
no solution for this problem?
:confused:
Powered by vBulletin® Version 4.1.8 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.