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

Version Path
wmap-2.8.4 bin/wscan
wmap-2.8.3 bin/wscan
wmap-2.8.2 bin/wscan
wmap-2.8.1 bin/wscan
wmap-2.7.9 bin/wscan
wmap-2.7.7 bin/wscan
wmap-2.7.6 bin/wscan
wmap-2.7.2 bin/wscan
wmap-2.7.1 bin/wscan
wmap-2.7.0 bin/wscan
wmap-2.6.9 bin/wscan
wmap-2.6.8 bin/wscan
wmap-2.6.7 bin/wscan
wmap-2.6.6 bin/wscan
wmap-2.6.5 bin/wscan
wmap-2.6.4 bin/wscan
wmap-2.6.3 bin/wscan
wmap-2.6.2 bin/wscan
wmap-2.6.1 bin/wscan
wmap-2.6.0 bin/wscan