metasploit_data_models 0.16.3-java → 0.16.4-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/db/migrate/20130510021637_remove_campaigns.rb +11 -0
- data/lib/metasploit_data_models/version.rb +1 -1
- data/spec/dummy/db/schema.rb +1 -1
- metadata +2 -7
- data/db/migrate/20130619160512_drop_attachments_email_templates.rb +0 -30
- data/db/migrate/20130619162051_drop_attachments.rb +0 -46
- data/db/migrate/20130619185710_drop_email_addresses.rb +0 -49
- data/db/migrate/20130619190652_drop_email_templates.rb +0 -41
- data/db/migrate/20130619191802_drop_web_templates.rb +0 -41
- data/db/migrate/20130619192506_drop_campaigns.rb +0 -45
@@ -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.16.
|
7
|
+
VERSION = '0.16.4'
|
8
8
|
end
|
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 => 20130604145732) do
|
15
15
|
|
16
16
|
create_table "api_keys", :force => true do |t|
|
17
17
|
t.text "token"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: metasploit_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.16.
|
5
|
+
version: 0.16.4
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Samuel Huckins
|
@@ -325,6 +325,7 @@ files:
|
|
325
325
|
- db/migrate/20130423211152_add_creds_counter_cache.rb
|
326
326
|
- db/migrate/20130430151353_change_required_columns_to_null_false_in_hosts.rb
|
327
327
|
- db/migrate/20130430162145_enforce_address_uniqueness_in_workspace_in_hosts.rb
|
328
|
+
- db/migrate/20130510021637_remove_campaigns.rb
|
328
329
|
- db/migrate/20130515164311_change_web_vulns_confidence_to_integer.rb
|
329
330
|
- db/migrate/20130515172727_valid_mdm_web_vuln_params.rb
|
330
331
|
- db/migrate/20130516204810_making_vulns_refs_a_real_ar_model.rb
|
@@ -335,12 +336,6 @@ files:
|
|
335
336
|
- db/migrate/20130525212420_drop_table_imported_creds.rb
|
336
337
|
- db/migrate/20130531144949_making_host_tags_a_real_ar_model.rb
|
337
338
|
- db/migrate/20130604145732_create_task_sessions.rb
|
338
|
-
- db/migrate/20130619160512_drop_attachments_email_templates.rb
|
339
|
-
- db/migrate/20130619162051_drop_attachments.rb
|
340
|
-
- db/migrate/20130619185710_drop_email_addresses.rb
|
341
|
-
- db/migrate/20130619190652_drop_email_templates.rb
|
342
|
-
- db/migrate/20130619191802_drop_web_templates.rb
|
343
|
-
- db/migrate/20130619192506_drop_campaigns.rb
|
344
339
|
- lib/mdm.rb
|
345
340
|
- lib/mdm/host/operating_system_normalization.rb
|
346
341
|
- lib/mdm/module.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Drops obsolete attachments_email_templates join table.
|
2
|
-
class DropAttachmentsEmailTemplates < ActiveRecord::Migration
|
3
|
-
#
|
4
|
-
# CONSTANTS
|
5
|
-
#
|
6
|
-
|
7
|
-
# Table being dropped.
|
8
|
-
TABLE_NAME = :attachments_email_templates
|
9
|
-
|
10
|
-
#
|
11
|
-
# Methods
|
12
|
-
#
|
13
|
-
|
14
|
-
# Recreates attachments_email_templates table
|
15
|
-
#
|
16
|
-
# @return [void]
|
17
|
-
def down
|
18
|
-
create_table TABLE_NAME, :id => false do |t|
|
19
|
-
t.references :attachment
|
20
|
-
t.references :email_template
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# Drops attachmetns_email_templates table
|
25
|
-
#
|
26
|
-
# @return [void]
|
27
|
-
def up
|
28
|
-
drop_table TABLE_NAME
|
29
|
-
end
|
30
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# Drops obsolete attachments table.
|
2
|
-
class DropAttachments < ActiveRecord::Migration
|
3
|
-
#
|
4
|
-
# CONSTANTS
|
5
|
-
#
|
6
|
-
|
7
|
-
# Table name
|
8
|
-
TABLE_NAME = :attachments
|
9
|
-
|
10
|
-
|
11
|
-
# Recreates attachments, but without data.
|
12
|
-
#
|
13
|
-
# @return [void]
|
14
|
-
def down
|
15
|
-
create_table TABLE_NAME do |t|
|
16
|
-
#
|
17
|
-
# Columns
|
18
|
-
#
|
19
|
-
|
20
|
-
t.binary :data
|
21
|
-
t.string :content_type,
|
22
|
-
:limit => 512
|
23
|
-
t.boolean :inline,
|
24
|
-
:default => true,
|
25
|
-
:null => false
|
26
|
-
t.string :name,
|
27
|
-
:limit => 512
|
28
|
-
t.boolean :zip,
|
29
|
-
:default => false,
|
30
|
-
:null => false
|
31
|
-
|
32
|
-
#
|
33
|
-
# Foreign Keys
|
34
|
-
#
|
35
|
-
|
36
|
-
t.references :campaign
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# Drops attachments
|
41
|
-
#
|
42
|
-
# @return [void]
|
43
|
-
def up
|
44
|
-
drop_table TABLE_NAME
|
45
|
-
end
|
46
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# Drops obsolete email_addresses.
|
2
|
-
class DropEmailAddresses < ActiveRecord::Migration
|
3
|
-
#
|
4
|
-
# CONSTANTS
|
5
|
-
#
|
6
|
-
|
7
|
-
# Table being dropped.
|
8
|
-
TABLE_NAME = :email_addresses
|
9
|
-
|
10
|
-
#
|
11
|
-
# Methods
|
12
|
-
#
|
13
|
-
|
14
|
-
# Recreates email_addresses, but does not restore data.
|
15
|
-
#
|
16
|
-
# @return [void]
|
17
|
-
def down
|
18
|
-
create_table TABLE_NAME do |t|
|
19
|
-
#
|
20
|
-
# Columns
|
21
|
-
#
|
22
|
-
|
23
|
-
t.string :address,
|
24
|
-
:limit => 512
|
25
|
-
t.datetime :clicked_at
|
26
|
-
t.string :first_name,
|
27
|
-
:limit => 512
|
28
|
-
t.string :last_name,
|
29
|
-
:limit => 512
|
30
|
-
t.boolean :sent,
|
31
|
-
:default => false,
|
32
|
-
:null => false
|
33
|
-
|
34
|
-
#
|
35
|
-
# Foreign Keys
|
36
|
-
#
|
37
|
-
|
38
|
-
t.references :campaign,
|
39
|
-
:null => false
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
# Drops email_addresses
|
44
|
-
#
|
45
|
-
# @return [void]
|
46
|
-
def up
|
47
|
-
drop_table TABLE_NAME
|
48
|
-
end
|
49
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# Drops email_templates table that used to back obsolete Mdm::EmailTemplate module for old-style campaigns.
|
2
|
-
class DropEmailTemplates < ActiveRecord::Migration
|
3
|
-
#
|
4
|
-
# CONSTANTS
|
5
|
-
#
|
6
|
-
|
7
|
-
# Table being dropped.
|
8
|
-
TABLE_NAME = :email_templates
|
9
|
-
|
10
|
-
# Recreates email_templates, but does not restore data.
|
11
|
-
#
|
12
|
-
# @return [void]
|
13
|
-
def down
|
14
|
-
create_table TABLE_NAME do |t|
|
15
|
-
#
|
16
|
-
# Columns
|
17
|
-
#
|
18
|
-
|
19
|
-
t.text :body
|
20
|
-
t.string :name,
|
21
|
-
:limit => 512
|
22
|
-
t.text :prefs
|
23
|
-
t.string :subject,
|
24
|
-
:limit => 1024
|
25
|
-
|
26
|
-
#
|
27
|
-
# Foreign Keys
|
28
|
-
#
|
29
|
-
|
30
|
-
t.references :parent
|
31
|
-
t.references :campaign
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# Drops email_templates
|
36
|
-
#
|
37
|
-
# @return [void]
|
38
|
-
def up
|
39
|
-
drop_table TABLE_NAME
|
40
|
-
end
|
41
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# Drops web_teamplates that was used with obsolete Mdm::WebTemplates model for old-style campaigns.
|
2
|
-
class DropWebTemplates < ActiveRecord::Migration
|
3
|
-
#
|
4
|
-
# CONSTANTS
|
5
|
-
#
|
6
|
-
|
7
|
-
# Table being dropped.
|
8
|
-
TABLE_NAME = :web_templates
|
9
|
-
|
10
|
-
# Recreates web_templates, but does not restore data.
|
11
|
-
#
|
12
|
-
# @return [void]
|
13
|
-
def down
|
14
|
-
create_table TABLE_NAME do |t|
|
15
|
-
#
|
16
|
-
# Columns
|
17
|
-
#
|
18
|
-
|
19
|
-
t.string :body,
|
20
|
-
:limit => 524288
|
21
|
-
t.string :name,
|
22
|
-
:limit => 512
|
23
|
-
t.text :prefs
|
24
|
-
t.string :title,
|
25
|
-
:limit => 512
|
26
|
-
|
27
|
-
#
|
28
|
-
# Foreign Keys
|
29
|
-
#
|
30
|
-
|
31
|
-
t.references :campaign
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# Drops web_templates
|
36
|
-
#
|
37
|
-
# @return [void]
|
38
|
-
def up
|
39
|
-
drop_table TABLE_NAME
|
40
|
-
end
|
41
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# Drop campaigns table for old-style campaigns
|
2
|
-
class DropCampaigns < ActiveRecord::Migration
|
3
|
-
#
|
4
|
-
# CONSTANTS
|
5
|
-
#
|
6
|
-
|
7
|
-
# Table being dropped
|
8
|
-
TABLE_NAME = :campaigns
|
9
|
-
|
10
|
-
# Recreates campaigns, but does not restore data.
|
11
|
-
#
|
12
|
-
# @return [void]
|
13
|
-
def down
|
14
|
-
create_table TABLE_NAME do |t|
|
15
|
-
#
|
16
|
-
# Columns
|
17
|
-
#
|
18
|
-
|
19
|
-
t.datetime :created_at,
|
20
|
-
:null => false
|
21
|
-
t.string :name,
|
22
|
-
:limit => 512
|
23
|
-
t.text :prefs
|
24
|
-
t.datetime :started_at
|
25
|
-
t.integer :status,
|
26
|
-
:default => 0
|
27
|
-
t.datetime :updated_at,
|
28
|
-
:null => false
|
29
|
-
|
30
|
-
#
|
31
|
-
# Foreign Keys
|
32
|
-
#
|
33
|
-
|
34
|
-
t.references :workspace,
|
35
|
-
:null => false
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# Drop campaigns
|
40
|
-
#
|
41
|
-
# @return [void]
|
42
|
-
def up
|
43
|
-
drop_table TABLE_NAME
|
44
|
-
end
|
45
|
-
end
|