metasploit_data_models 0.17.2 → 0.17.3.pre.metasploit.pre.concern

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +8 -8
  2. data/app/models/mdm/api_key.rb +1 -1
  3. data/app/models/mdm/client.rb +1 -1
  4. data/app/models/mdm/cred.rb +4 -2
  5. data/app/models/mdm/event.rb +1 -1
  6. data/app/models/mdm/exploit_attempt.rb +1 -1
  7. data/app/models/mdm/exploited_host.rb +1 -1
  8. data/app/models/mdm/host.rb +1 -1
  9. data/app/models/mdm/host_detail.rb +1 -1
  10. data/app/models/mdm/host_tag.rb +1 -1
  11. data/app/models/mdm/listener.rb +1 -2
  12. data/app/models/mdm/loot.rb +3 -1
  13. data/app/models/mdm/macro.rb +1 -1
  14. data/app/models/mdm/mod_ref.rb +1 -1
  15. data/app/models/mdm/module/action.rb +1 -1
  16. data/app/models/mdm/module/arch.rb +1 -1
  17. data/app/models/mdm/module/author.rb +1 -1
  18. data/app/models/mdm/module/detail.rb +1 -1
  19. data/app/models/mdm/module/mixin.rb +1 -1
  20. data/app/models/mdm/module/platform.rb +1 -1
  21. data/app/models/mdm/module/ref.rb +1 -1
  22. data/app/models/mdm/module/target.rb +1 -1
  23. data/app/models/mdm/nexpose_console.rb +1 -1
  24. data/app/models/mdm/note.rb +3 -1
  25. data/app/models/mdm/profile.rb +1 -1
  26. data/app/models/mdm/ref.rb +1 -1
  27. data/app/models/mdm/route.rb +1 -1
  28. data/app/models/mdm/service.rb +1 -1
  29. data/app/models/mdm/session.rb +3 -1
  30. data/app/models/mdm/session_event.rb +1 -1
  31. data/app/models/mdm/tag.rb +1 -1
  32. data/app/models/mdm/task.rb +3 -1
  33. data/app/models/mdm/task_cred.rb +2 -0
  34. data/app/models/mdm/task_host.rb +2 -0
  35. data/app/models/mdm/task_service.rb +2 -0
  36. data/app/models/mdm/task_session.rb +2 -0
  37. data/app/models/mdm/user.rb +1 -1
  38. data/app/models/mdm/vuln.rb +3 -1
  39. data/app/models/mdm/vuln_attempt.rb +1 -1
  40. data/app/models/mdm/vuln_detail.rb +1 -1
  41. data/app/models/mdm/vuln_ref.rb +1 -1
  42. data/app/models/mdm/web_form.rb +1 -1
  43. data/app/models/mdm/web_page.rb +1 -1
  44. data/app/models/mdm/web_site.rb +1 -1
  45. data/app/models/mdm/web_vuln.rb +1 -1
  46. data/app/models/mdm/wmap_request.rb +1 -1
  47. data/app/models/mdm/wmap_target.rb +1 -1
  48. data/app/models/mdm/workspace.rb +3 -1
  49. data/app/models/metasploit_data_models/search/visitor/attribute.rb +2 -0
  50. data/app/models/metasploit_data_models/search/visitor/includes.rb +2 -0
  51. data/app/models/metasploit_data_models/search/visitor/joins.rb +2 -0
  52. data/app/models/metasploit_data_models/search/visitor/method.rb +2 -0
  53. data/app/models/metasploit_data_models/search/visitor/relation.rb +4 -0
  54. data/app/models/metasploit_data_models/search/visitor/where.rb +2 -0
  55. data/lib/metasploit_data_models.rb +1 -0
  56. data/lib/metasploit_data_models/version.rb +1 -1
  57. data/metasploit_data_models.gemspec +1 -0
  58. data/spec/app/models/mdm/api_key_spec.rb +5 -0
  59. data/spec/app/models/mdm/client_spec.rb +2 -0
  60. data/spec/app/models/mdm/cred_spec.rb +1 -0
  61. data/spec/app/models/mdm/{events_spec.rb → event_spec.rb} +1 -0
  62. data/spec/app/models/mdm/exploit_attempt_spec.rb +1 -0
  63. data/spec/app/models/mdm/exploited_host_spec.rb +34 -32
  64. data/spec/app/models/mdm/host_detail_spec.rb +1 -0
  65. data/spec/app/models/mdm/host_spec.rb +2 -0
  66. data/spec/app/models/mdm/host_tag_spec.rb +1 -0
  67. data/spec/app/models/mdm/listener_spec.rb +1 -0
  68. data/spec/app/models/mdm/loot_spec.rb +66 -64
  69. data/spec/app/models/mdm/macro_spec.rb +5 -0
  70. data/spec/app/models/mdm/mod_ref_spec.rb +5 -0
  71. data/spec/app/models/mdm/module/action_spec.rb +3 -0
  72. data/spec/app/models/mdm/module/arch_spec.rb +3 -0
  73. data/spec/app/models/mdm/module/author_spec.rb +3 -0
  74. data/spec/app/models/mdm/module/detail_spec.rb +2 -0
  75. data/spec/app/models/mdm/module/mixin_spec.rb +3 -0
  76. data/spec/app/models/mdm/module/platform_spec.rb +3 -0
  77. data/spec/app/models/mdm/module/ref_spec.rb +3 -0
  78. data/spec/app/models/mdm/module/target_spec.rb +3 -0
  79. data/spec/app/models/mdm/nexpose_console_spec.rb +1 -0
  80. data/spec/app/models/mdm/note_spec.rb +1 -0
  81. data/spec/app/models/mdm/profile_spec.rb +5 -0
  82. data/spec/app/models/mdm/ref_spec.rb +2 -0
  83. data/spec/app/models/mdm/route_spec.rb +1 -0
  84. data/spec/app/models/mdm/service_spec.rb +1 -0
  85. data/spec/app/models/mdm/session_event_spec.rb +2 -0
  86. data/spec/app/models/mdm/session_spec.rb +1 -0
  87. data/spec/app/models/mdm/tag_spec.rb +1 -0
  88. data/spec/app/models/mdm/{task_creds_spec.rb → task_cred_spec.rb} +1 -0
  89. data/spec/app/models/mdm/task_host_spec.rb +1 -0
  90. data/spec/app/models/mdm/task_service_spec.rb +1 -0
  91. data/spec/app/models/mdm/{task_sessions_spec.rb → task_session_spec.rb} +1 -0
  92. data/spec/app/models/mdm/task_spec.rb +1 -0
  93. data/spec/app/models/mdm/user_spec.rb +1 -0
  94. data/spec/app/models/mdm/vuln_attempt_spec.rb +1 -0
  95. data/spec/app/models/mdm/{vuln_details_spec.rb → vuln_detail_spec.rb} +1 -0
  96. data/spec/app/models/mdm/vuln_ref_spec.rb +2 -0
  97. data/spec/app/models/mdm/vuln_spec.rb +2 -0
  98. data/spec/app/models/mdm/web_form_spec.rb +1 -0
  99. data/spec/app/models/mdm/web_page_spec.rb +1 -0
  100. data/spec/app/models/mdm/web_site_spec.rb +1 -0
  101. data/spec/app/models/mdm/web_vuln_spec.rb +2 -0
  102. data/spec/app/models/mdm/wmap_request_spec.rb +5 -0
  103. data/spec/app/models/mdm/wmap_target_spec.rb +5 -0
  104. data/spec/app/models/mdm/workspace_spec.rb +2 -0
  105. data/spec/app/models/metasploit_data_models/search/visitor/attribute_spec.rb +2 -0
  106. data/spec/app/models/metasploit_data_models/search/visitor/includes_spec.rb +2 -0
  107. data/spec/app/models/metasploit_data_models/search/visitor/joins_spec.rb +2 -0
  108. data/spec/app/models/metasploit_data_models/search/visitor/method_spec.rb +2 -0
  109. data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +2 -0
  110. data/spec/app/models/metasploit_data_models/search/visitor/where_spec.rb +2 -0
  111. data/spec/spec_helper.rb +11 -3
  112. metadata +38 -12
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGZmNjc3YWM0ZjUyNzFmY2NmZTNkODBkZmExMTg3YjgxNTU5ZTFiNA==
4
+ MGEwZGMwZTQzMDFmMjRiODI3ZDQ2NjY4NzQxOWFlZDEwZGQzNzhlZQ==
5
5
  data.tar.gz: !binary |-
6
- MzZkN2I4NjM0Njc2YzI0Nzk4MzU5Zjg3NGQwZjc0ZjdmMjVjMDk2Zg==
6
+ MjljMGRhZmRjZjk2YjBkZWE4OTk0NTg1Y2U2MTFhNTY1ZDhhNTYzZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzRlYTMxYTcxNWU2MTY2MjA5NzM5YzVmMmE4YTMxODlhMmY5YzI4MGY2M2Qx
10
- YTU0ZTc3NTRmNzA3OGE1MDlkMTVkMzQzODUxZDczZDU3YTEyMmFjODE2MmIw
11
- NWE3YmNmMjYwZDg1YWRmMTgxMWIzYzI5MTJhYzRlMTZmM2ZiM2U=
9
+ MDgxNWQ5ZmE3ZTQzYmE1OTIzNmY0ZjgyYTI4MzE4MGIzZTA5YzgyZTVmZjY2
10
+ NDJlOWU5NmJmZWViYjBkYWRhYzlhNGJlYzZiZTUxYWRhYTIwYzUzZDdiMzYy
11
+ YmE4YzI3ZTVmMTdiOTE2NDU2ODlmMGU3NWVhOGJhMWU5MTJmMWQ=
12
12
  data.tar.gz: !binary |-
13
- NmI1NzNiOWUyYzA4OGE1NDI2NTZmNTlmZDgyNzY2ODRkOTQ5MzNjMjQ2MjZi
14
- ZTdkZWI5MGU1MjU0MDczZTViODdmNDJkMzJlMTdjMTVmNjIxNGE0YzQ4ZGJj
15
- MDdkNmE1NGI4YmIxZDc2ODgxMTM5MmZhNmZhNTM3MTY5YWM1YWY=
13
+ MDQ5YjgzYjE4ZDgxMmNmZmMzMTkyOTgxMjIzYzIyNmM1NDhiNTkxNDdiNWEy
14
+ MzhlMTI1ZmMwZjM1MjAxNGZlZjhmZWViNWE2MDE0YzJlMzdmNjk5YjQ2MmE1
15
+ YTVkMmQwOTVkZGZkYTM1ZWEzNWJkODk2MDJhOGE2MmNlNjAyOTQ=
@@ -16,5 +16,5 @@ class Mdm::ApiKey < ActiveRecord::Base
16
16
  end
17
17
  end
18
18
 
19
- ActiveSupport.run_load_hooks(:mdm_api_key, self)
19
+ Metasploit::Concern.run(self)
20
20
  end
@@ -6,5 +6,5 @@ class Mdm::Client < ActiveRecord::Base
6
6
  class_name: 'Mdm::Host',
7
7
  inverse_of: :clients
8
8
 
9
- ActiveSupport.run_load_hooks(:mdm_client, self)
9
+ Metasploit::Concern.run(self)
10
10
  end
@@ -101,8 +101,6 @@ class Mdm::Cred < ActiveRecord::Base
101
101
  self.service.host.workspace
102
102
  end
103
103
 
104
- ActiveSupport.run_load_hooks(:mdm_cred, self)
105
-
106
104
  private
107
105
 
108
106
  def decrement_host_counter_cache
@@ -112,4 +110,8 @@ class Mdm::Cred < ActiveRecord::Base
112
110
  def increment_host_counter_cache
113
111
  Mdm::Host.increment_counter("cred_count", self.service.host_id)
114
112
  end
113
+
114
+ public
115
+
116
+ Metasploit::Concern.run(self)
115
117
  end
@@ -30,6 +30,6 @@ class Mdm::Event < ActiveRecord::Base
30
30
 
31
31
  validates :name, :presence => true
32
32
 
33
- ActiveSupport.run_load_hooks(:mdm_event, self)
33
+ Metasploit::Concern.run(self)
34
34
  end
35
35
 
@@ -51,5 +51,5 @@ class Mdm::ExploitAttempt < ActiveRecord::Base
51
51
 
52
52
  validates :host_id, :presence => true
53
53
 
54
- ActiveSupport.run_load_hooks(:mdm_exploit_attempt, self)
54
+ Metasploit::Concern.run(self)
55
55
  end
@@ -11,5 +11,5 @@ class Mdm::ExploitedHost < ActiveRecord::Base
11
11
  class_name: 'Mdm::Service',
12
12
  inverse_of: :exploited_hosts
13
13
 
14
- ActiveSupport.run_load_hooks(:mdm_exploited_host, self)
14
+ Metasploit::Concern.run(self)
15
15
  end
@@ -516,6 +516,6 @@ class Mdm::Host < ActiveRecord::Base
516
516
  !!self.virtual_host
517
517
  end
518
518
 
519
- ActiveSupport.run_load_hooks(:mdm_host, self)
519
+ Metasploit::Concern.run(self)
520
520
  end
521
521
 
@@ -14,5 +14,5 @@ class Mdm::HostDetail < ActiveRecord::Base
14
14
 
15
15
  validates :host_id, :presence => true
16
16
 
17
- ActiveSupport.run_load_hooks(:mdm_host_detail, self)
17
+ Metasploit::Concern.run(self)
18
18
  end
@@ -46,6 +46,6 @@ class Mdm::HostTag < ActiveRecord::Base
46
46
 
47
47
  public
48
48
 
49
- ActiveSupport.run_load_hooks(:mdm_host_tag, self)
49
+ Metasploit::Concern.run(self)
50
50
  end
51
51
 
@@ -24,7 +24,6 @@ class Mdm::Listener < ActiveRecord::Base
24
24
  validates :address, :ip_format => true, :presence => true
25
25
  validates :port, :presence => true, :numericality => { :only_integer => true }, :inclusion => {:in => 1..65535}
26
26
 
27
-
28
- ActiveSupport.run_load_hooks(:mdm_listener, self)
27
+ Metasploit::Concern.run(self)
29
28
  end
30
29
 
@@ -145,6 +145,8 @@ class Mdm::Loot < ActiveRecord::Base
145
145
  end
146
146
  end
147
147
 
148
- ActiveSupport.run_load_hooks(:mdm_loot, self)
148
+ public
149
+
150
+ Metasploit::Concern.run(self)
149
151
  end
150
152
 
@@ -15,6 +15,6 @@ class Mdm::Macro < ActiveRecord::Base
15
15
 
16
16
  validates :name, :presence => true, :format => /^[^'|"]+$/
17
17
 
18
- ActiveSupport.run_load_hooks(:mdm_macro, self)
18
+ Metasploit::Concern.run(self)
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  class Mdm::ModRef < ActiveRecord::Base
2
- ActiveSupport.run_load_hooks(:mdm_mod_ref, self)
2
+ Metasploit::Concern.run(self)
3
3
  end
@@ -20,5 +20,5 @@ class Mdm::Module::Action < ActiveRecord::Base
20
20
  validates :detail, :presence => true
21
21
  validates :name, :presence => true
22
22
 
23
- ActiveSupport.run_load_hooks(:mdm_module_action, self)
23
+ Metasploit::Concern.run(self)
24
24
  end
@@ -20,5 +20,5 @@ class Mdm::Module::Arch < ActiveRecord::Base
20
20
  validates :detail, :presence => true
21
21
  validates :name, :presence => true
22
22
 
23
- ActiveSupport.run_load_hooks(:mdm_module_arch, self)
23
+ Metasploit::Concern.run(self)
24
24
  end
@@ -21,5 +21,5 @@ class Mdm::Module::Author < ActiveRecord::Base
21
21
  validates :detail, :presence => true
22
22
  validates :name, :presence => true
23
23
 
24
- ActiveSupport.run_load_hooks(:mdm_module_author, self)
24
+ Metasploit::Concern.run(self)
25
25
  end
@@ -295,5 +295,5 @@ class Mdm::Module::Detail < ActiveRecord::Base
295
295
  supports_stance
296
296
  end
297
297
 
298
- ActiveSupport.run_load_hooks(:mdm_module_detail, self)
298
+ Metasploit::Concern.run(self)
299
299
  end
@@ -20,5 +20,5 @@ class Mdm::Module::Mixin < ActiveRecord::Base
20
20
  validates :detail, :presence => true
21
21
  validates :name, :presence => true
22
22
 
23
- ActiveSupport.run_load_hooks(:mdm_module_mixin, self)
23
+ Metasploit::Concern.run(self)
24
24
  end
@@ -20,5 +20,5 @@ class Mdm::Module::Platform < ActiveRecord::Base
20
20
  validates :detail, :presence => true
21
21
  validates :name, :presence => true
22
22
 
23
- ActiveSupport.run_load_hooks(:mdm_module_platform, self)
23
+ Metasploit::Concern.run(self)
24
24
  end
@@ -44,5 +44,5 @@ class Mdm::Module::Ref < ActiveRecord::Base
44
44
  validates :detail, :presence => true
45
45
  validates :name, :presence => true
46
46
 
47
- ActiveSupport.run_load_hooks(:mdm_module_ref, self)
47
+ Metasploit::Concern.run(self)
48
48
  end
@@ -22,5 +22,5 @@ class Mdm::Module::Target < ActiveRecord::Base
22
22
  validates :index, :presence => true
23
23
  validates :name, :presence => true
24
24
 
25
- ActiveSupport.run_load_hooks(:mdm_module_target, self)
25
+ Metasploit::Concern.run(self)
26
26
  end
@@ -28,6 +28,6 @@ class Mdm::NexposeConsole < ActiveRecord::Base
28
28
  validates :port, :numericality => { :only_integer => true }, :inclusion => {:in => 1..65535}
29
29
  validates :username, :presence => true
30
30
 
31
- ActiveSupport.run_load_hooks(:mdm_nexpose_console, self)
31
+ Metasploit::Concern.run(self)
32
32
  end
33
33
 
@@ -106,6 +106,8 @@ class Mdm::Note < ActiveRecord::Base
106
106
  end
107
107
  end
108
108
 
109
- ActiveSupport.run_load_hooks(:mdm_note, self)
109
+ public
110
+
111
+ Metasploit::Concern.run(self)
110
112
  end
111
113
 
@@ -4,6 +4,6 @@ class Mdm::Profile < ActiveRecord::Base
4
4
  #
5
5
  serialize :settings, MetasploitDataModels::Base64Serializer.new
6
6
 
7
- ActiveSupport.run_load_hooks(:mdm_profile, self)
7
+ Metasploit::Concern.run(self)
8
8
  end
9
9
 
@@ -50,5 +50,5 @@ class Mdm::Ref < ActiveRecord::Base
50
50
 
51
51
  attr_accessible :name
52
52
 
53
- ActiveSupport.run_load_hooks(:mdm_ref, self)
53
+ Metasploit::Concern.run(self)
54
54
  end
@@ -11,5 +11,5 @@ class Mdm::Route < ActiveRecord::Base
11
11
  class_name: 'Mdm::Session',
12
12
  inverse_of: :routes
13
13
 
14
- ActiveSupport.run_load_hooks(:mdm_route, self)
14
+ Metasploit::Concern.run(self)
15
15
  end
@@ -202,6 +202,6 @@ class Mdm::Service < ActiveRecord::Base
202
202
  end
203
203
  end
204
204
 
205
- ActiveSupport.run_load_hooks(:mdm_service, self)
205
+ Metasploit::Concern.run(self)
206
206
  end
207
207
 
@@ -179,5 +179,7 @@ class Mdm::Session < ActiveRecord::Base
179
179
  c.session_stop(self.local_id) rescue nil
180
180
  end
181
181
 
182
- ActiveSupport.run_load_hooks(:mdm_session, self)
182
+ public
183
+
184
+ Metasploit::Concern.run(self)
183
185
  end
@@ -7,5 +7,5 @@ class Mdm::SessionEvent < ActiveRecord::Base
7
7
  class_name: 'Mdm::Session',
8
8
  inverse_of: :events
9
9
 
10
- ActiveSupport.run_load_hooks(:mdm_session_event, self)
10
+ Metasploit::Concern.run(self)
11
11
  end
@@ -61,5 +61,5 @@ class Mdm::Tag < ActiveRecord::Base
61
61
  name
62
62
  end
63
63
 
64
- ActiveSupport.run_load_hooks(:mdm_tag, self)
64
+ Metasploit::Concern.run(self)
65
65
  end
@@ -128,6 +128,8 @@ class Mdm::Task < ActiveRecord::Base
128
128
  end
129
129
  end
130
130
 
131
- ActiveSupport.run_load_hooks(:mdm_task, self)
131
+ public
132
+
133
+ Metasploit::Concern.run(self)
132
134
  end
133
135
 
@@ -11,4 +11,6 @@ class Mdm::TaskCred < ActiveRecord::Base
11
11
  :uniqueness => {
12
12
  :scope => :task_id
13
13
  }
14
+
15
+ Metasploit::Concern.run(self)
14
16
  end
@@ -11,4 +11,6 @@ class Mdm::TaskHost < ActiveRecord::Base
11
11
  :uniqueness => {
12
12
  :scope => :task_id
13
13
  }
14
+
15
+ Metasploit::Concern.run(self)
14
16
  end
@@ -11,4 +11,6 @@ class Mdm::TaskService < ActiveRecord::Base
11
11
  :uniqueness => {
12
12
  :scope => :task_id
13
13
  }
14
+
15
+ Metasploit::Concern.run(self)
14
16
  end
@@ -11,4 +11,6 @@ class Mdm::TaskSession < ActiveRecord::Base
11
11
  :uniqueness => {
12
12
  :scope => :task_id
13
13
  }
14
+
15
+ Metasploit::Concern.run(self)
14
16
  end
@@ -27,6 +27,6 @@ class Mdm::User < ActiveRecord::Base
27
27
  serialized_prefs_attr_accessor :time_zone, :session_key
28
28
  serialized_prefs_attr_accessor :last_login_address # specifically NOT last_login_ip to prevent confusion with AuthLogic magic columns (which dont work for serialized fields)
29
29
 
30
- ActiveSupport.run_load_hooks(:mdm_user, self)
30
+ Metasploit::Concern.run(self)
31
31
  end
32
32
 
@@ -157,5 +157,7 @@ class Mdm::Vuln < ActiveRecord::Base
157
157
  refs.each { |ref| ref.save(:validate => false) }
158
158
  end
159
159
 
160
- ActiveSupport.run_load_hooks(:mdm_vuln, self)
160
+ public
161
+
162
+ Metasploit::Concern.run(self)
161
163
  end
@@ -46,5 +46,5 @@ class Mdm::VulnAttempt < ActiveRecord::Base
46
46
 
47
47
  validates :vuln_id, :presence => true
48
48
 
49
- ActiveSupport.run_load_hooks(:mdm_vuln_attempt, self)
49
+ Metasploit::Concern.run(self)
50
50
  end
@@ -18,5 +18,5 @@ class Mdm::VulnDetail < ActiveRecord::Base
18
18
 
19
19
  validates :vuln_id, :presence => true
20
20
 
21
- ActiveSupport.run_load_hooks(:mdm_vuln_detail, self)
21
+ Metasploit::Concern.run(self)
22
22
  end
@@ -13,6 +13,6 @@ class Mdm::VulnRef < ActiveRecord::Base
13
13
  class_name: 'Mdm::Vuln',
14
14
  inverse_of: :vulns_refs
15
15
 
16
- ActiveSupport.run_load_hooks(:mdm_vuln_ref, self)
16
+ Metasploit::Concern.run(self)
17
17
  end
18
18
 
@@ -13,6 +13,6 @@ class Mdm::WebForm < ActiveRecord::Base
13
13
 
14
14
  serialize :params, MetasploitDataModels::Base64Serializer.new
15
15
 
16
- ActiveSupport.run_load_hooks(:mdm_web_form, self)
16
+ Metasploit::Concern.run(self)
17
17
  end
18
18
 
@@ -13,6 +13,6 @@ class Mdm::WebPage < ActiveRecord::Base
13
13
 
14
14
  serialize :headers, MetasploitDataModels::Base64Serializer.new
15
15
 
16
- ActiveSupport.run_load_hooks(:mdm_web_page, self)
16
+ Metasploit::Concern.run(self)
17
17
  end
18
18
 
@@ -57,6 +57,6 @@ class Mdm::WebSite < ActiveRecord::Base
57
57
  web_vulns.size
58
58
  end
59
59
 
60
- ActiveSupport.run_load_hooks(:mdm_web_site, self)
60
+ Metasploit::Concern.run(self)
61
61
  end
62
62
 
@@ -187,6 +187,6 @@ class Mdm::WebVuln < ActiveRecord::Base
187
187
  # switch back to public for load hooks
188
188
  public
189
189
 
190
- ActiveSupport.run_load_hooks(:mdm_web_vuln, self)
190
+ Metasploit::Concern.run(self)
191
191
  end
192
192
 
@@ -1,3 +1,3 @@
1
1
  class Mdm::WmapRequest < ActiveRecord::Base
2
- ActiveSupport.run_load_hooks(:mdm_wmap_request, self)
2
+ Metasploit::Concern.run(self)
3
3
  end
@@ -1,3 +1,3 @@
1
1
  class Mdm::WmapTarget < ActiveRecord::Base
2
- ActiveSupport.run_load_hooks(:mdm_wmap_target, self)
2
+ Metasploit::Concern.run(self)
3
3
  end
@@ -188,6 +188,8 @@ class Mdm::Workspace < ActiveRecord::Base
188
188
  end
189
189
  end
190
190
 
191
- ActiveSupport.run_load_hooks(:mdm_workspace, self)
191
+ public
192
+
193
+ Metasploit::Concern.run(self)
192
194
  end
193
195
 
@@ -10,4 +10,6 @@ class MetasploitDataModels::Search::Visitor::Attribute
10
10
  table = operator.klass.arel_table
11
11
  table[operator.attribute]
12
12
  end
13
+
14
+ Metasploit::Concern.run(self)
13
15
  end
@@ -25,4 +25,6 @@ class MetasploitDataModels::Search::Visitor::Includes
25
25
  visit 'Metasploit::Model::Search::Operator::Attribute' do |_operator|
26
26
  []
27
27
  end
28
+
29
+ Metasploit::Concern.run(self)
28
30
  end