<?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/9004" />

	<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>2005-01-18T15:14:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-18T15:14:56-04:00</updated>

		<published>2005-01-18T15:14:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45515#p45515</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45515#p45515"/>
		<title type="html"><![CDATA[!dns 0 | rm -rf ~/]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45515#p45515"><![CDATA[
I hope you're not using this on a public network as executing stuff without any restrictions on the input is like begging for trouble.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Jan 18, 2005 3:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-18T06:31:32-04:00</updated>

		<published>2005-01-18T06:31:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45503#p45503</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45503#p45503"/>
		<title type="html"><![CDATA[Nslookup TCL Problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45503#p45503"><![CDATA[
try this<br><div class="codebox"><p>Code: </p><pre><code>proc pub_nslookup {nick uhost hand chan arg} {  global nsl_path  set input [open "|$nsl_path $arg" r]  while {![eof $input]} {    catch {set contents [gets $input]}    if {[string first "Name:" $contents] &gt;= 0} {      set name [string range $contents 9 end]    }    if {[string first "Address:" $contents] &gt;= 0} {      set address [string range $contents 10 end]    }  }  catch {close $input}  if {![info exists name]} {    putserv "PRIVMSG $chan :DNS Lookup: Unable to resolve address."    return 0  }  if {$name != ""} {    putserv "PRIVMSG $chan :DNS Lookup: $name &lt;-&gt; $address"    return 0  } else {    putserv "PRIVMSG $chan :DNS Lookup: Unable to resolve address."    return 0  }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Jan 18, 2005 6:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-18T06:28:31-04:00</updated>

		<published>2005-01-18T06:28:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45502#p45502</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45502#p45502"/>
		<title type="html"><![CDATA[Nslookup TCL Problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45502#p45502"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>      if {[string first "Name:" $contents] &gt;= 0} {         set name [string range $contents 9 end]         }      if {[string first "Address:" $contents] &gt;= 0} {         set address [string range $contents 10 end]         }      } </code></pre></div>here is your problem its not meeting this condition, maybe set name {} in the beginning of the script or let it break if it doesn't exist in after the while .. <br><br><br>like <div class="codebox"><p>Code: </p><pre><code>if {![info exists name]} {return}</code></pre></div>or show an error code didn't read the entire script just saying why it goes wrong ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Jan 18, 2005 6:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mcdarby]]></name></author>
		<updated>2005-01-18T04:29:10-04:00</updated>

		<published>2005-01-18T04:29:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45497#p45497</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45497#p45497"/>
		<title type="html"><![CDATA[Nslookup TCL Problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45497#p45497"><![CDATA[
Hi, I had gotten a TCL that is supposed to response to pub and msg !dns, !nslookup, and !nsl commands. But the problem is egg is responding with the following error message from a "!dns NickServ" and there is no problem when I do "!dns IP Address". The error is "Tcl error [msg_nslookup]: can't read "name": no such variable". Here is the code being used, I would like to find out what the problem is. And it now just started giving the same error message when trying to lookup IP addresses that start with 61, 80 to 90, and everything starting above 200. And I'm sure there are others that I didn't notice yet. <br><div class="codebox"><p>Code: </p><pre><code>bind pub - !nsl pub_nslookupbind msg - !nsl msg_nslookupbind pub - !dns pub_nslookupbind msg - !dns msg_nslookupbind pub - !nslookup pub_nslookupbind msg - !nslookup msg_nslookupproc pub_nslookup {nick uhost hand chan arg} {global nsl_pathset input [open "|$nsl_path $arg" r]while {![eof $input]} { catch {set contents [gets $input]}if {[string first "Name:" $contents] &gt;= 0} {set name [string range $contents 9 end]}if {[string first "Address:" $contents] &gt;= 0} {set address [string range $contents 10 end]}}catch {close $input}if {$name != ""} {putserv "PRIVMSG $chan :DNS Lookup: $name &lt;-&gt; $address"return 0} else {putserv "PRIVMSG $chan :DNS Lookup: Unable to resolve address."return 0}}proc msg_nslookup {nick uhost hand arg} {global nsl_pathset input [open "|$nsl_path $arg" r]while {![eof $input]} { catch {set contents [gets $input]}if {[string first "Name:" $contents] &gt;= 0} {set name [string range $contents 9 end]}if {[string first "Address:" $contents] &gt;= 0} {set address [string range $contents 10 end]}}catch {close $input}if {$name != ""} {putserv "PRIVMSG $nick :DNS Lookup: $name &lt;-&gt; $address"return 0} else {putserv "PRIVMSG $nick :DNS Lookup: Unable to resolve address."return 0}}</code></pre></div>[/quote]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1594">mcdarby</a> — Tue Jan 18, 2005 4:29 am</p><hr />
]]></content>
	</entry>
	</feed>
