print command line output
git-svn-id: file:///home/svn/framework3/trunk@5243 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
a396f655d5
commit
b7dc7dfe65
|
@ -381,8 +381,11 @@ module Db
|
||||||
fd = Tempfile.new('dbnmap')
|
fd = Tempfile.new('dbnmap')
|
||||||
args.push('-oX', fd.path)
|
args.push('-oX', fd.path)
|
||||||
args.unshift(nmap)
|
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|
|
io.each_line do |line|
|
||||||
print_line("NMAP: " + line.strip)
|
print_line("NMAP: " + line.strip)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue