print command line output

git-svn-id: file:///home/svn/framework3/trunk@5243 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-12-31 04:53:35 +00:00
parent a396f655d5
commit b7dc7dfe65
1 changed files with 5 additions and 2 deletions

View File

@ -381,8 +381,11 @@ module Db
fd = Tempfile.new('dbnmap')
args.push('-oX', fd.path)
args.unshift(nmap)
IO.popen( args.map{|x| '"'+x+'"'}.join(" ") + " 2>&1" ) do |io|
cmd = args.map{|x| '"'+x+'"'}.join(" ") + " 2>&1"
print_status("exec: #{cmd}")
IO.popen( cmd ) do |io|
io.each_line do |line|
print_line("NMAP: " + line.strip)
end