Sha256: fc3e1f9beb7daa2e4cf133ba7b7ed72c550efa090b6414507f0c8b162bdeaa81

Contents?: true

Size: 796 Bytes

Versions: 43

Compression:

Stored size: 796 Bytes

Contents

#!/usr/bin/env ruby

require 'ipaddr'

module Rex
module Post
module Meterpreter
module Extensions
module Stdapi
module Net

###
#
# Represents a logical network route.
#
###
class Route

	##
	#
	# Constructor
	#
	##

	#
	# Initializes a route instance.
	#
	def initialize(subnet, netmask, gateway)
		self.subnet  = IPAddr.ntop(subnet)
		self.netmask = IPAddr.ntop(netmask)
		self.gateway = IPAddr.ntop(gateway)
	end

	#
	# Provides a pretty version of the route.
	#
	def pretty
		return sprintf("%16s %16s %16s", subnet, netmask, gateway)
	end

	#
	# The subnet mask associated with the route.
	#
	attr_accessor :subnet
	#
	# The netmask of the subnet route.
	#
	attr_accessor :netmask
	#
	# The gateway to take for the subnet route.
	#
	attr_accessor :gateway

end

end; end; end; end; end; end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.35 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.34 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.33 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.32 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.31 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.30 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.29 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.28 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.27 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.26 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.25 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.23 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.21 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.19 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.17 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.13 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.12 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.7 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.6 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb
librex-0.0.5 lib/rex/post/meterpreter/extensions/stdapi/net/route.rb