lib/rpc/xml/server/dispatcher.rb in arachni-0.2.4 vs lib/rpc/xml/server/dispatcher.rb in arachni-0.3
- old
+ new
@@ -176,10 +176,14 @@
'init_pool_size' => @opts.pool_size,
'curr_pool_size' => @pool.size
}
end
+ def proc_info
+ unnil( proc( Process.pid ) )
+ end
+
#
# Outputs the Arachni banner.<br/>
# Displays version number, revision number, author details etc.
#
def banner
@@ -232,9 +236,26 @@
USAGE
end
private
+
+ #
+ # Recursively removes nils.
+ #
+ # @param [Hash] hash
+ #
+ # @return [Hash]
+ #
+ def unnil( hash )
+ hash.each_pair {
+ |k, v|
+ hash[k] = '' if v.nil?
+ hash[k] = unnil( v ) if v.is_a? Hash
+ }
+
+ return hash
+ end
#
# Initializes and updates the pool making sure that the number of
# available server processes stays constant for any given moment
#