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

	<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>2013-02-21T10:41:14-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-02-21T10:41:14-04:00</updated>

		<published>2013-02-21T10:41:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101082#p101082</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101082#p101082"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101082#p101082"><![CDATA[
There's no need to quote the previous post if you intend to reply to that, and second, nmap dose exactly the same thing, except it already has a predefined list of ports to check so you just have to feed it with an IP address.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Feb 21, 2013 10:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mimizu]]></name></author>
		<updated>2013-02-21T02:45:47-04:00</updated>

		<published>2013-02-21T02:45:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101070#p101070</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101070#p101070"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101070#p101070"><![CDATA[
check port 1 by 1 x_x<br><br>nmap check all open and close port.... ^^<br><br>CMIWW<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12198">mimizu</a> — Thu Feb 21, 2013 2:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-02-21T02:09:59-04:00</updated>

		<published>2013-02-21T02:09:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101069#p101069</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101069#p101069"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101069#p101069"><![CDATA[
It's caesar damn it, also notice the lowercase <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Someone with bad intentions could compromise the box this is running, not just the bot. If you wish to check if a port is open or not, why not use one of <a href="http://forum.egghelp.org/profile.php?mode=viewprofile&amp;u=2878" class="postlink">user</a>'s scripts like <a href="http://forum.egghelp.org/viewtopic.php?p=82212" class="postlink">socket api - nonblocking tcp made easy</a>?<br><br>Or, if you wish to insist on using nmap, if there are certain arguments an user would use anyway why not add this modes inside the function and request user only for a valid IP adress? There are a few examples on <a href="http://wiki.tcl.tk/989" class="postlink">Regular Expression Examples</a> with a <em class="text-italics">regexp</em> or <em class="text-italics">scan</em> to do this IP validation.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Feb 21, 2013 2:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mimizu]]></name></author>
		<updated>2013-02-21T01:49:38-04:00</updated>

		<published>2013-02-21T01:49:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101068#p101068</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101068#p101068"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101068#p101068"><![CDATA[
Sir...<br><br>If i use :<div class="codebox"><p>Code: </p><pre><code>bind pub - !nmap port_scanproc port_scan {nick uhost handle chan args} {   global progress   if {[info exists progress]} { putserv "PRIVMSG $chan :nmap in progress please wait to finish.."; return }   putserv "PRIVMSG $chan : Scanning...... $args wait................!!"   set progress 1   set data_var [exec nmap $args]   set l [split $data_var "\r\n"]   foreach i $l { puthelp "PRIVMSG $chan : $i " }   set progress 0   putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"} </code></pre></div>or<div class="codebox"><p>Code: </p><pre><code>bind pub - !nmap port_scanproc port_scan {nick uhost handle chan args} {   global progress      if {$args == ""} { putserv "PRIVMSG $chan :Error. No arguments specified."; return }   if {[info exists progress]} { putserv "PRIVMSG $chan :nmap in progress please wait to finish.."; return }   putserv "PRIVMSG $chan : Scanning...... $args wait................!!"   putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"   set progress 1   set data_var [exec nmap $args]   set l [split $data_var "\r\n"]   foreach i $l { puthelp "PRIVMSG $chan : $i " }   set progress 0 } </code></pre></div>if command !nmap reused, the message:<blockquote class="uncited"><div>nmap in progress please wait to finish..</div></blockquote>when I use:<div class="codebox"><p>Code: </p><pre><code>bind pub - !nmap port_scanproc port_scan {nick uhost handle chan text} {   global progress      if {$text == ""} { putserv "PRIVMSG $chan :Error. No arguments specified."; return }   if {[info exists progress]} { putserv "PRIVMSG $chan :nmap in progress please wait to finish.."; return }   putserv "PRIVMSG $chan : Scanning...... $text wait................!!"   putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"   set progress 1   set data_var [exec nmap $text]   set l [split $data_var "\r\n"]   foreach i $l { puthelp "PRIVMSG $chan : $i " }   unset -nocomplain progress}</code></pre></div>The script can not invoke nmap in linux server.<br><br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12198">mimizu</a> — Thu Feb 21, 2013 1:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mimizu]]></name></author>
		<updated>2013-02-21T00:06:52-04:00</updated>

		<published>2013-02-21T00:06:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101067#p101067</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101067#p101067"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101067#p101067"><![CDATA[
I am trying to master ...<br><br>Wishing success ^ ^<br><br><br><strong class="text-strong">Thank you very much before and after ....</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12198">mimizu</a> — Thu Feb 21, 2013 12:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-20T15:14:13-04:00</updated>

		<published>2013-02-20T15:14:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101066#p101066</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101066#p101066"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101066#p101066"><![CDATA[
Yes your right speachles and caesar.. but i only fixed the "info exists" and $args to $text part.. the part with exec can be fixed by checking $text for specific pattern or by limiting the command with a "bind pub n| !nmap port_scan"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Wed Feb 20, 2013 3:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-02-20T14:52:34-04:00</updated>

		<published>2013-02-20T14:52:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101065#p101065</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101065#p101065"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101065#p101065"><![CDATA[
Caeser is right. An attacker can compromise your bot pretty immediately otherwise. For example, the code below:<div class="codebox"><p>Code: </p><pre><code>!nmap [return "[adduser nick] [chattr nick +fgmnov]"]</code></pre></div>Here we show that using [exec] over unsanitized user input will let "nick" takeover your bot. Using the !nmap line above and replace "nick" with your nickname. You should see "1 fgmnov" when you gain ownership of the bot via this method, not the normal nmap reply expected.<br><br>Also:<blockquote class="uncited"><div>Not to mention the info exists progress will work for the first time, then will not allow the script to continue.</div></blockquote> <br><br>Yeah, not to mention that the script will run once and then not work again because of that variable "progress". You think tcl is threaded? It isn't... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed Feb 20, 2013 2:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-20T09:58:02-04:00</updated>

		<published>2013-02-20T09:58:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101064#p101064</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101064#p101064"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101064#p101064"><![CDATA[
Not really caesar.. could be done this way.. <br><div class="codebox"><p>Code: </p><pre><code>bind pub - !nmap port_scan proc port_scan {nick uhost handle chan text} {    global progress        if {$text == ""} { putserv "PRIVMSG $chan :Error. No arguments specified."; return }    if {[info exists progress]} { putserv "PRIVMSG $chan :nmap in progress please wait to finish.."; return }    putserv "PRIVMSG $chan : Scanning...... $text wait................!!"    putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"    set progress 1    set data_var [exec nmap $text]    set l [split $data_var "\r\n"]    foreach i $l { puthelp "PRIVMSG $chan : $i " }    unset -nocomplain progress} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Wed Feb 20, 2013 9:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-02-20T09:42:26-04:00</updated>

		<published>2013-02-20T09:42:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101063#p101063</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101063#p101063"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101063#p101063"><![CDATA[
Public access to exec.. bad idea in the first place. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> <br><br>Not to mention the <em class="text-italics">info exists progress</em> will work for the first time, then will not allow the script to continue.<br><br>I think you meant to create an global variable outside the <em class="text-italics">port_scan</em> proc (after bind line, like <em class="text-italics">set progress 0</em>) then match it's value against 1 or 0 like if {$progress} or if {!$progress} and proceed with return or continue. Oh, and guys please refrain from using $args as has special meaning in TCL.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 20, 2013 9:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-20T08:27:51-04:00</updated>

		<published>2013-02-20T08:27:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101062#p101062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101062#p101062"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101062#p101062"><![CDATA[
And maybe add some protection so that it won`t scan if someone uses !nmap without any $args<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !nmap port_scan proc port_scan {nick uhost handle chan args} {    global progress       if {$args == ""} { putserv "PRIVMSG $chan :Error. No arguments specified."; return }   if {[info exists progress]} { putserv "PRIVMSG $chan :nmap in progress please wait to finish.."; return }    putserv "PRIVMSG $chan : Scanning...... $args wait................!!"    putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"   set progress 1    set data_var [exec nmap $args]    set l [split $data_var "\r\n"]    foreach i $l { puthelp "PRIVMSG $chan : $i " }    set progress 0  } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Wed Feb 20, 2013 8:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-02-20T07:09:32-04:00</updated>

		<published>2013-02-20T07:09:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101061#p101061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101061#p101061"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101061#p101061"><![CDATA[
Try this<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !nmap port_scanproc port_scan {nick uhost handle chan args} {global progressif {[info exists progress]} { putserv "PRIVMSG $chan :nmap in progress please wait to finish.."; return }putserv "PRIVMSG $chan : Scanning...... $args wait................!!"set progress 1set data_var [exec nmap $args]set l [split $data_var "\r\n"]foreach i $l { puthelp "PRIVMSG $chan : $i " }set progress 0putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Wed Feb 20, 2013 7:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mimizu]]></name></author>
		<updated>2013-02-20T04:30:04-04:00</updated>

		<published>2013-02-20T04:30:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101060#p101060</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101060#p101060"/>
		<title type="html"><![CDATA[NMAP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101060#p101060"><![CDATA[
<blockquote class="uncited"><div>bind pub - !nmap port_scan<br>proc port_scan {nick uhost handle chan args} {<br>       putserv "PRIVMSG $chan : Scanning...... $args wait................!!"<br>       global data_var<br>       set data_var [exec nmap $args]<br>       set l [split $data_var "\r\n"]<br>       foreach i $l { puthelp "PRIVMSG $chan : $i " }<br>       putlog "&lt;&lt;$chan&gt;&gt; !$handle! !nmap"<br>}</div></blockquote>please help, to fix nmap script above.<br><br>if anyone did order !nmap nmap it will wait for the process is complete and can not process !nmap with a message on the channel "please wait a moment, are doing nmap"<br><br><br>Please help.<br><br>thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12198">mimizu</a> — Wed Feb 20, 2013 4:30 am</p><hr />
]]></content>
	</entry>
	</feed>
