metasploit_data_models 0.22.4 → 0.22.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20100819123300_migrate_cred_data.rb +2 -2
- data/db/migrate/20110422000000_convert_binary.rb +8 -8
- data/db/migrate/20110513143900_track_successful_exploits.rb +1 -1
- data/db/migrate/20110517160800_rename_and_prune_nessus_vulns.rb +1 -1
- data/db/migrate/20111011110000_add_display_name_to_reports_table.rb +1 -1
- data/lib/metasploit_data_models/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 859e35cb4e65777beae4ee82aa2441a6e5fe735d
|
4
|
+
data.tar.gz: 1f874280a23afc1dfa4db4f757ebc4e7e9dd37fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5689d9ca36fcdfe73a62b0ab6b37877e9fcd5198cbb5bea8ef56945ed22e706e9d5c14e23eb8543409c036378813443a8984c0678171874550f8bde9950a94f
|
7
|
+
data.tar.gz: b0a7331848d191634b1d20b19b16d7d68fcca1e2bbc9434ee3c2c3e0668cf87ab1750356efa6a9268a8d547450b1cdd0c63a773d9500cc2a3ee54db2f40e5407
|
@@ -4,7 +4,7 @@ class MigrateCredData < ActiveRecord::Migration
|
|
4
4
|
begin # Wrap the whole thing in a giant rescue.
|
5
5
|
skipped_notes = []
|
6
6
|
new_creds = []
|
7
|
-
Mdm::Note.
|
7
|
+
Mdm::Note.all.each do |note|
|
8
8
|
next unless note.ntype[/^auth\.(.*)/]
|
9
9
|
service_name = $1
|
10
10
|
if !service_name
|
@@ -135,7 +135,7 @@ class MigrateCredData < ActiveRecord::Migration
|
|
135
135
|
end
|
136
136
|
|
137
137
|
say "Deleting migrated auth notes."
|
138
|
-
Mdm::Note.
|
138
|
+
Mdm::Note.all.each do |note|
|
139
139
|
next unless note.ntype[/^auth\.(.*)/]
|
140
140
|
note.delete
|
141
141
|
end
|
@@ -27,10 +27,10 @@ class ConvertBinary < ActiveRecord::Migration
|
|
27
27
|
add_column :web_vulns, :request, :binary
|
28
28
|
add_column :web_vulns, :proof, :binary
|
29
29
|
|
30
|
-
WebPage.
|
31
|
-
WebPage.
|
32
|
-
WebVuln.
|
33
|
-
WebVuln.
|
30
|
+
WebPage.all.each { |r| r.body = r.body_text; r.save! }
|
31
|
+
WebPage.all.each { |r| r.request = r.request_text; r.save! }
|
32
|
+
WebVuln.all.each { |r| r.proof = r.proof_text; r.save! }
|
33
|
+
WebVuln.all.each { |r| r.request = r.request_text; r.save! }
|
34
34
|
|
35
35
|
remove_column :web_pages, :body_text
|
36
36
|
remove_column :web_pages, :request_text
|
@@ -55,10 +55,10 @@ class ConvertBinary < ActiveRecord::Migration
|
|
55
55
|
add_column :web_vulns, :request, :text
|
56
56
|
add_column :web_vulns, :proof, :text
|
57
57
|
|
58
|
-
WebPage.
|
59
|
-
WebPage.
|
60
|
-
WebVuln.
|
61
|
-
WebVuln.
|
58
|
+
WebPage.all.each { |r| r.body = bfilter(r.body_binary); r.save! }
|
59
|
+
WebPage.all.each { |r| r.request = bfilter(r.request_binary); r.save! }
|
60
|
+
WebVuln.all.each { |r| r.proof = bfilter(r.proof_binary); r.save! }
|
61
|
+
WebVuln.all.each { |r| r.request = bfilter(r.request_binary); r.save! }
|
62
62
|
|
63
63
|
remove_column :web_pages, :body_binary
|
64
64
|
remove_column :web_pages, :request_binary
|
@@ -12,7 +12,7 @@ class TrackSuccessfulExploits < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
# Migrate existing exploited_hosts entries
|
14
14
|
|
15
|
-
ExploitedHost.
|
15
|
+
ExploitedHost.all.select {|x| x.name}.each do |exploited_host|
|
16
16
|
next unless(exploited_host.name =~ /^(exploit|auxiliary)\//)
|
17
17
|
vulns = Vuln.where(name: exploited_host.name, host_id: exploited_host.host_id)
|
18
18
|
next if vulns.empty?
|
@@ -6,7 +6,7 @@ class RenameAndPruneNessusVulns < ActiveRecord::Migration
|
|
6
6
|
# No table changes, just vuln renaming to drop the NSS id
|
7
7
|
# from those vulns that have it and a descriptive name.
|
8
8
|
def self.up
|
9
|
-
Vuln.
|
9
|
+
Vuln.all.each do |v|
|
10
10
|
if v.name =~ /^NSS-0?\s*$/
|
11
11
|
v.delete
|
12
12
|
next
|
@@ -9,7 +9,7 @@ class AddDisplayNameToReportsTable < ActiveRecord::Migration
|
|
9
9
|
|
10
10
|
# Migrate to have a default name.
|
11
11
|
|
12
|
-
Report.
|
12
|
+
Report.all.each do |report|
|
13
13
|
rtype = report.rtype.to_s =~ /^([A-Z0-9]+)\x2d/i ? $1 : "AUDIT"
|
14
14
|
default_name = rtype[0,57].downcase.capitalize + "-" + report.id.to_s[0,5]
|
15
15
|
report.name = default_name
|
@@ -6,7 +6,7 @@ module MetasploitDataModels
|
|
6
6
|
# The minor version number, scoped to the {MAJOR} version number.
|
7
7
|
MINOR = 22
|
8
8
|
# The patch number, scoped to the {MINOR} version number.
|
9
|
-
PATCH =
|
9
|
+
PATCH = 5
|
10
10
|
|
11
11
|
# The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the
|
12
12
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|