metasploit_data_models 1.0.0.pre.rails.pre.4.0b → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -2
- data/.travis.yml +6 -3
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +10 -52
- data/Gemfile +4 -6
- data/RELEASING.md +88 -0
- data/Rakefile +23 -0
- data/UPGRADING.md +1 -0
- data/app/models/mdm/api_key.rb +41 -1
- data/app/models/mdm/client.rb +41 -1
- data/app/models/mdm/cred.rb +116 -28
- data/app/models/mdm/event.rb +47 -0
- data/app/models/mdm/exploit_attempt.rb +65 -16
- data/app/models/mdm/exploited_host.rb +27 -0
- data/app/models/mdm/host_detail.rb +44 -0
- data/app/models/mdm/host_tag.rb +6 -8
- data/app/models/mdm/listener.rb +52 -0
- data/app/models/mdm/macro.rb +42 -0
- data/app/models/mdm/mod_ref.rb +21 -1
- data/app/models/mdm/module/action.rb +15 -0
- data/app/models/mdm/module/arch.rb +10 -0
- data/app/models/mdm/module/author.rb +17 -1
- data/app/models/mdm/module/mixin.rb +13 -0
- data/app/models/mdm/module/platform.rb +11 -0
- data/app/models/mdm/module/target.rb +18 -0
- data/app/models/mdm/nexpose_console.rb +82 -4
- data/app/models/mdm/profile.rb +36 -0
- data/app/models/mdm/route.rb +16 -4
- data/app/models/mdm/session_event.rb +32 -0
- data/app/models/mdm/tag.rb +48 -9
- data/app/models/mdm/task.rb +85 -46
- data/app/models/mdm/task_cred.rb +29 -0
- data/app/models/mdm/task_host.rb +25 -0
- data/app/models/mdm/task_service.rb +25 -0
- data/app/models/mdm/task_session.rb +25 -0
- data/app/models/mdm/user.rb +192 -6
- data/app/models/mdm/vuln_attempt.rb +37 -12
- data/app/models/mdm/vuln_detail.rb +138 -5
- data/app/models/mdm/vuln_ref.rb +3 -0
- data/app/models/mdm/web_form.rb +34 -0
- data/app/models/mdm/web_page.rb +69 -0
- data/app/models/mdm/web_site.rb +50 -0
- data/app/models/mdm/wmap_request.rb +85 -0
- data/app/models/mdm/wmap_target.rb +40 -0
- data/app/models/mdm/workspace.rb +160 -17
- data/app/models/metasploit_data_models/automatic_exploitation/match.rb +13 -23
- data/app/models/metasploit_data_models/automatic_exploitation/match_result.rb +25 -4
- data/app/models/metasploit_data_models/automatic_exploitation/match_set.rb +15 -4
- data/app/models/metasploit_data_models/automatic_exploitation/run.rb +7 -3
- data/app/models/metasploit_data_models/ip_address/v4/segmented.rb +1 -1
- data/app/models/metasploit_data_models/module_run.rb +1 -1
- data/app/models/metasploit_data_models/search/visitor/where.rb +1 -1
- data/app/validators/ip_format_validator.rb +4 -0
- data/app/validators/parameters_validator.rb +12 -0
- data/app/validators/password_is_strong_validator.rb +10 -1
- data/lib/mdm/host/operating_system_normalization.rb +7 -10
- data/lib/metasploit_data_models.rb +4 -0
- data/lib/metasploit_data_models/automatic_exploitation.rb +25 -0
- data/lib/metasploit_data_models/engine.rb +2 -0
- data/lib/metasploit_data_models/serialized_prefs.rb +6 -0
- data/lib/metasploit_data_models/version.rb +30 -7
- data/metasploit_data_models.gemspec +9 -2
- data/spec/app/models/mdm/api_key_spec.rb +1 -3
- data/spec/app/models/mdm/client_spec.rb +9 -11
- data/spec/app/models/mdm/cred_spec.rb +42 -54
- data/spec/app/models/mdm/event_spec.rb +22 -24
- data/spec/app/models/mdm/exploit_attempt_spec.rb +19 -21
- data/spec/app/models/mdm/exploited_host_spec.rb +11 -13
- data/spec/app/models/mdm/host_detail_spec.rb +15 -17
- data/spec/app/models/mdm/host_spec.rb +262 -260
- data/spec/app/models/mdm/host_tag_spec.rb +6 -8
- data/spec/app/models/mdm/listener_spec.rb +30 -32
- data/spec/app/models/mdm/loot_spec.rb +21 -23
- data/spec/app/models/mdm/macro_spec.rb +1 -3
- data/spec/app/models/mdm/mod_ref_spec.rb +1 -3
- data/spec/app/models/mdm/module/action_spec.rb +8 -10
- data/spec/app/models/mdm/module/arch_spec.rb +8 -10
- data/spec/app/models/mdm/module/author_spec.rb +19 -14
- data/spec/app/models/mdm/module/detail_spec.rb +184 -75
- data/spec/app/models/mdm/module/mixin_spec.rb +8 -10
- data/spec/app/models/mdm/module/platform_spec.rb +8 -10
- data/spec/app/models/mdm/module/ref_spec.rb +8 -10
- data/spec/app/models/mdm/module/target_spec.rb +10 -12
- data/spec/app/models/mdm/nexpose_console_spec.rb +35 -37
- data/spec/app/models/mdm/note_spec.rb +23 -25
- data/spec/app/models/mdm/profile_spec.rb +1 -3
- data/spec/app/models/mdm/ref_spec.rb +9 -12
- data/spec/app/models/mdm/route_spec.rb +6 -8
- data/spec/app/models/mdm/service_spec.rb +38 -40
- data/spec/app/models/mdm/session_event_spec.rb +10 -12
- data/spec/app/models/mdm/session_spec.rb +13 -15
- data/spec/app/models/mdm/tag_spec.rb +29 -30
- data/spec/app/models/mdm/task_cred_spec.rb +9 -11
- data/spec/app/models/mdm/task_host_spec.rb +9 -11
- data/spec/app/models/mdm/task_service_spec.rb +9 -11
- data/spec/app/models/mdm/task_session_spec.rb +7 -9
- data/spec/app/models/mdm/task_spec.rb +27 -29
- data/spec/app/models/mdm/user_spec.rb +17 -19
- data/spec/app/models/mdm/vuln_attempt_spec.rb +14 -16
- data/spec/app/models/mdm/vuln_detail_spec.rb +26 -28
- data/spec/app/models/mdm/vuln_ref_spec.rb +8 -10
- data/spec/app/models/mdm/vuln_spec.rb +24 -26
- data/spec/app/models/mdm/web_form_spec.rb +11 -13
- data/spec/app/models/mdm/web_page_spec.rb +19 -21
- data/spec/app/models/mdm/web_site_spec.rb +21 -23
- data/spec/app/models/mdm/web_vuln_spec.rb +63 -65
- data/spec/app/models/mdm/wmap_request_spec.rb +1 -3
- data/spec/app/models/mdm/wmap_target_spec.rb +1 -3
- data/spec/app/models/mdm/workspace_spec.rb +97 -100
- data/spec/app/models/metasploit_data_models/automatic_exploitation/match_result_spec.rb +3 -5
- data/spec/app/models/metasploit_data_models/automatic_exploitation/match_set_spec.rb +13 -15
- data/spec/app/models/metasploit_data_models/automatic_exploitation/match_spec.rb +1 -3
- data/spec/app/models/metasploit_data_models/automatic_exploitation/run_spec.rb +1 -3
- data/spec/app/models/metasploit_data_models/ip_address/v4/cidr_spec.rb +10 -12
- data/spec/app/models/metasploit_data_models/ip_address/v4/nmap_spec.rb +4 -6
- data/spec/app/models/metasploit_data_models/ip_address/v4/range_spec.rb +21 -23
- data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list_spec.rb +9 -11
- data/spec/app/models/metasploit_data_models/ip_address/v4/segment/nmap/range_spec.rb +21 -23
- data/spec/app/models/metasploit_data_models/ip_address/v4/segment/segmented_spec.rb +4 -6
- data/spec/app/models/metasploit_data_models/ip_address/v4/segment/single_spec.rb +22 -15
- data/spec/app/models/metasploit_data_models/ip_address/v4/single_spec.rb +4 -6
- data/spec/app/models/metasploit_data_models/module_run_spec.rb +1 -3
- data/spec/app/models/metasploit_data_models/search/operation/ip_address_spec.rb +18 -20
- data/spec/app/models/metasploit_data_models/search/operation/port/number_spec.rb +6 -8
- data/spec/app/models/metasploit_data_models/search/operation/port/range_spec.rb +8 -10
- data/spec/app/models/metasploit_data_models/search/operation/range_spec.rb +8 -10
- data/spec/app/models/metasploit_data_models/search/operator/ip_address_spec.rb +2 -4
- data/spec/app/models/metasploit_data_models/search/operator/multitext_spec.rb +8 -10
- data/spec/app/models/metasploit_data_models/search/operator/port/list_spec.rb +6 -8
- data/spec/app/models/metasploit_data_models/search/visitor/attribute_spec.rb +9 -11
- data/spec/app/models/metasploit_data_models/search/visitor/includes_spec.rb +5 -7
- data/spec/app/models/metasploit_data_models/search/visitor/joins_spec.rb +17 -19
- data/spec/app/models/metasploit_data_models/search/visitor/method_spec.rb +5 -7
- data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +61 -23
- data/spec/app/models/metasploit_data_models/search/visitor/where_spec.rb +8 -10
- data/spec/app/validators/parameters_validator_spec.rb +29 -29
- data/spec/app/validators/password_is_strong_validator_spec.rb +54 -46
- data/spec/lib/base64_serializer_spec.rb +19 -21
- data/spec/lib/ipaddr_spec.rb +1 -3
- data/spec/lib/metasploit_data_models/ip_address/cidr_spec.rb +18 -12
- data/spec/lib/metasploit_data_models/ip_address/range_spec.rb +4 -6
- data/spec/lib/metasploit_data_models/match/child_spec.rb +2 -4
- data/spec/lib/metasploit_data_models/match/parent_spec.rb +4 -6
- data/spec/lib/metasploit_data_models/version_spec.rb +3 -139
- data/spec/lib/metasploit_data_models_spec.rb +4 -0
- data/spec/spec_helper.rb +86 -12
- data/spec/support/shared/examples/mdm/module/detail/does_not_support_stance_with_mtype.rb +2 -2
- data/spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb +4 -4
- data/spec/support/shared/examples/metasploit_data_models/search/operation/ipaddress/match.rb +2 -2
- data/spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_children.rb +5 -5
- data/spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb +5 -5
- data/spec/support/shared/examples/metasploit_data_models/search/visitor/where/visit/with_equality.rb +3 -3
- data/spec/support/shared/examples/metasploit_data_models/search/visitor/where/visit/with_metasploit_model_search_group_base.rb +7 -6
- metadata +74 -14
- data/app/models/metasploit_data_models/automatic_exploitation.rb +0 -16
- data/lib/tasks/yard.rake +0 -33
@@ -1,16 +0,0 @@
|
|
1
|
-
module MetasploitDataModels::AutomaticExploitation
|
2
|
-
extend ActiveSupport::Autoload
|
3
|
-
|
4
|
-
autoload :Match
|
5
|
-
autoload :MatchResult
|
6
|
-
autoload :MatchSet
|
7
|
-
autoload :Run
|
8
|
-
|
9
|
-
#
|
10
|
-
# Module Methods
|
11
|
-
#
|
12
|
-
|
13
|
-
def self.table_name_prefix
|
14
|
-
'automatic_exploitation_'
|
15
|
-
end
|
16
|
-
end
|
data/lib/tasks/yard.rake
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# @note All options not specific to any given rake task should go in the .yardopts file so they are available to both
|
2
|
-
# the below rake tasks and when invoking `yard` from the command line
|
3
|
-
|
4
|
-
if defined? YARD
|
5
|
-
namespace :yard do
|
6
|
-
YARD::Rake::YardocTask.new(:doc) do |t|
|
7
|
-
# --no-stats here as 'stats' task called after will print fuller stats
|
8
|
-
t.options = ['--no-stats']
|
9
|
-
|
10
|
-
t.after = Proc.new {
|
11
|
-
Rake::Task['yard:stats'].execute
|
12
|
-
}
|
13
|
-
end
|
14
|
-
|
15
|
-
# need environment so that yard templates can load ActiveRecord::Base subclasses for Entity-Relationship Diagrams
|
16
|
-
task :doc => :eager_load
|
17
|
-
|
18
|
-
desc "Shows stats for YARD Documentation including listing undocumented modules, classes, constants, and methods"
|
19
|
-
task :stats => :environment do
|
20
|
-
stats = YARD::CLI::Stats.new
|
21
|
-
stats.run('--compact', '--list-undoc')
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# @todo Figure out how to just clone description from yard:doc
|
26
|
-
desc "Generate YARD documentation"
|
27
|
-
# allow calling namespace to as a task that goes to default task for namespace
|
28
|
-
task :yard => ['yard:doc']
|
29
|
-
end
|
30
|
-
|
31
|
-
task eager_load: :environment do
|
32
|
-
Rails.application.eager_load!
|
33
|
-
end
|