metasploit_data_models 0.6.16 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +6 -0
- data/README.md +1 -1
- data/db/migrate/20110422000000_convert_binary.rb +1 -0
- data/db/migrate/20130423211152_add_creds_counter_cache.rb +6 -1
- data/lib/metasploit_data_models/version.rb +1 -1
- data/metasploit_data_models.gemspec +22 -5
- data/spec/dummy/config/database.yml.travis +22 -0
- data/spec/dummy/db/schema.rb +5 -4
- metadata +43 -16
- checksums.yaml +0 -15
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -7,7 +7,12 @@ class AddCredsCounterCache < ActiveRecord::Migration
|
|
7
7
|
Mdm::Cred.all.each {|c| cred_service_ids << c.service_id}
|
8
8
|
cred_service_ids.each do |service_id|
|
9
9
|
#Mdm::Host.reset_counters(Mdm::Service.find(service_id).host.id, :creds)
|
10
|
-
|
10
|
+
begin
|
11
|
+
host = Mdm::Service.find(service_id).host
|
12
|
+
rescue
|
13
|
+
next
|
14
|
+
end
|
15
|
+
next if host.nil? # This can happen with orphan creds/services
|
11
16
|
host.cred_count = host.creds.count
|
12
17
|
host.save
|
13
18
|
end
|
@@ -4,5 +4,5 @@ module MetasploitDataModels
|
|
4
4
|
# metasploit-framework/data/sql/migrate to db/migrate in this project, not all models have specs that verify the
|
5
5
|
# migrations (with have_db_column and have_db_index) and certain models may not be shared between metasploit-framework
|
6
6
|
# and pro, so models may be removed in the future. Because of the unstable API the version should remain below 1.0.0
|
7
|
-
VERSION = '0.
|
7
|
+
VERSION = '0.7.0'
|
8
8
|
end
|
@@ -6,10 +6,12 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'metasploit_data_models'
|
7
7
|
s.version = MetasploitDataModels::VERSION
|
8
8
|
s.authors = [
|
9
|
-
|
10
|
-
|
9
|
+
'Samuel Huckins',
|
10
|
+
'Luke Imhoff',
|
11
|
+
'Trevor Rosen'
|
11
12
|
]
|
12
13
|
s.email = [
|
14
|
+
'shuckins@rapid7.com',
|
13
15
|
'luke_imhoff@rapid7.com',
|
14
16
|
'trevor_rosen@rapid7.com'
|
15
17
|
]
|
@@ -24,8 +26,7 @@ Gem::Specification.new do |s|
|
|
24
26
|
|
25
27
|
# ---- Dependencies ----
|
26
28
|
s.add_development_dependency 'rake'
|
27
|
-
|
28
|
-
s.add_development_dependency 'redcarpet'
|
29
|
+
|
29
30
|
# documentation
|
30
31
|
s.add_development_dependency 'yard'
|
31
32
|
# debugging
|
@@ -33,5 +34,21 @@ Gem::Specification.new do |s|
|
|
33
34
|
|
34
35
|
s.add_runtime_dependency 'activerecord', '>= 3.2.13'
|
35
36
|
s.add_runtime_dependency 'activesupport'
|
36
|
-
|
37
|
+
|
38
|
+
if RUBY_PLATFORM =~ /java/
|
39
|
+
# markdown formatting for yard
|
40
|
+
s.add_development_dependency 'kramdown'
|
41
|
+
|
42
|
+
s.add_runtime_dependency 'jdbc-postgres'
|
43
|
+
s.add_runtime_dependency 'activerecord-jdbcpostgresql-adapter'
|
44
|
+
|
45
|
+
s.platform = Gem::Platform::JAVA
|
46
|
+
else
|
47
|
+
# markdown formatting for yard
|
48
|
+
s.add_development_dependency 'redcarpet'
|
49
|
+
|
50
|
+
s.add_runtime_dependency 'pg'
|
51
|
+
|
52
|
+
s.platform = Gem::Platform::RUBY
|
53
|
+
end
|
37
54
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# @note This file is only for use in travis-ci. If you need to make a `spec/dummy/config/database.yml` for running
|
2
|
+
# rake, rake spec, or rspec locally, please customize `spec/dummy/config/database.yml.example`.
|
3
|
+
#
|
4
|
+
# @example Customizing config/database.yml.example
|
5
|
+
# cp spec/dummy/config/database.yml.example spec/dummy/config/database.yml
|
6
|
+
# # update password fields for each environment's user
|
7
|
+
|
8
|
+
# Using the postgres user locally without a host and port is the supported configuration from Travis-CI
|
9
|
+
#
|
10
|
+
# @see http://about.travis-ci.org/docs/user/database-setup/#PostgreSQL
|
11
|
+
development: &pgsql
|
12
|
+
adapter: postgresql
|
13
|
+
database: metasploit_data_models_development
|
14
|
+
username: postgres
|
15
|
+
pool: 5
|
16
|
+
timeout: 5
|
17
|
+
|
18
|
+
# Warning: The database defined as "test" will be erased and re-generated from your development database when you run
|
19
|
+
# `rake`. Do not set this db to the same as development or production.
|
20
|
+
test:
|
21
|
+
<<: *pgsql
|
22
|
+
database: metasploit_data_models_test
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20130423211152) do
|
15
15
|
|
16
16
|
create_table "api_keys", :force => true do |t|
|
17
17
|
t.text "token"
|
@@ -135,7 +135,7 @@ ActiveRecord::Schema.define(:version => 20130228214900) do
|
|
135
135
|
|
136
136
|
create_table "hosts", :force => true do |t|
|
137
137
|
t.datetime "created_at"
|
138
|
-
t.string "address"
|
138
|
+
t.string "address"
|
139
139
|
t.string "mac"
|
140
140
|
t.string "comm"
|
141
141
|
t.string "name"
|
@@ -157,6 +157,7 @@ ActiveRecord::Schema.define(:version => 20130228214900) do
|
|
157
157
|
t.integer "service_count", :default => 0
|
158
158
|
t.integer "host_detail_count", :default => 0
|
159
159
|
t.integer "exploit_attempt_count", :default => 0
|
160
|
+
t.integer "cred_count", :default => 0
|
160
161
|
end
|
161
162
|
|
162
163
|
add_index "hosts", ["address"], :name => "index_hosts_on_address"
|
@@ -595,7 +596,7 @@ ActiveRecord::Schema.define(:version => 20130228214900) do
|
|
595
596
|
|
596
597
|
create_table "wmap_requests", :force => true do |t|
|
597
598
|
t.string "host"
|
598
|
-
t.string "address"
|
599
|
+
t.string "address"
|
599
600
|
t.integer "port"
|
600
601
|
t.integer "ssl"
|
601
602
|
t.string "meth", :limit => 32
|
@@ -612,7 +613,7 @@ ActiveRecord::Schema.define(:version => 20130228214900) do
|
|
612
613
|
|
613
614
|
create_table "wmap_targets", :force => true do |t|
|
614
615
|
t.string "host"
|
615
|
-
t.string "address"
|
616
|
+
t.string "address"
|
616
617
|
t.integer "port"
|
617
618
|
t.integer "ssl"
|
618
619
|
t.integer "selected"
|
metadata
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
8
|
+
- Samuel Huckins
|
7
9
|
- Luke Imhoff
|
8
10
|
- Trevor Rosen
|
9
11
|
autorequire:
|
10
12
|
bindir: bin
|
11
13
|
cert_chain: []
|
12
|
-
date: 2013-
|
14
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
13
15
|
dependencies:
|
14
16
|
- !ruby/object:Gem::Dependency
|
15
17
|
name: rake
|
16
18
|
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
17
20
|
requirements:
|
18
21
|
- - ! '>='
|
19
22
|
- !ruby/object:Gem::Version
|
@@ -21,13 +24,15 @@ dependencies:
|
|
21
24
|
type: :development
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
24
28
|
requirements:
|
25
29
|
- - ! '>='
|
26
30
|
- !ruby/object:Gem::Version
|
27
31
|
version: '0'
|
28
32
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
33
|
+
name: yard
|
30
34
|
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
31
36
|
requirements:
|
32
37
|
- - ! '>='
|
33
38
|
- !ruby/object:Gem::Version
|
@@ -35,13 +40,15 @@ dependencies:
|
|
35
40
|
type: :development
|
36
41
|
prerelease: false
|
37
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
38
44
|
requirements:
|
39
45
|
- - ! '>='
|
40
46
|
- !ruby/object:Gem::Version
|
41
47
|
version: '0'
|
42
48
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
49
|
+
name: pry
|
44
50
|
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
45
52
|
requirements:
|
46
53
|
- - ! '>='
|
47
54
|
- !ruby/object:Gem::Version
|
@@ -49,48 +56,55 @@ dependencies:
|
|
49
56
|
type: :development
|
50
57
|
prerelease: false
|
51
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
52
60
|
requirements:
|
53
61
|
- - ! '>='
|
54
62
|
- !ruby/object:Gem::Version
|
55
63
|
version: '0'
|
56
64
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
65
|
+
name: activerecord
|
58
66
|
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
59
68
|
requirements:
|
60
69
|
- - ! '>='
|
61
70
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
63
|
-
type: :
|
71
|
+
version: 3.2.13
|
72
|
+
type: :runtime
|
64
73
|
prerelease: false
|
65
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
66
76
|
requirements:
|
67
77
|
- - ! '>='
|
68
78
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
79
|
+
version: 3.2.13
|
70
80
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
81
|
+
name: activesupport
|
72
82
|
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
73
84
|
requirements:
|
74
85
|
- - ! '>='
|
75
86
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
87
|
+
version: '0'
|
77
88
|
type: :runtime
|
78
89
|
prerelease: false
|
79
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
80
92
|
requirements:
|
81
93
|
- - ! '>='
|
82
94
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
95
|
+
version: '0'
|
84
96
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
97
|
+
name: redcarpet
|
86
98
|
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
87
100
|
requirements:
|
88
101
|
- - ! '>='
|
89
102
|
- !ruby/object:Gem::Version
|
90
103
|
version: '0'
|
91
|
-
type: :
|
104
|
+
type: :development
|
92
105
|
prerelease: false
|
93
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
94
108
|
requirements:
|
95
109
|
- - ! '>='
|
96
110
|
- !ruby/object:Gem::Version
|
@@ -98,6 +112,7 @@ dependencies:
|
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: pg
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
101
116
|
requirements:
|
102
117
|
- - ! '>='
|
103
118
|
- !ruby/object:Gem::Version
|
@@ -105,6 +120,7 @@ dependencies:
|
|
105
120
|
type: :runtime
|
106
121
|
prerelease: false
|
107
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
108
124
|
requirements:
|
109
125
|
- - ! '>='
|
110
126
|
- !ruby/object:Gem::Version
|
@@ -112,6 +128,7 @@ dependencies:
|
|
112
128
|
description: Implements minimal ActiveRecord models and database helper code used
|
113
129
|
in both the Metasploit Framework (MSF) and Metasploit commercial editions.
|
114
130
|
email:
|
131
|
+
- shuckins@rapid7.com
|
115
132
|
- luke_imhoff@rapid7.com
|
116
133
|
- trevor_rosen@rapid7.com
|
117
134
|
executables:
|
@@ -122,6 +139,7 @@ files:
|
|
122
139
|
- .gitignore
|
123
140
|
- .rspec
|
124
141
|
- .simplecov
|
142
|
+
- .travis.yml
|
125
143
|
- .yardopts
|
126
144
|
- Gemfile
|
127
145
|
- LICENSE
|
@@ -294,6 +312,7 @@ files:
|
|
294
312
|
- spec/dummy/config/application.rb
|
295
313
|
- spec/dummy/config/boot.rb
|
296
314
|
- spec/dummy/config/database.yml.example
|
315
|
+
- spec/dummy/config/database.yml.travis
|
297
316
|
- spec/dummy/config/environment.rb
|
298
317
|
- spec/dummy/config/environments/development.rb
|
299
318
|
- spec/dummy/config/environments/production.rb
|
@@ -332,26 +351,33 @@ files:
|
|
332
351
|
- spec/spec_helper.rb
|
333
352
|
homepage: ''
|
334
353
|
licenses: []
|
335
|
-
metadata: {}
|
336
354
|
post_install_message:
|
337
355
|
rdoc_options: []
|
338
356
|
require_paths:
|
339
357
|
- lib
|
340
358
|
required_ruby_version: !ruby/object:Gem::Requirement
|
359
|
+
none: false
|
341
360
|
requirements:
|
342
361
|
- - ! '>='
|
343
362
|
- !ruby/object:Gem::Version
|
344
363
|
version: '0'
|
364
|
+
segments:
|
365
|
+
- 0
|
366
|
+
hash: 1381775602727200262
|
345
367
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
368
|
+
none: false
|
346
369
|
requirements:
|
347
370
|
- - ! '>='
|
348
371
|
- !ruby/object:Gem::Version
|
349
372
|
version: '0'
|
373
|
+
segments:
|
374
|
+
- 0
|
375
|
+
hash: 1381775602727200262
|
350
376
|
requirements: []
|
351
377
|
rubyforge_project:
|
352
|
-
rubygems_version:
|
378
|
+
rubygems_version: 1.8.24
|
353
379
|
signing_key:
|
354
|
-
specification_version:
|
380
|
+
specification_version: 3
|
355
381
|
summary: Database code for MSF and Metasploit Pro
|
356
382
|
test_files:
|
357
383
|
- spec/app/models/mdm/module_action_spec.rb
|
@@ -375,6 +401,7 @@ test_files:
|
|
375
401
|
- spec/dummy/config/application.rb
|
376
402
|
- spec/dummy/config/boot.rb
|
377
403
|
- spec/dummy/config/database.yml.example
|
404
|
+
- spec/dummy/config/database.yml.travis
|
378
405
|
- spec/dummy/config/environment.rb
|
379
406
|
- spec/dummy/config/environments/development.rb
|
380
407
|
- spec/dummy/config/environments/production.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NzJhNmVjNmY1YjY0YzFjMjYzZmUwN2QyZDFhYjI2YWFlODE4YTZkMQ==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZWQ0MGQ2OGUwODEyNDE0NzU3NGJiZDMxOTVhMjlmM2NkNzNjOWVlYw==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ODY2YzljMzI4N2RhZjg2M2FhMDBlMWNkZjY0ZjBjMjkxMzUxNTVmMDkyNzdi
|
10
|
-
NzE1Y2MzNjAzNGM4OTA3YjNlY2ExZmYzYWY4ODZkNWU2YzU5ZTJhMTYyNzg5
|
11
|
-
NjhiMjRhZDlhMjc3OGFhMGZhYjNiYjViOGE0NjljMmFjOTJmZTI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MDUwZmZhY2NhZGVlMzk2NTRmM2MyOTgxZGJmNTJlN2Q4NDc0MWQ0MWYwZGZm
|
14
|
-
MGFkZjY4ZmUxNTE5NmQ0N2Q2Y2JlOGQ2NjdmZDk0Y2FiYzAxOGZmYmFlODUz
|
15
|
-
MWVlZDdmMzhlOTczNGEzNDE2MzI2ZGY5MjUzZGI0ZTg1ODYxMGE=
|