Nmap Development mailing list archives

Re: status report #5 of 15


From: David Fifield <david () bamsoftware com>
Date: Wed, 2 Jun 2010 09:00:49 -0600

On Wed, Jun 02, 2010 at 11:17:50AM +0530, kirubakaran S wrote:
David Fifield wrote:
Don't forget, I want you to design a stripped-down interface that has
roughly the capabilities of your Python program. This is what the first
iteration of the GUI will look like in about two weeks, if all goes
according to plan.

Do I need to design standalone interface independently with PyGTK or
something like modifying zenmap PyGTK code.?

Modifying Zenmap code in your branch would be best. You will have to
work around the OptionBuilder interface that builds every profile editor
tab from the profile_editor.xml file.

This is what profile_editor.xml has now about the Scripting tab.

<Scripting label="Scripting options (NSE)">
        <option_check option="-sC" label="Script scan"
         short_desc="Use the Nmap Scripting Engine to gain more information about targets after scanning them." 
example=""/>
        <option_check option="--script" label="Scripts to run"
         short_desc="Run the given scripts. Give script names, directory names, or category names. Categories are 
&quot;safe&quot;, &quot;intrusive&quot;, &quot;malware&quot;, &quot;discovery&quot;, &quot;vuln&quot;, 
&quot;auth&quot;, &quot;external&quot;, &quot;default&quot;, and &quot;all&quot;. If blank, scripts in the 
&quot;default&quot; category are run." example="discovery,auth.malware"/>
        <option_check option="--script-args" label="Script arguments"
         short_desc="Give arguments to certain scripts that use them. Arguments are &lt;name&gt;=&lt;value&gt; pairs, 
separated by commas. Values may be Lua tables." example="user=foo,pass=bar,anonFTP={pass=ftp () foobar com}"/>
        <option_check option="--script-trace" label="Trace script execution"
         short_desc="Show all information sent and received by the scripting engine." example=""/>
</Scripting>

You have to find a way to insert your own custom interface instead. I
can think of a couple of ways to do this. You could add a special case
for "Scripting" in the OptionBuilder code that inserts your own
interface instead. This might now be so hard, because we already do it
for the "Profile" tabe.

Or you could modify profile_editor.xml to look something like this:

<Scripting label="Scripting options (NSE)">
        <script_selector/>
</Scripting>

Then you would add a handler for script_selector in the OptionBuilder
code.

If those options aren't working, you can just design your interface in a
gtk.VBox and stick it in a temporary gtk.Window. We can figure out how
to get it in the profile editor a little later.

Doing a separate command-line program to collect script metadata is my
idea to reduce risk. You can continue making progress with that
algorithmic code in case the GUI programming poses difficulties.
Ideally, your code will be generic enough that we can drop it into the
GUI module when that's ready.

I have started adding methods to obtain each script metadata and store
this metadata in the dictionary along with filename and category. So
an entry will look like
<filename,category,description,author,license,arguments,URL>.
separating this into different module will also be easy.

That looks great. Please commit your code as you are working on it.
Commit one step at a time, don't wait until it's completely finished.
This is another way to reduce risk--we need to see just what you're
doing.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: