Forums: External Ip - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

External Ip

#1 User is offline   MxMx

  • Sergeant First Class
  • Icon
Group:
Members
Posts:
329
Joined:
24-August 03

Posted 09 October 2004 - 12:34 PM

heey dudes,

how can I get someones external IP is they are behind a router using the command line? is there a tool to do this thnq
0

#2 User is offline   BuzzDee

  • Master Sergeant
  • Icon
Group:
Specialist
Posts:
454
Joined:
27-September 03

Posted 09 October 2004 - 12:40 PM

lol there are many ways. for example make on ur pc nc listen on port 1333. then on the remote pc type start telnet [ur ip] 1333. then it will connect to ur nc and u will see incoming connection from bla. (bla = external ip ;) )
0

#3 Guest_sk3tch_*

Group:
Guests

Posted 09 October 2004 - 02:34 PM

A somewhat "ghetto" method (although it is quite effective) is to use wget or a similar tool to download http://www.whatismyip.com's index html file which will contain the current IP of the box. Then use BLAT (to email it to you) or a parser of some sort to send the information to you.
0

#4 User is offline   setthesun

  • Master Sergeant
  • Icon
Group:
Specialist
Posts:
574
Joined:
13-February 04

Posted 09 October 2004 - 03:56 PM

telnetting yourself is good but I have some better ideas;

First if you in there you can see remote IP in your netstat check it out;

netstat -an

Also you can telnet a website in commandline;


c:/telnet 67.15.74.5 80


and paste

GET /simple/ HTTP/1.0

Don't forget double enter at the end

setthesun me = new setthesun();
0

#5 User is offline   Terminal

  • Master Sergeant
  • Icon
Group:
Specialist
Posts:
536
Joined:
21-February 04

Posted 10 October 2004 - 08:04 AM

BuzzDee said:

lol there are many ways. for example make on ur pc nc listen on port 1333. then on the remote pc type start telnet [ur ip] 1333. then it will connect to ur nc and u will see incoming connection from bla. (bla = external ip  )


This is easiest i think . :D
0

#6 User is offline   Jumpi

  • Private First Class
  • Icon
Group:
Members
Posts:
63
Joined:
02-January 04

Posted 10 October 2004 - 03:01 PM

try ipconfig /all
0

#7 User is offline   setthesun

  • Master Sergeant
  • Icon
Group:
Specialist
Posts:
574
Joined:
13-February 04

Posted 10 October 2004 - 03:22 PM

Jumpi, on Oct 10 2004, 03:01 PM, said:

try ipconfig /all


If victim is behind a router you can just get internal IP, MxMx asking this for this reason

setthesun me = new setthesun();
0

#8 User is offline   TheCodeMaster

  • Private
  • Icon
Group:
Members
Posts:
3
Joined:
10-October 04

Posted 10 October 2004 - 03:49 PM

setthesun, on Oct 9 2004, 04:56 PM, said:

telnetting yourself is good but I have some better ideas;

First if you in there you can see remote IP in your netstat check it out;

netstat -an

Also you can telnet a website in commandline;


c:/telnet 67.15.74.5 80


and paste

GET /simple/ HTTP/1.0

Don't forget double enter at the end


Netstat should work fine but why the "GET /simple/ HTTP/1.0"?
0

#9 User is offline   setthesun

  • Master Sergeant
  • Icon
Group:
Specialist
Posts:
574
Joined:
13-February 04

Posted 10 October 2004 - 04:15 PM

TheCodeMaster, on Oct 10 2004, 03:49 PM, said:

setthesun, on Oct 9 2004, 04:56 PM, said:

telnetting yourself is good but I have some better ideas;

First if you in there you can see remote IP in your netstat check it out;

netstat -an

Also you can telnet a website in commandline;


c:/telnet 67.15.74.5 80


and paste

GET /simple/ HTTP/1.0

Don't forget double enter at the end


Netstat should work fine but why the "GET /simple/ HTTP/1.0"?


As I said it's just another method "/simple/" is directory name.

setthesun me = new setthesun();
0

#10 User is offline   setthesun

  • Master Sergeant
  • Icon
Group:
Specialist
Posts:
574
Joined:
13-February 04

Posted 10 October 2004 - 04:38 PM

Also I attached a small tool before for determining external IP, you can use it for your or a remote computer.

http://www.governmen...pe=post&id=1824

setthesun me = new setthesun();
0

#11 User is offline   koncept

  • Private
  • Icon
Group:
Members
Posts:
4
Joined:
30-March 04

Posted 12 April 2005 - 09:29 AM

MxMx, on Oct 9 2004, 12:34 PM, said:

heey dudes,

how can I get someones external IP is they are behind a router using the command line? is there a tool to do this thnq


Hey. I know this is an old subject, but if anybody is running unix:

#!/bin/sh
#
# Script for getting an external WAN IP
#

URLS[0]="http://checkip.dyndns.org"
URLS[1]="http://whatismyip.com" 
URLS[2]="http://www.whatismyipaddress.com"
URLS[3]="http://ipid.shat.net"
URLS[4]="http://www.edpsciences.com/htbin/ipaddress"
URLS[5]="http://www.showmyip.com"

for URL in ${URLS[@]}
do
        THIS=${URL}
        IP=`curl -s "${THIS}" | tr -cs '[0-9\.]' '\012' \
                | awk -F'.' 'NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && $4<256 && !/\.\./' | uniq`
        if [ $? == 0 ]; then
                IP=`echo $IP | awk '{print $1}'`
                echo "Your WAN IP Address is: $IP"
                exit
        fi
done

0

#12 User is offline   da_cash

  • Sergeant
  • Icon
Group:
Members
Posts:
232
Joined:
27-January 04

Post icon  Posted 12 April 2005 - 10:17 AM

ok here's small program to retrieve the ip from http://checkip.dyndns.org/ and the source coded in c


wanip.c
#include <wininet.h>
#include <stdio.h> 

#define AUTHOR "da_cash"
CHAR buffer[100];
int i=75;

int main()
{

printf("+-----------------------+\n");
printf("+ WAN IP by %s/2k5 +\n",AUTHOR);
printf("+-----------------------+\n\n");

HINTERNET hINet, hFile;
CHAR buffer[100];


hINet = InternetOpen(AUTHOR, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 );

if ( !hINet )
{

	printf("Error getting WAN IP");
return;
}


hFile = InternetOpenUrl( hINet,"http://checkip.dyndns.org/" , NULL, 0, 0, 0 );


if ( hFile )
{

DWORD dwRead;
InternetReadFile( hFile, buffer, 100, &dwRead );
} 
InternetCloseHandle( hFile );

InternetCloseHandle( hINet );
printf("WAN IP:");


	while ((buffer[i] != 0x3C) && (i < sizeof(buffer)))
	{
  printf("%c",buffer[i]);
  i++;
	}

printf("\n");

return;
}


include wininet.lib


code may be unproffessional but it works..i'm still learning. binary version attached.

Attached File(s)

  • Attached File  wanip.rar (2.47K)
    Number of downloads: 52

0

#13 User is offline   ninar12

  • Private First Class
  • Icon
Group:
Members
Posts:
143
Joined:
07-September 04

Posted 14 April 2005 - 02:44 PM

i have an .exe coded in vb.net

that can resolve ur external ip
its an simple exe
if u start it a popup gets up (withg ur ip)
and then it copys the ip into the clipboard

if u want it gimme a pm
im atm at a lan party and upload is blocked curiosly

greetz ninar
0

#14 User is offline   Gelu

  • Private First Class
  • Icon
Group:
Members
Posts:
47
Joined:
25-September 04

Posted 18 April 2005 - 03:51 PM

Why are all of u thinking so difficult ? Just set a nc listner "nc -vvlp urport" and telnet to urself, and that way u see what IP is connecting. And even if that is too much work u can als just type netstat -a what connections u all have.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users