<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/13294" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2007-03-28T17:12:55-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/13294</id>

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-28T17:12:55-04:00</updated>

		<published>2007-03-28T17:12:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71668#p71668</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71668#p71668"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71668#p71668"><![CDATA[
Looks like my suspicion about the dots in the ip being converted into %2e is the problem then..  I can use the socket code to send the literal chars I suppose, but I can't do any more testing today, I found out that the site has a 20 query per day limit (which I added a test condition for, so it'll say when the limit's been reached..)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Mar 28, 2007 5:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-28T16:01:13-04:00</updated>

		<published>2007-03-28T16:01:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71667#p71667</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71667#p71667"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71667#p71667"><![CDATA[
Making a webservice depend on keepalive does'nt sound like a viable solution, but then again I'm not developing that ip-adress service.<br><br>As for the queries submitted, did some digging with ethereal, and the urlencoded data looked like this (for bogus ip 123.456.789.0)<div class="codebox"><p>Code: </p><pre><code>iq=123.456.789.0&amp;submit=lookup+any+ip</code></pre></div> with a content-type of "application/x-www-form-urlencoded". Nothing else fancy in the headers (tested using Firefox).<br><br>My suggestion was which you've already tried. Sorry I missed your note on not being state persistent either.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Mar 28, 2007 4:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-28T15:24:13-04:00</updated>

		<published>2007-03-28T15:24:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71666#p71666</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71666#p71666"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71666#p71666"><![CDATA[
I'm not sure I know how to do that, can you explain?<br><br>I had tried loading the page twice basically, once as a normal geturl, then as a query, but same result, it gives me my own address info, not the query's.<br><br>The other idea I had would be to use the socket code which would keep the connection open for get'ing the page, then sending the query.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Mar 28, 2007 3:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-03-28T08:32:57-04:00</updated>

		<published>2007-03-28T08:32:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71661#p71661</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71661#p71661"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71661#p71661"><![CDATA[
What if you make your script first load the form? (in case they use some server-side session tracking)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Mar 28, 2007 8:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-28T05:02:37-04:00</updated>

		<published>2007-03-28T05:02:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71657#p71657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71657#p71657"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71657#p71657"><![CDATA[
Ok, I tried this for hours, trying to figure out why it's only returning MY address, despite what the query is asking for, but it seems like the only way the form works is if you actually submit it from the webpage, which doesn't make sense to me, because the query string used by the bot is exactly the same..  <br><div class="codebox"><p>Code: </p><pre><code>proc ipadrlocate {nick chan text} {        set ipadrurl "http://www.ip-adress.com/"        set page "";set ipcountry "";set ipstate "";set ipcity "";set iplat ""        set iplong "";set ipisp "";set iporg ""        set ipspeed "";set ipadrtemp "";set html ""        set ipadrquery [::http::formatQuery iq "[join $text]" submit "lookup any ip"]        catch {set page [::http::geturl $ipadrurl -timeout $::ipltout -query $ipadrquery]} error        putcmdlog "text '$text'  query '$ipadrquery'"        if {[string match -nocase "*couldn't open socket*" $error]} {                puthelp "PRIVMSG $chan :Error: Couldn't connect to IP-Adress.com..Try again later"                ::http::cleanup $page                return        }        if {[::http::status $page] == "timeout"} {                puthelp "PRIVMSG $chan :Error: Connection to IP-Adress.com timed out."                ::http::cleanup $page                return        }        set html [::http::data $page]        ::http::cleanup $page# this regexp is word-wrapped  if {[regexp {&gt;My ip address:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;IPcountry:&lt;/font&gt;.*?&lt;img src="/flags/.*?png"&gt;(.*?)&lt;/font&gt;.*?&gt;IP.*?Addressstate:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;IP.*?Addresscity:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;IPlatitude:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;IP  longitude:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;isp:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;organization:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;.*?&gt;yourspeed:&lt;/font&gt;.*?&lt;font.*?&gt;(.*?)&lt;/font&gt;} $html match ipcountry ipstate ipcityiplat iplong ipisp iporg ipspeed]} {# other formatting junk deleted for brevity}</code></pre></div>The other procs I use for the binds and for resolving hostnames to ip's has been omitted for brevity.<br><br>If anyone can shed some light as to why the form on ip-adress.com won't accept the query from the bot, that would be appreciated. <br><br>Otherwise, the script would be working, I have everything else working, the regexp works, and I have the output formatted and all, I just can't figure out why every query is returning my address info (the default when you 1st load the page.)<br><br>I've run a bunch of tests from lynx, but the result is the same. It's like ip-adress.com won't accept any query unless it's sent directly from the page's submit button.. It's not cookies or java, cos I have that disabled in lynx.. There's no persistent state either, so it's not that. I did a trace log from lynx to check the actual query string being sent and I have that right too, afaict..  As far as I can tell, the above should work but...  I thought it might've been the urlencoding, so I changed that as well, made no diff. <br><br>The only vague guess I have: the problem may be when the formatQuery turns the dots in the ip into %2e which is what it's supposed to do, and presumably it's what all browsers do when a query is sent. If that is indeed the problem, I see no way around it, as formatQuery doesn't provide any way of sending literal chars, that I know of.<br><br>BTW, I don't think ip-adress.com's db is all that special, compared to the other 3 I already use in the script. It places my IP far from where I am actually located, where the other 3 place it much closer (anti-online places it at the nearest CO; the other 2 get the NOC; ip-adress, I have no idea where it's getting it's data..)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Mar 28, 2007 5:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[popolare]]></name></author>
		<updated>2007-03-27T22:57:52-04:00</updated>

		<published>2007-03-27T22:57:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71655#p71655</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71655#p71655"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71655#p71655"><![CDATA[
<blockquote class="uncited"><div>I don't see any ip lookup on that site, it just looks like a parked website..  Give me the url for the actual up lookup and I'll add it to the script.</div></blockquote>Sorry, i spelled url incorrectly.<br>The correct url is <a href="http://www.ip-adress.com" class="postlink">http://www.ip-adress.com</a> and the form is in homepage.<br><br>Thank you very much.<br><br>P.S.: Your script iplocator.tcl works like a charm!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8850">popolare</a> — Tue Mar 27, 2007 10:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-27T21:01:56-04:00</updated>

		<published>2007-03-27T21:01:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71654#p71654</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71654#p71654"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71654#p71654"><![CDATA[
I don't see any ip lookup on that site, it just looks like a parked website..  Give me the url for the actual up lookup and I'll add it to the script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Mar 27, 2007 9:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[popolare]]></name></author>
		<updated>2007-03-27T08:24:24-04:00</updated>

		<published>2007-03-27T08:24:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71636#p71636</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71636#p71636"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71636#p71636"><![CDATA[
<blockquote class="uncited"><div>Actually, now that I looked at the code poopalare posted, that IS my script, butchered and minus credit.</div></blockquote>Hello rosc2112,<br><br>it's just extract from your script.<br>It works fine with antonline, geoip, dnsstuff.<br><br>What I need is to make it work with ip-address .com (this is not spam, even if the aren't geolocation service they have very fresh and precise database)<br><br>Anyone still can help me?<br><br>They are using POST method of form (but geoip uses it too in your iplocator.tcl) just regexp must be adapted...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8850">popolare</a> — Tue Mar 27, 2007 8:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-03-26T20:23:57-04:00</updated>

		<published>2007-03-26T20:23:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71630#p71630</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71630#p71630"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71630#p71630"><![CDATA[
<blockquote class="uncited"><div>I'm already using this script but it doesn't have results from example.com </div></blockquote>Apparently the user doesn't like it rosc2112. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Mar 26, 2007 8:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-26T05:52:58-04:00</updated>

		<published>2007-03-26T05:52:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71613#p71613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71613#p71613"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71613#p71613"><![CDATA[
Actually, now that I looked at the code poopalare posted, that IS my script, butchered and minus credit.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Mar 26, 2007 5:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-26T05:43:41-04:00</updated>

		<published>2007-03-26T05:43:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71612#p71612</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71612#p71612"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71612#p71612"><![CDATA[
Also <a href="http://members.dandy.net/~fbn/iplocator.tcl.txt" class="postlink">http://members.dandy.net/~fbn/iplocator.tcl.txt</a><br>Uses antonline, geobytes and DNS-Stuff's ip geolocation pages.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Mar 26, 2007 5:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-03-25T20:06:54-04:00</updated>

		<published>2007-03-25T20:06:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71605#p71605</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71605#p71605"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71605#p71605"><![CDATA[
You might be interested in <a href="http://www.ballarat.us/modules.php?name=Downloads&amp;op=getit&amp;lid=28" class="postlink">ipcheck.tcl</a>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Mar 25, 2007 8:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-03-25T20:02:07-04:00</updated>

		<published>2007-03-25T20:02:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71604#p71604</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71604#p71604"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71604#p71604"><![CDATA[
Nobody can help you unless you state what website needs to be accessed instead of "example.com."<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Mar 25, 2007 8:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[popolare]]></name></author>
		<updated>2007-03-25T18:25:14-04:00</updated>

		<published>2007-03-25T18:25:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71600#p71600</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71600#p71600"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71600#p71600"><![CDATA[
<blockquote class="uncited"><div>i aint good at scripting , but perhaps ya can work from <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1381" class="postlink">this</a> script.</div></blockquote>I'm already using this script but it doesn't have results from example.com<br><br>So i need right regexp to catch results from example.com<br>If someone can look please share your suggestions.<br><br>P.S.: JAFO, thanks anyway for script, i'm sure it will be usefull to many users if someone help us to add results from example.com (they have very fresh database with more than 93% accuracy!) to this script..<br><br>Thanks to everyone who will contribuite!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8850">popolare</a> — Sun Mar 25, 2007 6:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JAFO]]></name></author>
		<updated>2007-03-25T16:35:57-04:00</updated>

		<published>2007-03-25T16:35:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71599#p71599</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71599#p71599"/>
		<title type="html"><![CDATA[Get location info from www.example.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71599#p71599"><![CDATA[
i aint good at scripting , but perhaps ya can work from <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1381" class="postlink">this</a> script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6850">JAFO</a> — Sun Mar 25, 2007 4:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
