Sha256: 919f0f40bbe1f39a0ea6541af67b62cf60de13e2305732a8ad7556d08d4178bd

Contents?: true

Size: 826 Bytes

Versions: 31

Compression:

Stored size: 826 Bytes

Contents

FactoryGirl.define do
  total_architectures = Metasploit::Model::Architecture::ABBREVIATIONS.length
  total_platforms = Metasploit::Model::Platform.fully_qualified_name_set.length
  targets_module_types = Metasploit::Model::Module::Instance.module_types_that_allow(:targets)

  sequence :metasploit_model_module_target_module_type, targets_module_types.cycle

  sequence :metasploit_model_module_target_name do |n|
    "Metasploit::Model::Module::Target#name #{n}"
  end

  trait :metasploit_model_module_target do
    ignore do
      module_type { generate :metasploit_model_module_target_module_type }

      target_architectures_length { Random.rand(1 .. total_architectures) }
      target_platforms_length { Random.rand(1 .. total_platforms) }
    end

    name { generate :metasploit_model_module_target_name }
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
metasploit-model-0.28.0 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.28.0-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.4 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.4-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.3 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.3-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.2 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.2-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.1 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.1-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.0 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.0-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.27.0.pre.dep.pre.railties spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.26.1-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.26.1 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.25.7 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.25.7-java spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.25.6 spec/factories/metasploit/model/module/targets.rb
metasploit-model-0.25.6-java spec/factories/metasploit/model/module/targets.rb