|
|
|
|
![]() ![]() |
May 16 2005, 10:28 PM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 1 Joined: 16-May 05 Member No.: 5,124 |
If your behind a router , and like me too lazy to open a browser and find a site that displays your ip , heres a simple Bash script (Bash is a shell in linux, main shell in Slackware Linux)
Open a text editor , copy and paste the following: CODE #! /bin/bash exip=`lynx -dump http://www.whatismyip.com | head -n 2` echo "$exip" Save the txt ( for the sake of agrument we will refer the file as ip.sh) From console type: chmod a+x ip.sh Now run the script like so: ./ip.sh (which will display something like the following) Your IP Is XX.XXX.XXX.XX Done! I will explain what we just did in the script. !# /bin/bash <- Tells what shell we using, this line is always here but /bin/bash may be changed, depending on your system exip=`lynx -dump http://www.whatismyip.com | head -n 2` <- We setup a variable and run some console commands, lynx is a txt mode browser the we send it to head, which takes only the first to lines. echo "$exip" <- We echo the content of exip variable to screen chmoding to a+x just makes the file executable.. I know there a billion ways to do this, but it gets job done ... |
|
|
|
May 27 2005, 08:17 AM
Post
#2
|
|
|
Demonic Enforcer Group: [HOSTED] Posts: 597 Joined: 2-March 05 From: Belgium Member No.: 2,861 |
You could/should also include links instead of lynx. Usually links is installed, for lynx you have to select individual packages, which not everyone does. (I do but that's not the point
In any way, Links looks better than lynx. And the speed of both is the same It's not a very long tutorial but it's nice. |
|
|
|
May 27 2005, 08:39 AM
Post
#3
|
|
|
Advanced Member Group: Members Posts: 140 Joined: 24-April 05 From: Australia Member No.: 4,289 |
Nice tutorial.. Though my IP changes every once in a while and I've never had to know it for anything. But if we ever get stuck in linux and need to know ..
|
|
|
|
May 27 2005, 08:14 PM
Post
#4
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 27 Joined: 22-May 05 Member No.: 5,334 |
lol nice tuturial. I would use it but, my ip stays the same. Been the same ip for like over 1 year. Maybe i should reset my ip.
|
|
|
|
Sep 2 2005, 06:42 AM
Post
#5
|
|
|
Member [ Level 2 ] Group: Members Posts: 72 Joined: 1-September 05 Member No.: 8,237 |
nice script..I find it usefull.. good work!
|
|
|
|
Dec 11 2007, 04:35 AM
Post
#6
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 14 Joined: 11-December 07 Member No.: 26,812 |
Does this display my ip address or the person who is looking at the script's ip address, or does it show everyone my ip address
|
|
|
|
Dec 11 2007, 01:18 PM
Post
#7
|
|
|
Premium Member Group: Members Posts: 422 Joined: 29-September 06 Member No.: 16,228 |
Bash is non-windows Command Prompt.
Nice idea, I'm surprised it works. |
|
|
|
Dec 11 2007, 05:13 PM
Post
#8
|
|
|
Premium Member Group: [HOSTED] Posts: 393 Joined: 9-March 07 From: Tucson, AZ Member No.: 20,794 |
You could/should also include links instead of lynx. Usually links is installed, for lynx you have to select individual packages, which not everyone does. (I do but that's not the point In any way, Links looks better than lynx. And the speed of both is the same It's not a very long tutorial but it's nice. Why lynx? wget is more common on unix based default installs these days than lynx or links or elinks (or any other text browser for that matter). |
|
|
|
Apr 21 2008, 02:10 PM
Post
#9
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
Null password at Freewebs
Bash Script To Display Your Ip I accidentally pressed Enter key without assigning a new password in my freewebs.Com site. Now they say my password is "null". Any help available to recover my site? -reply by Cherian |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 7th July 2008 - 02:03 AM |