lib/wmap/port_scanner.rb
# Pre-scan worker, to be used for network profiling to maximum the scan performance, for instance.
Pre-scan worker, to be used for network profiling to maximum the scan performance, for instance.
Pre - scan worker to be used for network profiling to maximum the scan performance for instance .
def pre_scan(host)
		puts "Perform pre-scan works on host: #{host}" if @verbose
		begin
			nwk_to=Wmap::NetworkProfiler.new.profile(host)
			if (100 + nwk_to*2).to_i > Max_socket_timeout
				@socket_timeout=Max_socket_timeout
			else
				@socket_timeout=(100 + nwk_to*2).to_i
			end
			puts "Done with the pre-scan works: reset @socket_timeout to: #{@socket_timeout}" if @verbose
		rescue Exception => ee
			puts "Exception on method #{__method__} for #{host}: #{ee}" if @verbose
			return nil
		end
	end
def pre_scan ( host ) puts "Perform pre-scan works on host: #{host}" if @verbose begin nwk_to = Wmap :: NetworkProfiler . new . profile ( host ) if ( 100 + nwk_to * 2 ) . to_i > Max_socket_timeout @socket_timeout = Max_socket_timeout else @socket_timeout = ( 100 + nwk_to * 2 ) . to_i end puts "Done with the pre-scan works: reset @socket_timeout to: #{@socket_timeout}" if @verbose rescue Exception => ee puts "Exception on method #{__method__} for #{host}: #{ee}" if @verbose return nil end end
Pre-scan worker, to be used for network profiling to maximum the scan performance, for instance.
Pre - scan worker to be used for network profiling to maximum the scan performance for instance .
# Use the following formula to 'guess' the right network time-out threshold for the scanner
host
<not_specific>