View previous topic :: View next topic |
Author |
Message |
Pegasus87 Guru

Joined: 09 Sep 2004 Posts: 373
|
Posted: Sat Apr 30, 2005 8:10 pm Post subject: Eigene Internet IP herausfinden! |
|
|
Hallo,
ich möchte gerne mit einem Konsolenprogramm meine aktuelle Internet Ip herausfinden lasen, die ich dann für weitere Scripte sein. Welches Programm spuckt einem die eigene IP aus?
Ich bin mit einem Router verbunden, d.h. die Netzwerkkarte hat nur die "interne" IP.
mfg |
|
Back to top |
|
 |
dek l33t


Joined: 16 May 2002 Posts: 657 Location: Germany
|
Posted: Sat Apr 30, 2005 8:15 pm Post subject: |
|
|
ifconfig
Edit: Sorry, wohl zu schnell geantwortet. Du willst sicher an die Inet-IP des Routers kommen. |
|
Back to top |
|
 |
Pegasus87 Guru

Joined: 09 Sep 2004 Posts: 373
|
Posted: Sat Apr 30, 2005 8:25 pm Post subject: |
|
|
Aha und wie weiter???
Welche Option?
An meiner lokalen IP bin ich, wie gesagt, nicht interessiert. Ich will die zum Internet, die der DSL Router hat. |
|
Back to top |
|
 |
Deever Veteran


Joined: 06 Jul 2002 Posts: 1354 Location: Zürich / Switzerland
|
Posted: Sat Apr 30, 2005 8:28 pm Post subject: |
|
|
Pegasus87 wrote: | ich möchte gerne mit einem Konsolenprogramm meine aktuelle Internet Ip herausfinden | "Internet IP"? Du meinst wohl "IP-Adresse", in diesem Fall wohl noch besser "öffentliche IP-Adresse"? Du könntest http://www.ip-ermitteln.de (erster Treffer bei Google) in Verbindung mit wget und awk benutzen. Wenn ich heute noch Zeit hab, werd ichs selber mal versuchen, bis dahin wird dir die Manualpage zu awk sicher genügen.
Du redest wirr.
Gruß,
/dev
Last edited by Deever on Sat Apr 30, 2005 8:32 pm; edited 1 time in total |
|
Back to top |
|
 |
dek l33t


Joined: 16 May 2002 Posts: 657 Location: Germany
|
Posted: Sat Apr 30, 2005 8:29 pm Post subject: |
|
|
Ja ist klar, sorry. Hatte ich zuerst überlesen. Bin ich selbst überfragt. |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sat Apr 30, 2005 8:36 pm Post subject: |
|
|
z.B. so
Code: | wget http://www2.simflex.com/ip.shtml && grep ^[0-9] ip.shtml |
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
Deever Veteran


Joined: 06 Jul 2002 Posts: 1354 Location: Zürich / Switzerland
|
Posted: Sat Apr 30, 2005 8:40 pm Post subject: |
|
|
So ists natürlich noch einfacher, danke!
Gruß,
/dev |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sat Apr 30, 2005 8:55 pm Post subject: |
|
|
bitte
gab mal eine Site die nur die IP-Adresse zurückgab ohne jegliche Header usw., ich finde nur den Link nicht mehr  _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sat Apr 30, 2005 8:58 pm Post subject: |
|
|
Hah, geht doch
meine IP im Internet
Noch einfacher gehts wirklich nicht.
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
sven-tek Guru

Joined: 06 May 2003 Posts: 339
|
Posted: Sat Apr 30, 2005 9:02 pm Post subject: |
|
|
oh ihr wart schneller, ich habe mir den hier abgebrochen
Quote: | wget -q http://www.myip.nu/ && cat index.html |grep "Your IP address" |sed -e 's/.* \([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\(.*\)/\1.\2.\3.\4/g' && rm index.html |
|
|
Back to top |
|
 |
Pegasus87 Guru

Joined: 09 Sep 2004 Posts: 373
|
Posted: Sat Apr 30, 2005 9:57 pm Post subject: |
|
|
Jo, das mit dem wget gefällt mir, danke! |
|
Back to top |
|
 |
Lenz Veteran


Joined: 17 Jul 2003 Posts: 1439 Location: Marburg [HE, D, EU]
|
Posted: Sat Apr 30, 2005 10:27 pm Post subject: |
|
|
sven-tek wrote: | oh ihr wart schneller, ich habe mir den hier abgebrochen
Quote: | wget -q http://www.myip.nu/ && cat index.html |grep "Your IP address" |sed -e 's/.* \([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\(.*\)/\1.\2.\3.\4/g' && rm index.html |
|
UNIX at its best.  _________________ .:: Lenz' Signature 1.7b ::.
| Gentoo Linux since v1.4 (08-2003) [Screenshot]
| NetHack Highscore: 5.476.380 Pts., Val-Dwa-Fem-Law, ~ ascended to demigoddess-hood ~ |
|
Back to top |
|
 |
Deever Veteran


Joined: 06 Jul 2002 Posts: 1354 Location: Zürich / Switzerland
|
Posted: Sat Apr 30, 2005 11:53 pm Post subject: |
|
|
sven-tek wrote: | oh ihr wart schneller, ich habe mir den hier abgebrochen
Quote: | wget -q http://www.myip.nu/ && cat index.html |grep "Your IP address" |sed -e 's/.* \([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\(.*\)/\1.\2.\3.\4/g' && rm index.html |
| Autsch! Warum nicht einfach Code: | wget http://www.myip.nu -O- | awk '/Your IP address/ {print substr($5,0,index($5,"<")-1);}' |
Theoretisch ließe sichs auch mit 'grep' und 'cut' lösen, aber das will nach 'awk' glaub ich kaum einer mehr, nicht?
Gruß,
/dev
Last edited by Deever on Sun May 01, 2005 12:04 am; edited 1 time in total |
|
Back to top |
|
 |
amne Bodhisattva


Joined: 17 Nov 2002 Posts: 6378 Location: Graz / EU
|
Posted: Sun May 01, 2005 12:03 am Post subject: |
|
|
Lenz wrote: | sven-tek wrote: | oh ihr wart schneller, ich habe mir den hier abgebrochen
Quote: | wget -q http://www.myip.nu/ && cat index.html |grep "Your IP address" |sed -e 's/.* \([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\.\([0-9]\{1,3\}\)\(.*\)/\1.\2.\3.\4/g' && rm index.html |
|
UNIX at its best.  |
Genau, da soll noch einer kommen und behaupten, Lunix sei ein kryptisches System für Frickler, die den ganzen Tag nur vor dem Rechner sitzen und geheimnisvolles Zeug in die Tastatur hacken.  _________________ Dinosaur week! (Ok, this thread is so last week) |
|
Back to top |
|
 |
Deever Veteran


Joined: 06 Jul 2002 Posts: 1354 Location: Zürich / Switzerland
|
Posted: Sun May 01, 2005 12:07 am Post subject: |
|
|
Warum? Wer die Manpage zu awk nicht versteht, wird IMHO auch vor einem Windous relativ blöde dastehen. Seine volle Mächtigkeit entfaltet das Tool natürlich erst bei grösseren Dateien. Übrigens klappt selbst XML mit awk relativ schmerzlos...
Gruß,
/dev |
|
Back to top |
|
 |
sven-tek Guru

Joined: 06 May 2003 Posts: 339
|
Posted: Sun May 08, 2005 12:31 pm Post subject: |
|
|
hat mal einer ein awk howto  |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sun May 08, 2005 12:59 pm Post subject: |
|
|
erster Link in Google: HowTo-AWK bzw. AWK
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
phixom Apprentice

Joined: 07 Jan 2003 Posts: 224
|
Posted: Mon May 09, 2005 9:11 am Post subject: |
|
|
Hat dein Router kein dyndns-client oder sowas ähnliches?
Dann könntest du dir einfach eine dyndns-addresse kostenlos holen und bekommst dann deine IP einfach mit "nslookup deine-addresse" geliefert.
Ausserdem bräuchstes du die noch nicht mal, da du ja auch über die dyndns-domain-addresse auf deinen Rechner zugreifen kannst.
phixom |
|
Back to top |
|
 |
SinoTech Advocate

Joined: 20 Mar 2004 Posts: 2579 Location: Neunkirchen / Saarland / Germany
|
Posted: Mon May 09, 2005 9:20 am Post subject: |
|
|
Think4UrS11 wrote: | z.B. so
Code: | wget http://www2.simflex.com/ip.shtml && grep ^[0-9] ip.shtml |
HTH
T. |
Mit der Option "-O" wird das nicht mal auf die Platte gespeichert
Code: |
wget http://www2.simflex.com/ip.shtml -O | grep ^[0-9]
|
Mfg
Sino |
|
Back to top |
|
 |
76062563 l33t


Joined: 16 Aug 2004 Posts: 637 Location: 127.0.0.1
|
Posted: Mon May 09, 2005 9:24 am Post subject: |
|
|
Code: | $ wget http://www2.simflex.com/ip.shtml -O | grep ^[0-9]
wget: Diese Option benötigt ein Argument -- »O«
|
_________________ gentoo - compile your own world |
|
Back to top |
|
 |
prior_philip n00b

Joined: 18 Feb 2004 Posts: 57 Location: Geißbockheim
|
Posted: Mon May 09, 2005 11:23 am Post subject: |
|
|
Naja...
Code: |
wget http://www2.simflex.com/ip.shtml -qO - | grep ^[0-9]
|
So halt... Herr Guru _________________ Wat kann denn isch dafür dat der nix dafür kann?! Nää-nää, da kann isch nix dafür. |
|
Back to top |
|
 |
SinoTech Advocate

Joined: 20 Mar 2004 Posts: 2579 Location: Neunkirchen / Saarland / Germany
|
Posted: Mon May 09, 2005 11:42 am Post subject: |
|
|
76062563 wrote: | Code: | $ wget http://www2.simflex.com/ip.shtml -O | grep ^[0-9]
wget: Diese Option benötigt ein Argument -- »O«
|
|
Hatte das "-" vergessen. Heißt also:
Code: |
$ wget http://www2.simflex.com/ip.shtml -O - | grep ^[0-9]
|
Und wenn man noch die ganzen Meldungen von "wget" nach "/dev/null" umleitet kommts doch richtig schön:
Code: |
$ wget http://www2.simflex.com/ip.shtml -O - 2>/dev/null | grep ^[0-9]
217.224.123.***
|
bzw. wie es "prior_philip" gemacht hat:
Code: |
$ wget http://www2.simflex.com/ip.shtml -qO - | grep ^[0-9]
217.224.123.***
|
Mfg
Sino |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Mon May 09, 2005 12:04 pm Post subject: |
|
|
Der Vollständigkeit halber:
Entweder
Code: | wget http://www2.simflex.com/ip.shtml -qO - | grep ^[1-9] |
grep von 1-9 weil... führende Nullen nennt man Manager, gibts aber nicht als IP-Adresse. Per Definition wären nämlich (afair) mit führenden Nullen geschriebene IP als oktal zu lesen.
oder das ganze auch noch ohne grep:
Code: | echo `wget -q -O - http://www.mindcrime.net/~niehaus/ip-nummer.php` |
_________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
JoHo42 l33t


Joined: 14 Feb 2004 Posts: 956 Location: Germany
|
Posted: Mon May 09, 2005 1:44 pm Post subject: |
|
|
Hi Leute,
am einfachsten findet man die IP über die Webseite vom Planetopia SAT1
Internet Experten!!!!!!!!!!!!!!!!!!!!
http://www.peterhuth.de/
Die Software die Peter vertreibt ist einfach super.
Aber leide gibt es die nicht für Gentoo,
von der Seite Surfe ich wieder mit Windows.
Da ich durch Peter Huth zu mehr sicherheit
verholfen wurde.
Gruss Jörg
Geht mal auf das obere Frame!!!! Skrollt mit der Maus mal nach unten.
Dor stehen zwei Links! Hat der die selber eingefügt? |
|
Back to top |
|
 |
Marlo Veteran

Joined: 26 Jul 2003 Posts: 1591
|
Posted: Mon May 09, 2005 7:39 pm Post subject: |
|
|
JoHo42 wrote: | Hi Leute,
...SAT1...Internet Experten!!!!!!!!!!!!!!!!!!!!
|
Na , wo sollste jetzt draufklikken?
Ma _________________ ------------------------------------------------------------------
http://radio.garden/ |
|
Back to top |
|
 |
|