mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 19:28:02 +00:00
28 lines
573 B
Ruby
28 lines
573 B
Ruby
class System
|
|
# can access from outside of class
|
|
attr_accessor :id, :os, :url,:basebox, :networks, :vulns, :services
|
|
|
|
#initalizes system variables
|
|
def initialize(id, os, basebox, url, vulns=[], networks=[], services=[])
|
|
@id = id
|
|
@os = os
|
|
@url = url
|
|
@basebox = basebox
|
|
@vulns = vulns
|
|
@networks = networks
|
|
@services = services
|
|
end
|
|
|
|
def is_valid_base
|
|
valid_base = Configuration.bases
|
|
|
|
valid_base.each do |b|
|
|
if @basebox == b.vagrantbase
|
|
@url = b.url
|
|
return true
|
|
end
|
|
end
|
|
return false
|
|
end
|
|
|
|
end |