metasploit-model 0.24.1.pre.semantic.pre.versioning.pre.2.pre.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +27 -0
- data/.rspec +4 -0
- data/.simplecov +38 -0
- data/.travis.yml +6 -0
- data/.yardopts +5 -0
- data/Gemfile +43 -0
- data/LICENSE +27 -0
- data/README.md +33 -0
- data/Rakefile +52 -0
- data/app/models/metasploit/model/association/reflection.rb +46 -0
- data/app/models/metasploit/model/module/ancestor/spec/template.rb +125 -0
- data/app/models/metasploit/model/module/class/spec/template.rb +92 -0
- data/app/models/metasploit/model/module/instance/spec/template.rb +97 -0
- data/app/models/metasploit/model/search/group/base.rb +21 -0
- data/app/models/metasploit/model/search/group/intersection.rb +4 -0
- data/app/models/metasploit/model/search/group/union.rb +4 -0
- data/app/models/metasploit/model/search/operation/base.rb +39 -0
- data/app/models/metasploit/model/search/operation/boolean.rb +36 -0
- data/app/models/metasploit/model/search/operation/date.rb +37 -0
- data/app/models/metasploit/model/search/operation/integer.rb +14 -0
- data/app/models/metasploit/model/search/operation/null.rb +26 -0
- data/app/models/metasploit/model/search/operation/set.rb +34 -0
- data/app/models/metasploit/model/search/operation/set/integer.rb +5 -0
- data/app/models/metasploit/model/search/operation/set/string.rb +5 -0
- data/app/models/metasploit/model/search/operation/string.rb +11 -0
- data/app/models/metasploit/model/search/operation/union.rb +59 -0
- data/app/models/metasploit/model/search/operator/association.rb +43 -0
- data/app/models/metasploit/model/search/operator/attribute.rb +60 -0
- data/app/models/metasploit/model/search/operator/base.rb +34 -0
- data/app/models/metasploit/model/search/operator/delegation.rb +40 -0
- data/app/models/metasploit/model/search/operator/deprecated/app.rb +27 -0
- data/app/models/metasploit/model/search/operator/deprecated/author.rb +33 -0
- data/app/models/metasploit/model/search/operator/deprecated/authority.rb +43 -0
- data/app/models/metasploit/model/search/operator/deprecated/platform.rb +45 -0
- data/app/models/metasploit/model/search/operator/deprecated/ref.rb +50 -0
- data/app/models/metasploit/model/search/operator/deprecated/text.rb +32 -0
- data/app/models/metasploit/model/search/operator/null.rb +44 -0
- data/app/models/metasploit/model/search/operator/single.rb +98 -0
- data/app/models/metasploit/model/search/operator/union.rb +33 -0
- data/app/models/metasploit/model/search/query.rb +171 -0
- data/app/models/metasploit/model/spec/template.rb +273 -0
- data/app/models/metasploit/model/visitation/visitor.rb +69 -0
- data/app/validators/derivation_validator.rb +17 -0
- data/app/validators/dynamic_length_validator.rb +45 -0
- data/app/validators/ip_format_validator.rb +31 -0
- data/app/validators/nil_validator.rb +16 -0
- data/app/validators/parameters_validator.rb +147 -0
- data/app/validators/password_is_strong_validator.rb +115 -0
- data/config/locales/en.yml +209 -0
- data/lib/metasploit/model.rb +38 -0
- data/lib/metasploit/model/architecture.rb +346 -0
- data/lib/metasploit/model/association.rb +49 -0
- data/lib/metasploit/model/association/error.rb +40 -0
- data/lib/metasploit/model/author.rb +58 -0
- data/lib/metasploit/model/authority.rb +134 -0
- data/lib/metasploit/model/authority/bid.rb +10 -0
- data/lib/metasploit/model/authority/cve.rb +10 -0
- data/lib/metasploit/model/authority/msb.rb +10 -0
- data/lib/metasploit/model/authority/osvdb.rb +10 -0
- data/lib/metasploit/model/authority/pmasa.rb +10 -0
- data/lib/metasploit/model/authority/secunia.rb +10 -0
- data/lib/metasploit/model/authority/us_cert_vu.rb +10 -0
- data/lib/metasploit/model/authority/waraxe.rb +31 -0
- data/lib/metasploit/model/authority/zdi.rb +10 -0
- data/lib/metasploit/model/base.rb +25 -0
- data/lib/metasploit/model/configuration.rb +72 -0
- data/lib/metasploit/model/configuration/autoload.rb +109 -0
- data/lib/metasploit/model/configuration/child.rb +12 -0
- data/lib/metasploit/model/configuration/error.rb +4 -0
- data/lib/metasploit/model/configuration/i18n.rb +54 -0
- data/lib/metasploit/model/configuration/parent.rb +50 -0
- data/lib/metasploit/model/configured.rb +46 -0
- data/lib/metasploit/model/derivation.rb +110 -0
- data/lib/metasploit/model/derivation/full_name.rb +25 -0
- data/lib/metasploit/model/email_address.rb +128 -0
- data/lib/metasploit/model/engine.rb +34 -0
- data/lib/metasploit/model/error.rb +7 -0
- data/lib/metasploit/model/file.rb +49 -0
- data/lib/metasploit/model/invalid.rb +17 -0
- data/lib/metasploit/model/module.rb +8 -0
- data/lib/metasploit/model/module/action.rb +58 -0
- data/lib/metasploit/model/module/ancestor.rb +494 -0
- data/lib/metasploit/model/module/architecture.rb +40 -0
- data/lib/metasploit/model/module/author.rb +47 -0
- data/lib/metasploit/model/module/class.rb +406 -0
- data/lib/metasploit/model/module/handler.rb +35 -0
- data/lib/metasploit/model/module/instance.rb +626 -0
- data/lib/metasploit/model/module/path.rb +165 -0
- data/lib/metasploit/model/module/platform.rb +38 -0
- data/lib/metasploit/model/module/rank.rb +91 -0
- data/lib/metasploit/model/module/reference.rb +38 -0
- data/lib/metasploit/model/module/stance.rb +22 -0
- data/lib/metasploit/model/module/target.rb +80 -0
- data/lib/metasploit/model/module/target/architecture.rb +42 -0
- data/lib/metasploit/model/module/target/platform.rb +42 -0
- data/lib/metasploit/model/module/type.rb +44 -0
- data/lib/metasploit/model/nilify_blanks.rb +53 -0
- data/lib/metasploit/model/platform.rb +250 -0
- data/lib/metasploit/model/real_pathname.rb +18 -0
- data/lib/metasploit/model/reference.rb +108 -0
- data/lib/metasploit/model/search.rb +63 -0
- data/lib/metasploit/model/search/association.rb +32 -0
- data/lib/metasploit/model/search/attribute.rb +51 -0
- data/lib/metasploit/model/search/operation.rb +31 -0
- data/lib/metasploit/model/search/operation/integer/value.rb +33 -0
- data/lib/metasploit/model/search/operation/string/value.rb +14 -0
- data/lib/metasploit/model/search/operator.rb +10 -0
- data/lib/metasploit/model/search/operator/help.rb +47 -0
- data/lib/metasploit/model/search/with.rb +40 -0
- data/lib/metasploit/model/spec.rb +140 -0
- data/lib/metasploit/model/spec/error.rb +9 -0
- data/lib/metasploit/model/spec/i18n_exception_handler.rb +19 -0
- data/lib/metasploit/model/spec/pathname_collision.rb +28 -0
- data/lib/metasploit/model/spec/template/write.rb +42 -0
- data/lib/metasploit/model/spec/temporary_pathname.rb +59 -0
- data/lib/metasploit/model/translation.rb +31 -0
- data/lib/metasploit/model/version.rb +33 -0
- data/lib/metasploit/model/visitation.rb +9 -0
- data/lib/metasploit/model/visitation/visit.rb +103 -0
- data/lib/tasks/yard.rake +30 -0
- data/metasploit-model.gemspec +39 -0
- data/script/rails +9 -0
- data/spec/app/models/metasploit/model/association/reflection_spec.rb +48 -0
- data/spec/app/models/metasploit/model/module/ancestor/spec/template_spec.rb +174 -0
- data/spec/app/models/metasploit/model/module/class/spec/template_spec.rb +222 -0
- data/spec/app/models/metasploit/model/module/instance/spec/template_spec.rb +201 -0
- data/spec/app/models/metasploit/model/search/group/base_spec.rb +5 -0
- data/spec/app/models/metasploit/model/search/group/intersection_spec.rb +5 -0
- data/spec/app/models/metasploit/model/search/group/union_spec.rb +5 -0
- data/spec/app/models/metasploit/model/search/operation/base_spec.rb +70 -0
- data/spec/app/models/metasploit/model/search/operation/boolean_spec.rb +56 -0
- data/spec/app/models/metasploit/model/search/operation/date_spec.rb +89 -0
- data/spec/app/models/metasploit/model/search/operation/integer_spec.rb +9 -0
- data/spec/app/models/metasploit/model/search/operation/null_spec.rb +64 -0
- data/spec/app/models/metasploit/model/search/operation/set/integer_spec.rb +7 -0
- data/spec/app/models/metasploit/model/search/operation/set/string_spec.rb +7 -0
- data/spec/app/models/metasploit/model/search/operation/set_spec.rb +126 -0
- data/spec/app/models/metasploit/model/search/operation/string_spec.rb +9 -0
- data/spec/app/models/metasploit/model/search/operation/union_spec.rb +124 -0
- data/spec/app/models/metasploit/model/search/operator/association_spec.rb +108 -0
- data/spec/app/models/metasploit/model/search/operator/attribute_spec.rb +104 -0
- data/spec/app/models/metasploit/model/search/operator/base_spec.rb +34 -0
- data/spec/app/models/metasploit/model/search/operator/delegation_spec.rb +108 -0
- data/spec/app/models/metasploit/model/search/operator/deprecated/app_spec.rb +62 -0
- data/spec/app/models/metasploit/model/search/operator/deprecated/author_spec.rb +161 -0
- data/spec/app/models/metasploit/model/search/operator/deprecated/authority_spec.rb +123 -0
- data/spec/app/models/metasploit/model/search/operator/deprecated/platform_spec.rb +112 -0
- data/spec/app/models/metasploit/model/search/operator/deprecated/ref_spec.rb +327 -0
- data/spec/app/models/metasploit/model/search/operator/deprecated/text_spec.rb +357 -0
- data/spec/app/models/metasploit/model/search/operator/null_spec.rb +41 -0
- data/spec/app/models/metasploit/model/search/operator/single_spec.rb +327 -0
- data/spec/app/models/metasploit/model/search/operator/union_spec.rb +92 -0
- data/spec/app/models/metasploit/model/search/query_spec.rb +742 -0
- data/spec/app/models/metasploit/model/spec/template_spec.rb +23 -0
- data/spec/app/models/metasploit/model/visitation/visitor_spec.rb +45 -0
- data/spec/app/validators/derivation_validator_spec.rb +92 -0
- data/spec/app/validators/dynamic_length_validator_spec.rb +293 -0
- data/spec/app/validators/ip_format_validator_spec.rb +124 -0
- data/spec/app/validators/nil_validator_spec.rb +69 -0
- data/spec/app/validators/parameters_validator_spec.rb +342 -0
- data/spec/app/validators/password_is_strong_validator_spec.rb +250 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/dummy/architecture.rb +92 -0
- data/spec/dummy/app/models/dummy/author.rb +15 -0
- data/spec/dummy/app/models/dummy/authority.rb +130 -0
- data/spec/dummy/app/models/dummy/email_address.rb +27 -0
- data/spec/dummy/app/models/dummy/module/action.rb +25 -0
- data/spec/dummy/app/models/dummy/module/ancestor.rb +67 -0
- data/spec/dummy/app/models/dummy/module/architecture.rb +19 -0
- data/spec/dummy/app/models/dummy/module/author.rb +28 -0
- data/spec/dummy/app/models/dummy/module/class.rb +69 -0
- data/spec/dummy/app/models/dummy/module/instance.rb +209 -0
- data/spec/dummy/app/models/dummy/module/path.rb +64 -0
- data/spec/dummy/app/models/dummy/module/platform.rb +19 -0
- data/spec/dummy/app/models/dummy/module/rank.rb +44 -0
- data/spec/dummy/app/models/dummy/module/reference.rb +19 -0
- data/spec/dummy/app/models/dummy/module/target.rb +62 -0
- data/spec/dummy/app/models/dummy/module/target/architecture.rb +19 -0
- data/spec/dummy/app/models/dummy/module/target/platform.rb +19 -0
- data/spec/dummy/app/models/dummy/platform.rb +58 -0
- data/spec/dummy/app/models/dummy/reference.rb +31 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +43 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +27 -0
- data/spec/dummy/config/environments/production.rb +63 -0
- data/spec/dummy/config/environments/test.rb +29 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/spec/dummy/config/locales/en.yml +1 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/db/schema.rb +707 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/factories/dummy/architectures.rb +13 -0
- data/spec/dummy/spec/factories/dummy/authorities.rb +32 -0
- data/spec/dummy/spec/factories/dummy/authors.rb +8 -0
- data/spec/dummy/spec/factories/dummy/email_addresses.rb +8 -0
- data/spec/dummy/spec/factories/dummy/module/actions.rb +13 -0
- data/spec/dummy/spec/factories/dummy/module/ancestors.rb +45 -0
- data/spec/dummy/spec/factories/dummy/module/architectures.rb +35 -0
- data/spec/dummy/spec/factories/dummy/module/authors.rb +10 -0
- data/spec/dummy/spec/factories/dummy/module/classes.rb +40 -0
- data/spec/dummy/spec/factories/dummy/module/instances.rb +86 -0
- data/spec/dummy/spec/factories/dummy/module/paths.rb +16 -0
- data/spec/dummy/spec/factories/dummy/module/platforms.rb +35 -0
- data/spec/dummy/spec/factories/dummy/module/ranks.rb +14 -0
- data/spec/dummy/spec/factories/dummy/module/references.rb +17 -0
- data/spec/dummy/spec/factories/dummy/module/target/architectures.rb +40 -0
- data/spec/dummy/spec/factories/dummy/module/target/platforms.rb +41 -0
- data/spec/dummy/spec/factories/dummy/module/targets.rb +46 -0
- data/spec/dummy/spec/factories/dummy/platforms.rb +3 -0
- data/spec/dummy/spec/factories/dummy/references.rb +26 -0
- data/spec/factories/metasploit/model/architectures.rb +6 -0
- data/spec/factories/metasploit/model/association/reflections.rb +9 -0
- data/spec/factories/metasploit/model/authorities.rb +28 -0
- data/spec/factories/metasploit/model/authors.rb +9 -0
- data/spec/factories/metasploit/model/bases.rb +10 -0
- data/spec/factories/metasploit/model/email_addresses.rb +14 -0
- data/spec/factories/metasploit/model/module/actions.rb +9 -0
- data/spec/factories/metasploit/model/module/ancestors.rb +180 -0
- data/spec/factories/metasploit/model/module/architectures.rb +15 -0
- data/spec/factories/metasploit/model/module/classes.rb +47 -0
- data/spec/factories/metasploit/model/module/handlers.rb +3 -0
- data/spec/factories/metasploit/model/module/instances.rb +83 -0
- data/spec/factories/metasploit/model/module/paths.rb +51 -0
- data/spec/factories/metasploit/model/module/platforms.rb +15 -0
- data/spec/factories/metasploit/model/module/ranks.rb +9 -0
- data/spec/factories/metasploit/model/module/references.rb +11 -0
- data/spec/factories/metasploit/model/module/stances.rb +3 -0
- data/spec/factories/metasploit/model/module/targets.rb +22 -0
- data/spec/factories/metasploit/model/module/types.rb +5 -0
- data/spec/factories/metasploit/model/references.rb +88 -0
- data/spec/factories/metasploit/model/search/operator/associations.rb +5 -0
- data/spec/factories/metasploit/model/search/operator/attributes.rb +7 -0
- data/spec/factories/metasploit/model/search/operator/bases.rb +5 -0
- data/spec/lib/metasploit/model/architecture_spec.rb +52 -0
- data/spec/lib/metasploit/model/association/error_spec.rb +48 -0
- data/spec/lib/metasploit/model/association_spec.rb +145 -0
- data/spec/lib/metasploit/model/author_spec.rb +6 -0
- data/spec/lib/metasploit/model/authority/bid_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/cve_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/msb_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/osvdb_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/pmasa_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/secunia_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/us_cert_vu_spec.rb +17 -0
- data/spec/lib/metasploit/model/authority/waraxe_spec.rb +51 -0
- data/spec/lib/metasploit/model/authority/zdi_spec.rb +21 -0
- data/spec/lib/metasploit/model/authority_spec.rb +10 -0
- data/spec/lib/metasploit/model/base_spec.rb +58 -0
- data/spec/lib/metasploit/model/configuration/autoload_spec.rb +165 -0
- data/spec/lib/metasploit/model/configuration/child_spec.rb +24 -0
- data/spec/lib/metasploit/model/configuration/error_spec.rb +5 -0
- data/spec/lib/metasploit/model/configuration/i18n_spec.rb +103 -0
- data/spec/lib/metasploit/model/configuration_spec.rb +106 -0
- data/spec/lib/metasploit/model/configured_spec.rb +41 -0
- data/spec/lib/metasploit/model/derivation/full_name_spec.rb +75 -0
- data/spec/lib/metasploit/model/derivation_spec.rb +217 -0
- data/spec/lib/metasploit/model/email_address_spec.rb +19 -0
- data/spec/lib/metasploit/model/engine_spec.rb +84 -0
- data/spec/lib/metasploit/model/file_spec.rb +43 -0
- data/spec/lib/metasploit/model/invalid_spec.rb +54 -0
- data/spec/lib/metasploit/model/module/action_spec.rb +6 -0
- data/spec/lib/metasploit/model/module/ancestor_spec.rb +6 -0
- data/spec/lib/metasploit/model/module/architecture_spec.rb +9 -0
- data/spec/lib/metasploit/model/module/author_spec.rb +6 -0
- data/spec/lib/metasploit/model/module/class_spec.rb +19 -0
- data/spec/lib/metasploit/model/module/handler_spec.rb +61 -0
- data/spec/lib/metasploit/model/module/instance_spec.rb +183 -0
- data/spec/lib/metasploit/model/module/path_spec.rb +6 -0
- data/spec/lib/metasploit/model/module/platform_spec.rb +9 -0
- data/spec/lib/metasploit/model/module/rank_spec.rb +29 -0
- data/spec/lib/metasploit/model/module/reference_spec.rb +9 -0
- data/spec/lib/metasploit/model/module/stance_spec.rb +30 -0
- data/spec/lib/metasploit/model/module/target/architecture_spec.rb +9 -0
- data/spec/lib/metasploit/model/module/target/platform_spec.rb +9 -0
- data/spec/lib/metasploit/model/module/target_spec.rb +9 -0
- data/spec/lib/metasploit/model/module/type_spec.rb +125 -0
- data/spec/lib/metasploit/model/nilify_blanks_spec.rb +156 -0
- data/spec/lib/metasploit/model/platform_spec.rb +100 -0
- data/spec/lib/metasploit/model/reference_spec.rb +21 -0
- data/spec/lib/metasploit/model/search/association_spec.rb +33 -0
- data/spec/lib/metasploit/model/search/attribute_spec.rb +99 -0
- data/spec/lib/metasploit/model/search/operation/integer/value_spec.rb +20 -0
- data/spec/lib/metasploit/model/search/operation/string/value_spec.rb +20 -0
- data/spec/lib/metasploit/model/search/operation_spec.rb +144 -0
- data/spec/lib/metasploit/model/search/operator/help_spec.rb +41 -0
- data/spec/lib/metasploit/model/search/with_spec.rb +81 -0
- data/spec/lib/metasploit/model/search_spec.rb +230 -0
- data/spec/lib/metasploit/model/spec/error_spec.rb +5 -0
- data/spec/lib/metasploit/model/spec/i18n_exception_handler_spec.rb +42 -0
- data/spec/lib/metasploit/model/spec/pathname_collision_spec.rb +55 -0
- data/spec/lib/metasploit/model/spec_spec.rb +114 -0
- data/spec/lib/metasploit/model/translation_spec.rb +82 -0
- data/spec/lib/metasploit/model/version_spec.rb +141 -0
- data/spec/lib/metasploit/model/visitation/visit_spec.rb +316 -0
- data/spec/lib/metasploit/model_spec.rb +68 -0
- data/spec/spec_helper.rb +48 -0
- data/spec/support/shared/contexts/metasploit/model/configuration.rb +11 -0
- data/spec/support/shared/contexts/metasploit/model/module/ancestor/contents/metasploit_module.rb +12 -0
- data/spec/support/shared/contexts/metasploit/model/module/ancestor/factory/contents.rb +10 -0
- data/spec/support/shared/contexts/metasploit/model/module/ancestor/factory/contents/metasploit_module.rb +15 -0
- data/spec/support/shared/contexts/metasploit/model/search/operator/union/children.rb +13 -0
- data/spec/support/shared/examples/derives.rb +115 -0
- data/spec/support/shared/examples/metasploit/model/architecture.rb +425 -0
- data/spec/support/shared/examples/metasploit/model/architecture/seed.rb +25 -0
- data/spec/support/shared/examples/metasploit/model/author.rb +27 -0
- data/spec/support/shared/examples/metasploit/model/authority.rb +124 -0
- data/spec/support/shared/examples/metasploit/model/authority/seed.rb +49 -0
- data/spec/support/shared/examples/metasploit/model/configuration/parent/child.rb +60 -0
- data/spec/support/shared/examples/metasploit/model/email_address.rb +220 -0
- data/spec/support/shared/examples/metasploit/model/module/action.rb +26 -0
- data/spec/support/shared/examples/metasploit/model/module/ancestor.rb +2004 -0
- data/spec/support/shared/examples/metasploit/model/module/ancestor/payload_factory.rb +63 -0
- data/spec/support/shared/examples/metasploit/model/module/architecture.rb +36 -0
- data/spec/support/shared/examples/metasploit/model/module/author.rb +29 -0
- data/spec/support/shared/examples/metasploit/model/module/class.rb +1514 -0
- data/spec/support/shared/examples/metasploit/model/module/handler.rb +21 -0
- data/spec/support/shared/examples/metasploit/model/module/instance.rb +1384 -0
- data/spec/support/shared/examples/metasploit/model/module/instance/class_methods.rb +537 -0
- data/spec/support/shared/examples/metasploit/model/module/instance/is_not_stanced_with_module_type.rb +22 -0
- data/spec/support/shared/examples/metasploit/model/module/instance/is_stanced_with_module_type.rb +38 -0
- data/spec/support/shared/examples/metasploit/model/module/instance/validates/dynamic_length_of.rb +131 -0
- data/spec/support/shared/examples/metasploit/model/module/path.rb +493 -0
- data/spec/support/shared/examples/metasploit/model/module/platform.rb +36 -0
- data/spec/support/shared/examples/metasploit/model/module/rank.rb +92 -0
- data/spec/support/shared/examples/metasploit/model/module/reference.rb +16 -0
- data/spec/support/shared/examples/metasploit/model/module/target.rb +29 -0
- data/spec/support/shared/examples/metasploit/model/module/target/architecture.rb +56 -0
- data/spec/support/shared/examples/metasploit/model/module/target/platform.rb +56 -0
- data/spec/support/shared/examples/metasploit/model/platform.rb +213 -0
- data/spec/support/shared/examples/metasploit/model/real_pathname.rb +29 -0
- data/spec/support/shared/examples/metasploit/model/reference.rb +410 -0
- data/spec/support/shared/examples/metasploit/model/search/operation/integer/value.rb +79 -0
- data/spec/support/shared/examples/metasploit/model/search/operation/string/value.rb +53 -0
- data/spec/support/shared/examples/metasploit/model/search/operator/help.rb +134 -0
- data/spec/support/shared/examples/metasploit/model/translation.rb +37 -0
- data/spec/support/shared/examples/search/query.rb +43 -0
- data/spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/app.rb +44 -0
- data/spec/support/shared/examples/search/query/metasploit/model/search/operator/deprecated/authority.rb +60 -0
- data/spec/support/shared/examples/search_association.rb +13 -0
- data/spec/support/shared/examples/search_attribute.rb +27 -0
- data/spec/support/shared/examples/search_with.rb +36 -0
- data/spec/support/shared/matchers/allow_attribute.rb +17 -0
- data/spec/support/templates/metasploit/model/module/ancestors/_attributes.rb.erb +9 -0
- data/spec/support/templates/metasploit/model/module/ancestors/_methods.rb.erb +8 -0
- data/spec/support/templates/metasploit/model/module/ancestors/_validations.rb.erb +6 -0
- data/spec/support/templates/metasploit/model/module/ancestors/base.rb.erb +3 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_auxiliary.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_encoder.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_exploit.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_non_payload.rb.erb +5 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_nop.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_payload.rb.erb +4 -0
- data/spec/support/templates/metasploit/model/module/ancestors/module_types/_post.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/ancestors/payload_types/_handled.rb.erb +20 -0
- data/spec/support/templates/metasploit/model/module/ancestors/payload_types/_single.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/ancestors/payload_types/_stage.rb.erb +0 -0
- data/spec/support/templates/metasploit/model/module/ancestors/payload_types/_stager.rb.erb +1 -0
- data/spec/support/templates/metasploit/model/module/classes/_methods.rb.erb +9 -0
- metadata +748 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Print deprecation notices to the stderr
|
28
|
+
config.active_support.deprecation = :stderr
|
29
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'f04f565f9a4db0f0af88f4bd8b79952d139b02434b889a7c7bb3fe83405e9032409bd16bca7b0d7d68a8b119b6ddfd31b17d19155cd699a27e19a48bd05eb200'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
en:
|
@@ -0,0 +1,707 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20130629173534) do
|
15
|
+
|
16
|
+
create_table "api_keys", :force => true do |t|
|
17
|
+
t.text "token", :null => false
|
18
|
+
t.datetime "created_at", :null => false
|
19
|
+
t.datetime "updated_at", :null => false
|
20
|
+
end
|
21
|
+
|
22
|
+
add_index "api_keys", ["token"], :name => "index_api_keys_on_token", :unique => true
|
23
|
+
|
24
|
+
create_table "architectures", :force => true do |t|
|
25
|
+
t.integer "bits"
|
26
|
+
t.string "abbreviation", :null => false
|
27
|
+
t.string "endianness"
|
28
|
+
t.string "family"
|
29
|
+
t.string "summary", :null => false
|
30
|
+
end
|
31
|
+
|
32
|
+
add_index "architectures", ["abbreviation"], :name => "index_architectures_on_abbreviation", :unique => true
|
33
|
+
add_index "architectures", ["family", "bits", "endianness"], :name => "index_architectures_on_family_and_bits_and_endianness", :unique => true
|
34
|
+
add_index "architectures", ["summary"], :name => "index_architectures_on_summary", :unique => true
|
35
|
+
|
36
|
+
create_table "authorities", :force => true do |t|
|
37
|
+
t.string "abbreviation", :null => false
|
38
|
+
t.boolean "obsolete", :default => false, :null => false
|
39
|
+
t.string "summary"
|
40
|
+
t.text "url"
|
41
|
+
end
|
42
|
+
|
43
|
+
add_index "authorities", ["abbreviation"], :name => "index_authorities_on_abbreviation", :unique => true
|
44
|
+
add_index "authorities", ["summary"], :name => "index_authorities_on_summary", :unique => true
|
45
|
+
add_index "authorities", ["url"], :name => "index_authorities_on_url", :unique => true
|
46
|
+
|
47
|
+
create_table "authors", :force => true do |t|
|
48
|
+
t.string "name", :null => false
|
49
|
+
end
|
50
|
+
|
51
|
+
add_index "authors", ["name"], :name => "index_authors_on_name", :unique => true
|
52
|
+
|
53
|
+
create_table "clients", :force => true do |t|
|
54
|
+
t.integer "host_id"
|
55
|
+
t.datetime "created_at"
|
56
|
+
t.string "ua_string", :limit => 1024, :null => false
|
57
|
+
t.string "ua_name", :limit => 64
|
58
|
+
t.string "ua_ver", :limit => 32
|
59
|
+
t.datetime "updated_at"
|
60
|
+
end
|
61
|
+
|
62
|
+
create_table "creds", :force => true do |t|
|
63
|
+
t.integer "service_id", :null => false
|
64
|
+
t.datetime "created_at", :null => false
|
65
|
+
t.datetime "updated_at", :null => false
|
66
|
+
t.string "user", :limit => 2048
|
67
|
+
t.string "pass", :limit => 4096
|
68
|
+
t.boolean "active", :default => true
|
69
|
+
t.string "proof", :limit => 4096
|
70
|
+
t.string "ptype", :limit => 256
|
71
|
+
t.integer "source_id"
|
72
|
+
t.string "source_type"
|
73
|
+
end
|
74
|
+
|
75
|
+
create_table "email_addresses", :force => true do |t|
|
76
|
+
t.string "domain", :null => false
|
77
|
+
t.string "local", :null => false
|
78
|
+
end
|
79
|
+
|
80
|
+
add_index "email_addresses", ["domain", "local"], :name => "index_email_addresses_on_domain_and_local", :unique => true
|
81
|
+
add_index "email_addresses", ["domain"], :name => "index_email_addresses_on_domain"
|
82
|
+
add_index "email_addresses", ["local"], :name => "index_email_addresses_on_local"
|
83
|
+
|
84
|
+
create_table "events", :force => true do |t|
|
85
|
+
t.integer "workspace_id"
|
86
|
+
t.integer "host_id"
|
87
|
+
t.datetime "created_at"
|
88
|
+
t.string "name"
|
89
|
+
t.datetime "updated_at"
|
90
|
+
t.boolean "critical"
|
91
|
+
t.boolean "seen"
|
92
|
+
t.string "username"
|
93
|
+
t.text "info"
|
94
|
+
end
|
95
|
+
|
96
|
+
create_table "exploit_attempts", :force => true do |t|
|
97
|
+
t.integer "host_id"
|
98
|
+
t.integer "service_id"
|
99
|
+
t.integer "vuln_id"
|
100
|
+
t.datetime "attempted_at"
|
101
|
+
t.boolean "exploited"
|
102
|
+
t.string "fail_reason"
|
103
|
+
t.string "username"
|
104
|
+
t.text "module"
|
105
|
+
t.integer "session_id"
|
106
|
+
t.integer "loot_id"
|
107
|
+
t.integer "port"
|
108
|
+
t.string "proto"
|
109
|
+
t.text "fail_detail"
|
110
|
+
end
|
111
|
+
|
112
|
+
create_table "exploited_hosts", :force => true do |t|
|
113
|
+
t.integer "host_id", :null => false
|
114
|
+
t.integer "service_id"
|
115
|
+
t.string "session_uuid", :limit => 8
|
116
|
+
t.string "name", :limit => 2048
|
117
|
+
t.string "payload", :limit => 2048
|
118
|
+
t.datetime "created_at", :null => false
|
119
|
+
t.datetime "updated_at", :null => false
|
120
|
+
end
|
121
|
+
|
122
|
+
create_table "host_details", :force => true do |t|
|
123
|
+
t.integer "host_id"
|
124
|
+
t.integer "nx_console_id"
|
125
|
+
t.integer "nx_device_id"
|
126
|
+
t.string "src"
|
127
|
+
t.string "nx_site_name"
|
128
|
+
t.string "nx_site_importance"
|
129
|
+
t.string "nx_scan_template"
|
130
|
+
t.float "nx_risk_score"
|
131
|
+
end
|
132
|
+
|
133
|
+
create_table "host_tags", :force => true do |t|
|
134
|
+
t.integer "host_id", :null => false
|
135
|
+
t.integer "tag_id", :null => false
|
136
|
+
end
|
137
|
+
|
138
|
+
add_index "host_tags", ["host_id", "tag_id"], :name => "index_host_tags_on_host_id_and_tag_id", :unique => true
|
139
|
+
add_index "host_tags", ["host_id"], :name => "index_host_tags_on_host_id"
|
140
|
+
add_index "host_tags", ["tag_id"], :name => "index_host_tags_on_tag_id"
|
141
|
+
|
142
|
+
create_table "hosts", :force => true do |t|
|
143
|
+
t.datetime "created_at"
|
144
|
+
t.string "address", :limit => nil, :null => false
|
145
|
+
t.string "mac"
|
146
|
+
t.string "comm"
|
147
|
+
t.string "name"
|
148
|
+
t.string "state"
|
149
|
+
t.string "os_name"
|
150
|
+
t.string "os_flavor"
|
151
|
+
t.string "os_sp"
|
152
|
+
t.string "os_lang"
|
153
|
+
t.integer "workspace_id", :null => false
|
154
|
+
t.datetime "updated_at"
|
155
|
+
t.text "purpose"
|
156
|
+
t.string "info", :limit => 65536
|
157
|
+
t.text "comments"
|
158
|
+
t.text "scope"
|
159
|
+
t.text "virtual_host"
|
160
|
+
t.integer "note_count", :default => 0
|
161
|
+
t.integer "vuln_count", :default => 0
|
162
|
+
t.integer "service_count", :default => 0
|
163
|
+
t.integer "host_detail_count", :default => 0
|
164
|
+
t.integer "exploit_attempt_count", :default => 0
|
165
|
+
t.integer "cred_count", :default => 0
|
166
|
+
t.integer "architecture_id"
|
167
|
+
end
|
168
|
+
|
169
|
+
add_index "hosts", ["architecture_id"], :name => "index_hosts_on_architecture_id"
|
170
|
+
add_index "hosts", ["name"], :name => "index_hosts_on_name"
|
171
|
+
add_index "hosts", ["os_flavor"], :name => "index_hosts_on_os_flavor"
|
172
|
+
add_index "hosts", ["os_name"], :name => "index_hosts_on_os_name"
|
173
|
+
add_index "hosts", ["purpose"], :name => "index_hosts_on_purpose"
|
174
|
+
add_index "hosts", ["state"], :name => "index_hosts_on_state"
|
175
|
+
add_index "hosts", ["workspace_id", "address"], :name => "index_hosts_on_workspace_id_and_address", :unique => true
|
176
|
+
|
177
|
+
create_table "listeners", :force => true do |t|
|
178
|
+
t.datetime "created_at", :null => false
|
179
|
+
t.datetime "updated_at", :null => false
|
180
|
+
t.integer "workspace_id", :default => 1, :null => false
|
181
|
+
t.integer "task_id"
|
182
|
+
t.boolean "enabled", :default => true
|
183
|
+
t.text "owner"
|
184
|
+
t.text "payload"
|
185
|
+
t.text "address"
|
186
|
+
t.integer "port"
|
187
|
+
t.binary "options"
|
188
|
+
t.text "macro"
|
189
|
+
end
|
190
|
+
|
191
|
+
create_table "loots", :force => true do |t|
|
192
|
+
t.integer "workspace_id", :default => 1, :null => false
|
193
|
+
t.integer "host_id"
|
194
|
+
t.integer "service_id"
|
195
|
+
t.string "ltype", :limit => 512
|
196
|
+
t.string "path", :limit => 1024
|
197
|
+
t.text "data"
|
198
|
+
t.datetime "created_at", :null => false
|
199
|
+
t.datetime "updated_at", :null => false
|
200
|
+
t.string "content_type"
|
201
|
+
t.text "name"
|
202
|
+
t.text "info"
|
203
|
+
end
|
204
|
+
|
205
|
+
create_table "macros", :force => true do |t|
|
206
|
+
t.datetime "created_at", :null => false
|
207
|
+
t.datetime "updated_at", :null => false
|
208
|
+
t.text "owner"
|
209
|
+
t.text "name"
|
210
|
+
t.text "description"
|
211
|
+
t.binary "actions"
|
212
|
+
t.binary "prefs"
|
213
|
+
end
|
214
|
+
|
215
|
+
create_table "module_actions", :force => true do |t|
|
216
|
+
t.text "name", :null => false
|
217
|
+
t.integer "module_instance_id", :null => false
|
218
|
+
end
|
219
|
+
|
220
|
+
add_index "module_actions", ["module_instance_id", "name"], :name => "index_module_actions_on_module_instance_id_and_name", :unique => true
|
221
|
+
|
222
|
+
create_table "module_ancestors", :force => true do |t|
|
223
|
+
t.text "full_name", :null => false
|
224
|
+
t.string "handler_type"
|
225
|
+
t.string "module_type", :null => false
|
226
|
+
t.string "payload_type"
|
227
|
+
t.text "reference_name", :null => false
|
228
|
+
t.text "real_path", :null => false
|
229
|
+
t.datetime "real_path_modified_at", :null => false
|
230
|
+
t.string "real_path_sha1_hex_digest", :limit => 40, :null => false
|
231
|
+
t.integer "parent_path_id", :null => false
|
232
|
+
end
|
233
|
+
|
234
|
+
add_index "module_ancestors", ["full_name"], :name => "index_module_ancestors_on_full_name", :unique => true
|
235
|
+
add_index "module_ancestors", ["module_type", "reference_name"], :name => "index_module_ancestors_on_module_type_and_reference_name", :unique => true
|
236
|
+
add_index "module_ancestors", ["parent_path_id"], :name => "index_module_ancestors_on_parent_path_id"
|
237
|
+
add_index "module_ancestors", ["real_path"], :name => "index_module_ancestors_on_real_path", :unique => true
|
238
|
+
add_index "module_ancestors", ["real_path_sha1_hex_digest"], :name => "index_module_ancestors_on_real_path_sha1_hex_digest", :unique => true
|
239
|
+
|
240
|
+
create_table "module_architectures", :force => true do |t|
|
241
|
+
t.integer "architecture_id", :null => false
|
242
|
+
t.integer "module_instance_id", :null => false
|
243
|
+
end
|
244
|
+
|
245
|
+
add_index "module_architectures", ["module_instance_id", "architecture_id"], :name => "index_unique_module_architectures", :unique => true
|
246
|
+
|
247
|
+
create_table "module_authors", :force => true do |t|
|
248
|
+
t.integer "author_id", :null => false
|
249
|
+
t.integer "email_address_id"
|
250
|
+
t.integer "module_instance_id", :null => false
|
251
|
+
end
|
252
|
+
|
253
|
+
add_index "module_authors", ["author_id"], :name => "index_module_authors_on_author_id"
|
254
|
+
add_index "module_authors", ["email_address_id"], :name => "index_module_authors_on_email_address_id"
|
255
|
+
add_index "module_authors", ["module_instance_id", "author_id"], :name => "index_module_authors_on_module_instance_id_and_author_id", :unique => true
|
256
|
+
add_index "module_authors", ["module_instance_id"], :name => "index_module_authors_on_module_instance_id"
|
257
|
+
|
258
|
+
create_table "module_classes", :force => true do |t|
|
259
|
+
t.text "full_name", :null => false
|
260
|
+
t.string "module_type", :null => false
|
261
|
+
t.string "payload_type"
|
262
|
+
t.text "reference_name", :null => false
|
263
|
+
t.integer "rank_id", :null => false
|
264
|
+
end
|
265
|
+
|
266
|
+
add_index "module_classes", ["full_name"], :name => "index_module_classes_on_full_name", :unique => true
|
267
|
+
add_index "module_classes", ["module_type", "reference_name"], :name => "index_module_classes_on_module_type_and_reference_name", :unique => true
|
268
|
+
add_index "module_classes", ["rank_id"], :name => "index_module_classes_on_rank_id"
|
269
|
+
|
270
|
+
create_table "module_instances", :force => true do |t|
|
271
|
+
t.text "description", :null => false
|
272
|
+
t.date "disclosed_on"
|
273
|
+
t.string "license", :null => false
|
274
|
+
t.text "name", :null => false
|
275
|
+
t.boolean "privileged", :null => false
|
276
|
+
t.string "stance"
|
277
|
+
t.integer "default_action_id"
|
278
|
+
t.integer "default_target_id"
|
279
|
+
t.integer "module_class_id", :null => false
|
280
|
+
end
|
281
|
+
|
282
|
+
add_index "module_instances", ["default_action_id"], :name => "index_module_instances_on_default_action_id", :unique => true
|
283
|
+
add_index "module_instances", ["default_target_id"], :name => "index_module_instances_on_default_target_id", :unique => true
|
284
|
+
add_index "module_instances", ["module_class_id"], :name => "index_module_instances_on_module_class_id", :unique => true
|
285
|
+
|
286
|
+
create_table "module_paths", :force => true do |t|
|
287
|
+
t.string "gem"
|
288
|
+
t.string "name"
|
289
|
+
t.text "real_path", :null => false
|
290
|
+
end
|
291
|
+
|
292
|
+
add_index "module_paths", ["gem", "name"], :name => "index_module_paths_on_gem_and_name", :unique => true
|
293
|
+
add_index "module_paths", ["real_path"], :name => "index_module_paths_on_real_path", :unique => true
|
294
|
+
|
295
|
+
create_table "module_platforms", :force => true do |t|
|
296
|
+
t.integer "module_instance_id", :null => false
|
297
|
+
t.integer "platform_id", :null => false
|
298
|
+
end
|
299
|
+
|
300
|
+
add_index "module_platforms", ["module_instance_id", "platform_id"], :name => "index_module_platforms_on_module_instance_id_and_platform_id", :unique => true
|
301
|
+
|
302
|
+
create_table "module_ranks", :force => true do |t|
|
303
|
+
t.string "name", :null => false
|
304
|
+
t.integer "number", :null => false
|
305
|
+
end
|
306
|
+
|
307
|
+
add_index "module_ranks", ["name"], :name => "index_module_ranks_on_name", :unique => true
|
308
|
+
add_index "module_ranks", ["number"], :name => "index_module_ranks_on_number", :unique => true
|
309
|
+
|
310
|
+
create_table "module_references", :force => true do |t|
|
311
|
+
t.integer "module_instance_id", :null => false
|
312
|
+
t.integer "reference_id", :null => false
|
313
|
+
end
|
314
|
+
|
315
|
+
add_index "module_references", ["module_instance_id", "reference_id"], :name => "index_module_references_on_module_instance_id_and_reference_id", :unique => true
|
316
|
+
|
317
|
+
create_table "module_relationships", :force => true do |t|
|
318
|
+
t.integer "ancestor_id", :null => false
|
319
|
+
t.integer "descendant_id", :null => false
|
320
|
+
end
|
321
|
+
|
322
|
+
add_index "module_relationships", ["descendant_id", "ancestor_id"], :name => "index_module_relationships_on_descendant_id_and_ancestor_id", :unique => true
|
323
|
+
|
324
|
+
create_table "module_targets", :force => true do |t|
|
325
|
+
t.integer "index", :null => false
|
326
|
+
t.text "name", :null => false
|
327
|
+
t.integer "module_instance_id", :null => false
|
328
|
+
end
|
329
|
+
|
330
|
+
add_index "module_targets", ["module_instance_id", "index"], :name => "index_module_targets_on_module_instance_id_and_index", :unique => true
|
331
|
+
add_index "module_targets", ["module_instance_id", "name"], :name => "index_module_targets_on_module_instance_id_and_name", :unique => true
|
332
|
+
|
333
|
+
create_table "nexpose_consoles", :force => true do |t|
|
334
|
+
t.datetime "created_at", :null => false
|
335
|
+
t.datetime "updated_at", :null => false
|
336
|
+
t.boolean "enabled", :default => true
|
337
|
+
t.text "owner"
|
338
|
+
t.text "address"
|
339
|
+
t.integer "port", :default => 3780
|
340
|
+
t.text "username"
|
341
|
+
t.text "password"
|
342
|
+
t.text "status"
|
343
|
+
t.text "version"
|
344
|
+
t.text "cert"
|
345
|
+
t.binary "cached_sites"
|
346
|
+
t.text "name"
|
347
|
+
end
|
348
|
+
|
349
|
+
create_table "notes", :force => true do |t|
|
350
|
+
t.datetime "created_at"
|
351
|
+
t.string "ntype", :limit => 512
|
352
|
+
t.integer "workspace_id", :default => 1, :null => false
|
353
|
+
t.integer "service_id"
|
354
|
+
t.integer "host_id"
|
355
|
+
t.datetime "updated_at"
|
356
|
+
t.boolean "critical"
|
357
|
+
t.boolean "seen"
|
358
|
+
t.text "data"
|
359
|
+
end
|
360
|
+
|
361
|
+
add_index "notes", ["ntype"], :name => "index_notes_on_ntype"
|
362
|
+
|
363
|
+
create_table "platforms", :force => true do |t|
|
364
|
+
t.text "name", :null => false
|
365
|
+
end
|
366
|
+
|
367
|
+
add_index "platforms", ["name"], :name => "index_platforms_on_name", :unique => true
|
368
|
+
|
369
|
+
create_table "profiles", :force => true do |t|
|
370
|
+
t.datetime "created_at", :null => false
|
371
|
+
t.datetime "updated_at", :null => false
|
372
|
+
t.boolean "active", :default => true
|
373
|
+
t.text "name"
|
374
|
+
t.text "owner"
|
375
|
+
t.binary "settings"
|
376
|
+
end
|
377
|
+
|
378
|
+
create_table "references", :force => true do |t|
|
379
|
+
t.string "designation"
|
380
|
+
t.text "url"
|
381
|
+
t.integer "authority_id"
|
382
|
+
end
|
383
|
+
|
384
|
+
add_index "references", ["authority_id", "designation"], :name => "index_references_on_authority_id_and_designation", :unique => true
|
385
|
+
add_index "references", ["url"], :name => "index_references_on_url", :unique => true
|
386
|
+
|
387
|
+
create_table "report_templates", :force => true do |t|
|
388
|
+
t.integer "workspace_id", :default => 1, :null => false
|
389
|
+
t.string "created_by"
|
390
|
+
t.string "path", :limit => 1024
|
391
|
+
t.text "name"
|
392
|
+
t.datetime "created_at", :null => false
|
393
|
+
t.datetime "updated_at", :null => false
|
394
|
+
end
|
395
|
+
|
396
|
+
create_table "reports", :force => true do |t|
|
397
|
+
t.integer "workspace_id", :default => 1, :null => false
|
398
|
+
t.string "created_by"
|
399
|
+
t.string "rtype"
|
400
|
+
t.string "path", :limit => 1024
|
401
|
+
t.text "options"
|
402
|
+
t.datetime "created_at", :null => false
|
403
|
+
t.datetime "updated_at", :null => false
|
404
|
+
t.datetime "downloaded_at"
|
405
|
+
t.integer "task_id"
|
406
|
+
t.string "name", :limit => 63
|
407
|
+
end
|
408
|
+
|
409
|
+
create_table "routes", :force => true do |t|
|
410
|
+
t.integer "session_id"
|
411
|
+
t.string "subnet"
|
412
|
+
t.string "netmask"
|
413
|
+
end
|
414
|
+
|
415
|
+
create_table "services", :force => true do |t|
|
416
|
+
t.integer "host_id"
|
417
|
+
t.datetime "created_at"
|
418
|
+
t.integer "port", :null => false
|
419
|
+
t.string "proto", :limit => 16, :null => false
|
420
|
+
t.string "state"
|
421
|
+
t.string "name"
|
422
|
+
t.datetime "updated_at"
|
423
|
+
t.text "info"
|
424
|
+
end
|
425
|
+
|
426
|
+
add_index "services", ["name"], :name => "index_services_on_name"
|
427
|
+
add_index "services", ["port"], :name => "index_services_on_port"
|
428
|
+
add_index "services", ["proto"], :name => "index_services_on_proto"
|
429
|
+
add_index "services", ["state"], :name => "index_services_on_state"
|
430
|
+
|
431
|
+
create_table "session_events", :force => true do |t|
|
432
|
+
t.integer "session_id"
|
433
|
+
t.string "etype"
|
434
|
+
t.binary "command"
|
435
|
+
t.binary "output"
|
436
|
+
t.string "remote_path"
|
437
|
+
t.string "local_path"
|
438
|
+
t.datetime "created_at"
|
439
|
+
end
|
440
|
+
|
441
|
+
create_table "sessions", :force => true do |t|
|
442
|
+
t.integer "host_id"
|
443
|
+
t.string "stype"
|
444
|
+
t.string "via_exploit"
|
445
|
+
t.string "via_payload"
|
446
|
+
t.string "desc"
|
447
|
+
t.integer "port"
|
448
|
+
t.string "platform"
|
449
|
+
t.text "datastore"
|
450
|
+
t.datetime "opened_at", :null => false
|
451
|
+
t.datetime "closed_at"
|
452
|
+
t.string "close_reason"
|
453
|
+
t.integer "local_id"
|
454
|
+
t.datetime "last_seen"
|
455
|
+
end
|
456
|
+
|
457
|
+
create_table "tags", :force => true do |t|
|
458
|
+
t.integer "user_id"
|
459
|
+
t.string "name", :limit => 1024
|
460
|
+
t.text "desc"
|
461
|
+
t.boolean "report_summary", :default => false, :null => false
|
462
|
+
t.boolean "report_detail", :default => false, :null => false
|
463
|
+
t.boolean "critical", :default => false, :null => false
|
464
|
+
t.datetime "created_at", :null => false
|
465
|
+
t.datetime "updated_at", :null => false
|
466
|
+
end
|
467
|
+
|
468
|
+
create_table "task_creds", :force => true do |t|
|
469
|
+
t.integer "task_id", :null => false
|
470
|
+
t.integer "cred_id", :null => false
|
471
|
+
t.datetime "created_at", :null => false
|
472
|
+
t.datetime "updated_at", :null => false
|
473
|
+
end
|
474
|
+
|
475
|
+
add_index "task_creds", ["task_id", "cred_id"], :name => "index_task_creds_on_task_id_and_cred_id", :unique => true
|
476
|
+
|
477
|
+
create_table "task_hosts", :force => true do |t|
|
478
|
+
t.integer "task_id", :null => false
|
479
|
+
t.integer "host_id", :null => false
|
480
|
+
t.datetime "created_at", :null => false
|
481
|
+
t.datetime "updated_at", :null => false
|
482
|
+
end
|
483
|
+
|
484
|
+
add_index "task_hosts", ["task_id", "host_id"], :name => "index_task_hosts_on_task_id_and_host_id", :unique => true
|
485
|
+
|
486
|
+
create_table "task_services", :force => true do |t|
|
487
|
+
t.integer "task_id", :null => false
|
488
|
+
t.integer "service_id", :null => false
|
489
|
+
t.datetime "created_at", :null => false
|
490
|
+
t.datetime "updated_at", :null => false
|
491
|
+
end
|
492
|
+
|
493
|
+
add_index "task_services", ["task_id", "service_id"], :name => "index_task_services_on_task_id_and_service_id", :unique => true
|
494
|
+
|
495
|
+
create_table "task_sessions", :force => true do |t|
|
496
|
+
t.integer "task_id", :null => false
|
497
|
+
t.integer "session_id", :null => false
|
498
|
+
t.datetime "created_at", :null => false
|
499
|
+
t.datetime "updated_at", :null => false
|
500
|
+
end
|
501
|
+
|
502
|
+
add_index "task_sessions", ["task_id", "session_id"], :name => "index_task_sessions_on_task_id_and_session_id", :unique => true
|
503
|
+
|
504
|
+
create_table "tasks", :force => true do |t|
|
505
|
+
t.integer "workspace_id", :default => 1, :null => false
|
506
|
+
t.string "created_by"
|
507
|
+
t.string "module"
|
508
|
+
t.datetime "completed_at"
|
509
|
+
t.string "path", :limit => 1024
|
510
|
+
t.string "info"
|
511
|
+
t.string "description"
|
512
|
+
t.integer "progress"
|
513
|
+
t.text "options"
|
514
|
+
t.text "error"
|
515
|
+
t.datetime "created_at", :null => false
|
516
|
+
t.datetime "updated_at", :null => false
|
517
|
+
t.text "result"
|
518
|
+
t.string "module_uuid", :limit => 8
|
519
|
+
t.binary "settings"
|
520
|
+
end
|
521
|
+
|
522
|
+
create_table "users", :force => true do |t|
|
523
|
+
t.string "username"
|
524
|
+
t.string "crypted_password"
|
525
|
+
t.string "password_salt"
|
526
|
+
t.string "persistence_token"
|
527
|
+
t.datetime "created_at", :null => false
|
528
|
+
t.datetime "updated_at", :null => false
|
529
|
+
t.string "fullname"
|
530
|
+
t.string "email"
|
531
|
+
t.string "phone"
|
532
|
+
t.string "company"
|
533
|
+
t.string "prefs", :limit => 524288
|
534
|
+
t.boolean "admin", :default => true, :null => false
|
535
|
+
end
|
536
|
+
|
537
|
+
create_table "vuln_attempts", :force => true do |t|
|
538
|
+
t.integer "vuln_id"
|
539
|
+
t.datetime "attempted_at"
|
540
|
+
t.boolean "exploited"
|
541
|
+
t.string "fail_reason"
|
542
|
+
t.string "username"
|
543
|
+
t.text "module"
|
544
|
+
t.integer "session_id"
|
545
|
+
t.integer "loot_id"
|
546
|
+
t.text "fail_detail"
|
547
|
+
end
|
548
|
+
|
549
|
+
create_table "vuln_details", :force => true do |t|
|
550
|
+
t.integer "vuln_id"
|
551
|
+
t.float "cvss_score"
|
552
|
+
t.string "cvss_vector"
|
553
|
+
t.string "title"
|
554
|
+
t.text "description"
|
555
|
+
t.text "solution"
|
556
|
+
t.binary "proof"
|
557
|
+
t.integer "nx_console_id"
|
558
|
+
t.integer "nx_device_id"
|
559
|
+
t.string "nx_vuln_id"
|
560
|
+
t.float "nx_severity"
|
561
|
+
t.float "nx_pci_severity"
|
562
|
+
t.datetime "nx_published"
|
563
|
+
t.datetime "nx_added"
|
564
|
+
t.datetime "nx_modified"
|
565
|
+
t.text "nx_tags"
|
566
|
+
t.text "nx_vuln_status"
|
567
|
+
t.text "nx_proof_key"
|
568
|
+
t.string "src"
|
569
|
+
t.integer "nx_scan_id"
|
570
|
+
t.datetime "nx_vulnerable_since"
|
571
|
+
t.string "nx_pci_compliance_status"
|
572
|
+
end
|
573
|
+
|
574
|
+
create_table "vuln_references", :force => true do |t|
|
575
|
+
t.integer "reference_id", :null => false
|
576
|
+
t.integer "vuln_id", :null => false
|
577
|
+
end
|
578
|
+
|
579
|
+
add_index "vuln_references", ["vuln_id", "reference_id"], :name => "index_vuln_references_on_vuln_id_and_reference_id", :unique => true
|
580
|
+
|
581
|
+
create_table "vulns", :force => true do |t|
|
582
|
+
t.integer "host_id"
|
583
|
+
t.integer "service_id"
|
584
|
+
t.datetime "created_at"
|
585
|
+
t.string "name"
|
586
|
+
t.datetime "updated_at"
|
587
|
+
t.string "info", :limit => 65536
|
588
|
+
t.datetime "exploited_at"
|
589
|
+
t.integer "vuln_detail_count", :default => 0
|
590
|
+
t.integer "vuln_attempt_count", :default => 0
|
591
|
+
end
|
592
|
+
|
593
|
+
add_index "vulns", ["name"], :name => "index_vulns_on_name"
|
594
|
+
|
595
|
+
create_table "web_forms", :force => true do |t|
|
596
|
+
t.integer "web_site_id", :null => false
|
597
|
+
t.datetime "created_at", :null => false
|
598
|
+
t.datetime "updated_at", :null => false
|
599
|
+
t.text "path"
|
600
|
+
t.string "method", :limit => 1024
|
601
|
+
t.text "params"
|
602
|
+
t.text "query"
|
603
|
+
end
|
604
|
+
|
605
|
+
add_index "web_forms", ["path"], :name => "index_web_forms_on_path"
|
606
|
+
|
607
|
+
create_table "web_pages", :force => true do |t|
|
608
|
+
t.integer "web_site_id", :null => false
|
609
|
+
t.datetime "created_at", :null => false
|
610
|
+
t.datetime "updated_at", :null => false
|
611
|
+
t.text "path"
|
612
|
+
t.text "query"
|
613
|
+
t.integer "code", :null => false
|
614
|
+
t.text "cookie"
|
615
|
+
t.text "auth"
|
616
|
+
t.text "ctype"
|
617
|
+
t.datetime "mtime"
|
618
|
+
t.text "location"
|
619
|
+
t.text "headers"
|
620
|
+
t.binary "body"
|
621
|
+
t.binary "request"
|
622
|
+
end
|
623
|
+
|
624
|
+
add_index "web_pages", ["path"], :name => "index_web_pages_on_path"
|
625
|
+
add_index "web_pages", ["query"], :name => "index_web_pages_on_query"
|
626
|
+
|
627
|
+
create_table "web_sites", :force => true do |t|
|
628
|
+
t.integer "service_id", :null => false
|
629
|
+
t.datetime "created_at", :null => false
|
630
|
+
t.datetime "updated_at", :null => false
|
631
|
+
t.string "vhost", :limit => 2048
|
632
|
+
t.text "comments"
|
633
|
+
t.text "options"
|
634
|
+
end
|
635
|
+
|
636
|
+
add_index "web_sites", ["comments"], :name => "index_web_sites_on_comments"
|
637
|
+
add_index "web_sites", ["options"], :name => "index_web_sites_on_options"
|
638
|
+
add_index "web_sites", ["vhost"], :name => "index_web_sites_on_vhost"
|
639
|
+
|
640
|
+
create_table "web_vulns", :force => true do |t|
|
641
|
+
t.integer "web_site_id", :null => false
|
642
|
+
t.datetime "created_at", :null => false
|
643
|
+
t.datetime "updated_at", :null => false
|
644
|
+
t.text "path", :null => false
|
645
|
+
t.string "method", :limit => 1024, :null => false
|
646
|
+
t.text "params", :null => false
|
647
|
+
t.text "pname", :null => false
|
648
|
+
t.integer "risk", :null => false
|
649
|
+
t.string "name", :limit => 1024, :null => false
|
650
|
+
t.text "query"
|
651
|
+
t.text "category", :null => false
|
652
|
+
t.integer "confidence", :null => false
|
653
|
+
t.text "description"
|
654
|
+
t.text "blame"
|
655
|
+
t.binary "request"
|
656
|
+
t.binary "proof", :null => false
|
657
|
+
t.string "owner"
|
658
|
+
t.text "payload"
|
659
|
+
end
|
660
|
+
|
661
|
+
add_index "web_vulns", ["method"], :name => "index_web_vulns_on_method"
|
662
|
+
add_index "web_vulns", ["name"], :name => "index_web_vulns_on_name"
|
663
|
+
add_index "web_vulns", ["path"], :name => "index_web_vulns_on_path"
|
664
|
+
|
665
|
+
create_table "wmap_requests", :force => true do |t|
|
666
|
+
t.string "host"
|
667
|
+
t.string "address", :limit => nil
|
668
|
+
t.integer "port"
|
669
|
+
t.integer "ssl"
|
670
|
+
t.string "meth", :limit => 32
|
671
|
+
t.text "path"
|
672
|
+
t.text "headers"
|
673
|
+
t.text "query"
|
674
|
+
t.text "body"
|
675
|
+
t.string "respcode", :limit => 16
|
676
|
+
t.text "resphead"
|
677
|
+
t.text "response"
|
678
|
+
t.datetime "created_at"
|
679
|
+
t.datetime "updated_at"
|
680
|
+
end
|
681
|
+
|
682
|
+
create_table "wmap_targets", :force => true do |t|
|
683
|
+
t.string "host"
|
684
|
+
t.string "address", :limit => nil
|
685
|
+
t.integer "port"
|
686
|
+
t.integer "ssl"
|
687
|
+
t.integer "selected"
|
688
|
+
t.datetime "created_at"
|
689
|
+
t.datetime "updated_at"
|
690
|
+
end
|
691
|
+
|
692
|
+
create_table "workspace_members", :id => false, :force => true do |t|
|
693
|
+
t.integer "workspace_id", :null => false
|
694
|
+
t.integer "user_id", :null => false
|
695
|
+
end
|
696
|
+
|
697
|
+
create_table "workspaces", :force => true do |t|
|
698
|
+
t.string "name"
|
699
|
+
t.datetime "created_at", :null => false
|
700
|
+
t.datetime "updated_at", :null => false
|
701
|
+
t.string "boundary", :limit => 4096
|
702
|
+
t.string "description", :limit => 4096
|
703
|
+
t.integer "owner_id"
|
704
|
+
t.boolean "limit_to_network", :default => false, :null => false
|
705
|
+
end
|
706
|
+
|
707
|
+
end
|