UBB.Dev
Posted By: Digital Paul IP Display Upgrade [easy hack][finished] - 03/14/2000 6:27 PM
Difficulty = NONE
Rating = Gets the job done!
what it does =
The display IP page does only that Displays IP, this hack as simple as it may be now displays IP and HOST!
files to be modified = postings.cgi

find:
if ($ThisIP eq "") {
&StandardHTML("Sorry, we could not find a record for that post. Perhaps someone recently deleted it.");
exit;
}

and right after it add:
$ThisDomain = gethostbyaddr(inet_aton($ThisIP), AF_INET);


then find:
$ThisIP

and replace it with:
$ThisIP $ThisDomain


You should now get the hostname diplayed as well as the IP address. This has been tested fine on version's UPTO 5.43b not 5.44.

enjoy, it

Digital Paul Out~
Paul-

Thanks for the hack [Linked Image] Simple yet effective and a nice admin feature to have.

BTW, works fine on 5.44 as well.

-Chris

------------------
Chris Schreiber
[email protected]
Fast 4GL Systems, Inc.
http://www.fast4gl.com/
UBB: http://www.progresstalk.com/
thanks dude,
i cant be bothered to upgrade to the latest version, even with beyond compare, i have just gotten youst to the cgi layout of the script and bits are all over the place! in the new one!

Glad it works for all!

my saying is if it aint broke dont fix it!
Posted By: cal Re: IP Display Upgrade [easy hack][finished] - 03/14/2000 9:52 PM
Nice hack

Just a thought [Linked Image]
Posted By: Mutt Re: IP Display Upgrade [easy hack][finished] - 03/16/2000 2:22 AM
I like it, make it do more!

quick easy and an improvement
Thanx!
Posted By: ilya Re: IP Display Upgrade [easy hack][finished] - 03/16/2000 2:53 AM
Nice hack indeed! [Linked Image]
what else would you like to see??

i made this quite a while ago, but never thought of making it display more???

ideas anyone?



------------------
Email : [email protected]
Website : Not ready yet
Ubb : http://duw.virtualave.net/cgi-bin/Ultimate.cgi
Great Job I love it

------------------
Please Join My UBB
We are now accepting Moderators!!
Nice Hack DU.

Just thought I'd do a little "Spring Cleaning" on this hack:


find:
Code
code:

And replace it with:
Code
code:

This'll show who's IP and Hostname you're looking at.

Then, find:
Code
code:

And directly under it add:
Code
code:

Then, find:
Code
code:

and delete that..

It'll just show the IP and Hostname of that person.

It looks a lot better for me this way.
Posted By: cal Re: IP Display Upgrade [easy hack][finished] - 03/25/2000 12:53 PM
Tidier!

Just a thought [Linked Image]
you have it, looks much better, i was admittidly very lazy on this hack, lol!

very tidy!
Okay. I've got a little problem with this hack. For some of my members it will only log an IP, and not the hostname.

Why is that?

I mean, it will work fine for some and log both IP and hostname, but only the IP on the other members. Is this a problem with the hack or is it a problem with the persons ISP? Or is it even a problem at all?


Later
Oddkick-

This is normal, not all IP address can be resolved to a hostname.

HTH.

-Chris

------------------
Chris Schreiber
[email protected]
Fast 4GL Systems, Inc.
UBB: http://www.progresstalk.com/
Heh... sorry. I'm sorta new to this.

How does an IP get resolved to a hostname??
Posted By: cal Re: IP Display Upgrade [easy hack][finished] - 03/29/2000 11:02 AM
It actually happens the other way round (Usually). Anyway, it's the client's browser which sends (or doesn't) the two pieces of information. Many machines don't have a hostname, or will give their IP.

Just a thought [Linked Image]
Posted By: The Team Re: IP Display Upgrade [easy hack][finished] - 04/15/2000 2:05 AM
Does anyone have an example of this hack in action because I can't seem to get it to show up on mine (5.39c)
Posted By: The Team Re: IP Display Upgrade [easy hack][finished] - 04/22/2000 10:06 PM
OOPS!
Posted By: Lisa Re: IP Display Upgrade [easy hack][finished] - 04/26/2000 9:44 PM
Okay, Did this hack Word for word, letter for letter I cannot get it to work. I am using it on 5.44 also. As a matter of fact, all the postings on my test page are gone also. [Linked Image]
I am going to try it on 5.43 and see if it does the same. [Linked Image] Lisa

HELP!!

------------------
In reality our fellow citizen's have not sunk so low as we feared, because
they had never risen so high as we believed. (Freud)
Posted By: The Team Re: IP Display Upgrade [easy hack][finished] - 05/07/2000 12:19 PM
I just installed this hack flawlessly in version 5.45c. Since I can get real snoopy about the troublemakers on my Board and their alter egos, I use this feature a lot... this hack was a welcome addition, as it gives me even more info than before. Many thanks to Digital Paul for this, installing it made me feel like I actually knew what I was doing (after my last four failed hack attempts). So I had a little "quirk" with the fact that, when both of the above modifications are added, you lose the Post info (it's more of a reminder than annoying to me), and the Hostname displays both after the IP in the first row, but also in its own second row. Below is what I have modified and added to my board to give you the name of the Member whose IP you requested at the the top of the page, the IP alone (without the Host Name after it), the Host Name in a separate row below the IP, and the Post info (with info on how to remove the post info if you wish). It also adds a colon after the IP and Host "row titles", cuz I'm anal like that. [Linked Image]

Either way, you can use your particular preference to flawlessly apply this hack using the code below.


In postings.cgi:

(This will add the command that determines the host name, this is a necessary step)

Find:
Code
code:

And on a new line directly underneath the last }, add:
Code
code:

(This step adds the User Name associated with the requested IP and Hostname to the top of the IP page)

Now Find:
Code
code:

And replace it with:
Code
code:

(This will add a colon after "IP Number", this step is not necessary if you don't care, I did though [Linked Image])

Find:
Code
code:

And replace it with:
Code
code:

(If you added the colon as listed above, this will add a second row beneath the IP number display to show the Hostname WITH a colon)
(If you didn't add the colon as listed above, skip this step and use the next one)

Find:
Code
code:

And on a new line, directly underneath it, add:
Code
code:

(If you didn't add the colon as listed above, this will add a second row beneath the IP number display to show the Hostname WITHOUT a colon)
(If you DID add the colon as listed two steps above, ignore this step and use the step directly above this one, if you've already done the step above, skip this step)

Find:
Code
code:

And on a new line, directly underneath it, add:
Code
code:

(If you want to remove the body of the post underneath the IP and Hostname, follow this next step - if not, skip to the next step)

Find:
Code
code:

And delete it.

There isn't a next step. You're finished. Backup your original postings.cgi and upload the file to your UBB cgi folder in ASCII format. Make sure you set the CHMOD to 755, and you're all set. You don't need to update threads or anything else, just click on the IP link, authenticate yourself and enjoy!

Again, thanks to Digital Paul for this cool little hack. This should be added to the "Additions" database.
Posted By: Squall14 Re: IP Display Upgrade [easy hack][finished] - 05/07/2000 6:14 PM
I get a "Staff Use Only" beside the IP icon...
how to remove that text?

------------------
Squall14
Posted By: The Team Re: IP Display Upgrade [easy hack][finished] - 05/09/2000 6:02 AM
I don't think you got that from using the code above, I think that's part of a Custom Layout hack or something. 'Course, who am I to guess, I know jack [censored] compared to most folks here. [Linked Image]
© UBB.Developers