Something I whipped up a while ago in about an hour (most of which was just trying to figure out how to set POST queries for geobyte's site. I eventually cheated and just used lynx to see what was being submitted )
This script will take an IP or hostname and look up their location data from anti-online.com or geobytes.com. Keep in mind, both sites impose a quota/usage limit..
If anyone knows of a *good* IP-Locator site that does not impose such a limit, let me know (I looked at quite a few other sites, and they either did not meet my needs, did not accept a hostname ((yes I know I could do the hostname lookup myself first..but I'm lazy )) or their data was so wildly inaccurate as to be all but useless..) So, the emphasis is on *good* IP-Locator
whois is one source that the databases use, but it's not always indicative of actual location. The IP location websites use a few different sources of data (of course, there's no way to obtain "100%" accuracy.)
right, but continuous use of their resources in an automated fashion will eventually get you banned; these guys sell their stuff and will hardly tolerate leechers
on the other hand, WHOIS servers like that of ARIN and regional authorities don't impose usage limits, while still providing most of the information you get from (demo versions of) commercial "IP locator" services
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use
First of all, I have not abused their websites. I've used the script myself perhaps half dozen times over the last 2 months. Second, if you don't like the script, don't use it.
I use a very well written IP checking script (ipcheck by arfer) that accesses the very free www.dnsstuff.com for varying information.
Named to PCMag.com Top 100 Sites for 2005, Computing Category. This site has many DNS, networking, and domain registration tools for network administrators, domain owners, users of hosted DNS services, etc. There is no cost for using this site. You are free to link to this site.
No (apparent) fear of being banned &c.
rosc2112: I think demond's point is that your script could cause a problem for a user (you only used it a few times) if made freely available to users in a busy channel. The script I use is also used in a busy DALnet channel and it is triggered almost every 10 minutes (or less).
Add [SOLVED] to the thread title if your issue has been. Search | FAQ | RTM
I appreciate that, and thank you for the other script Alchera, I'll check it out. The script I made does handle when the server gives you the "exceeded quota" message, and there's a note in the script about there being a use-quota, so it's up to the script user to restrict the bind for ops only, if they want, or the users will prolly quickly use up the the allowance. I'd thought about using dnstuff's site as well, but being lazy...
If ipcheck does what I need, I'll prolly use that instead (or addition) to mine.
Edit:
The error you received generally indicates that the script was not able to connect to the website(s), but there should have been an error returned by the script, not just a tcl error about var "page" not being defined. You can add
set page ""
before the lines with
catch {set page
and/or check the content of the $error variable by putting
putcmdlog "error $error"
after the "catch {set page" lines.
I suppose there is an error condition that I'm not aware of and did not test for. But since my copy of the script does not produce the error, I cannot debug it for you without further details.
Just a note about that ipcheck script Alchera mentioned, it does not close the socket when it's finished pulling data. I sent a note to the author about it. Also suggested grabbing whois data for nick lookups, since getchanhost doesn't play well with servers that have +x modes (does not recognize when a user sets mode -x to reveal ip, unless user parts/rejoins)
Other than that it looked pretty good =)
The script has been fixed and uploaded (link as posted earlier).
As for users that set mode +/-x on those bloated networks; that is the intention: Stop any user from gleaning any information about their host, only an IRCOp can see the real host of a user with mode +x.
Add [SOLVED] to the thread title if your issue has been. Search | FAQ | RTM
[getchanhost] is an eggdrop command isn't it? I'd already mentioned if the user parts/joins the channel, [getchanhost] then recognizes the fact that the ip is now revealed. Might help if you'd read the posts rather than just criticize.