Sha256: aec80b5f4a7e1380c494112783c73176e0725822a8f1d1d9422b289725af8086
Contents?: true
Size: 898 Bytes
Versions: 34
Compression:
Stored size: 898 Bytes
Contents
#!/usr/bin/env ruby # Executable to perform port scanning by using build-in tcp port scanner # This is useful to detect the web service require "wmap" def print_usage puts "Program to port scanning remote hops(s) or IP(s). Usage: wscan [IP | File with list of IPs]" end puts Wmap.banner print_usage Log_dir=File.dirname(__FILE__)+'/../logs/' Wmap.wlog("Execute the command: wscan #{ARGV[0]}","wscan",Log_dir+"wmap.log") sites=Array.new ps=Wmap::PortScanner.new abort "Incorrect program argument!" unless ARGV.length==1 # Evaluate the argument and update the data psore accordingly if File.exist?(ARGV[0]) targets=ps.file_2_list(ARGV[0]) sites=ps.scans(targets) elsif ps.is_ip?(ARGV[0]) or ps.is_fqdn?(ARGV[0]) sites=ps.scan(ARGV[0]) else print_usage and abort "Unknown argument format: #{ARGV[0]}." end ps=nil if sites.count>0 puts "Done. Discovered sites:" sites.map {|x| puts x} end
Version data entries
34 entries across 34 versions & 1 rubygems