Nmap Development mailing list archives

Re: Bugfixes for smb-psexec


From: David Fifield <david () bamsoftware com>
Date: Mon, 21 Jun 2010 16:12:48 -0600

On Mon, Jun 14, 2010 at 11:03:21AM -0500, Ron wrote:
Somebody in #nmap on Freenode was having an issue with smb-psexec that we resolved. It actually came down to two 
separate issues. 

When running Nmap through another program (like bash, perl, etc), the following two things would happen:
o The require() function would no longer take absolute paths
o nmap.fetchfile() would no longer take absolute paths

Where does nmap.fetchfile receive an absolute path? I think that doesn't
work in any case, whether run in a subprocess or not. Can you give an
example call trace?

o No longer using require(), which Patrick tells me I was abusing anyways -- I use loadfile() now like I'm supposed 
to. 
o Checking if the file exists using io.open() before using nmap.fetchfile(). 

Unfortunately, the first of those requires a minor compatibility break
in the configure files for smb-psexec (removing a single line), which
I automatically detect and print an error for. 

It's not particularly clean to grep the first line for the word
"module". Could you redefine the module function to a do-nothing
function, or a function that prints the error message?

I think the more important issue is to find out why nmap.fetchfile is
seemingly changing its behavior when run in a subprocess. I rather
suspect some kind of installation problem.

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: