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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31b1d1dd908f4ebfb33db66e24415a098cc102a0
4
- data.tar.gz: a1f7123dacf5fd6821c23fdaa249d45f69d3840b
3
+ metadata.gz: 859e35cb4e65777beae4ee82aa2441a6e5fe735d
4
+ data.tar.gz: 1f874280a23afc1dfa4db4f757ebc4e7e9dd37fc
5
5
  SHA512:
6
- metadata.gz: bc185a45e833b5aa5aa3550295b08066c5bc7a98e0179203c224484d385178ad3b4efd688c66bd2502cd884d82c4e62bf1ff52c03c83ab148d73465f01abb797
7
- data.tar.gz: b508427932ffc8acf7de501a07d70d052914dcadb151cbd3d62b8521cbd956194fb8d88195c14e46281140aea563dc691c4e9107d1eca4c3f6f6c7af2e0090ba
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.find(:all).each do |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.find(:all).each do |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.find(:all).each { |r| r.body = r.body_text; r.save! }
31
- WebPage.find(:all).each { |r| r.request = r.request_text; r.save! }
32
- WebVuln.find(:all).each { |r| r.proof = r.proof_text; r.save! }
33
- WebVuln.find(:all).each { |r| r.request = r.request_text; r.save! }
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.find(:all).each { |r| r.body = bfilter(r.body_binary); r.save! }
59
- WebPage.find(:all).each { |r| r.request = bfilter(r.request_binary); r.save! }
60
- WebVuln.find(:all).each { |r| r.proof = bfilter(r.proof_binary); r.save! }
61
- WebVuln.find(:all).each { |r| r.request = bfilter(r.request_binary); r.save! }
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.find(:all).select {|x| x.name}.each do |exploited_host|
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.find(:all).each do |v|
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.find(:all).each do |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 = 4
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit_data_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.4
4
+ version: 0.22.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Huckins