metasploit_data_models 4.0.1 → 4.0.2

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
  SHA256:
3
- metadata.gz: 5b39228ee81c302b3a79adb5b6b7fd283609315ba4e6ba3ce54fc118975d6169
4
- data.tar.gz: 43d50e8c9c3dd6adcb4944539f45c7cae200b2d6341b4ab37ebbe1aff19583f6
3
+ metadata.gz: 7160a9465ddf37341f8823e9523185b042f1fb99db31e42a79aa25b583ddb676
4
+ data.tar.gz: dfff423e1f177a6bdc6bc85b84225c3a243e2528283e49185d188c76d04808c1
5
5
  SHA512:
6
- metadata.gz: 91e81439cde4eecd56be639a8349554ec16b950f3affd58a13024ec39a55756c49f8e36683f2fea36409cb8bf27eedd44f45b67d9788c2b7dde3455292c53435
7
- data.tar.gz: 9b6e4a077c247d81d1fa24d63e4beb212a91b711ee762e52241b673b77045b08cf0b5e77249df08e73f33ca405e9e3838809ffde2734c53f6bac6a33d0f55887
6
+ metadata.gz: 7c60f29e7ebff8b3c2f1aa0e7a10a9c06a07f186f57c3539deb24419ba65b5d004897ecada92e313b19c38f37c634dcf2dc55765aea3e0e1ae2b126f6748e597
7
+ data.tar.gz: 501f97755d40903d2e25b3476538e498f650209df40c9522e98ddf7eb6ab1bd716e28454eb0ceb289991e22a400b10feb0665e776f0f4d4ee55822888247466f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -113,7 +113,7 @@ class Mdm::Note < ApplicationRecord
113
113
  #
114
114
  # @return [void]
115
115
  def normalize
116
- if data_changed? and ntype =~ /fingerprint/ && host.workspace.present? && !host.workspace.import_fingerprint
116
+ if saved_change_to_data? and ntype =~ /fingerprint/ && host.workspace.present? && !host.workspace.import_fingerprint
117
117
  host.normalize_os
118
118
  end
119
119
  end
@@ -1,6 +1,6 @@
1
1
  module MetasploitDataModels
2
2
  # VERSION is managed by GemRelease
3
- VERSION = '4.0.1'
3
+ VERSION = '4.0.2'
4
4
 
5
5
  # @return [String]
6
6
  #
@@ -471,33 +471,33 @@ RSpec.describe Mdm::Host, type: :model do
471
471
 
472
472
  context 'os normalization' do
473
473
  context '#get_arch_from_string' do
474
- context "should return 'x64'" do
474
+ context "should return 'x86_64'" do
475
475
  it "when the string contains 'x64'" do
476
- expect(host.send(:get_arch_from_string, 'blahx64blah')).to eq('x64')
476
+ expect(host.send(:get_arch_from_string, 'blahx64blah')).to eq('x86_64')
477
477
  end
478
478
 
479
479
  it "when the string contains 'X64'" do
480
- expect(host.send(:get_arch_from_string, 'blahX64blah')).to eq('x64')
480
+ expect(host.send(:get_arch_from_string, 'blahX64blah')).to eq('x86_64')
481
481
  end
482
482
 
483
483
  it "when the string contains 'x86_64'" do
484
- expect(host.send(:get_arch_from_string, 'blahx86_64blah')).to eq('x64')
484
+ expect(host.send(:get_arch_from_string, 'blahx86_64blah')).to eq('x86_64')
485
485
  end
486
486
 
487
487
  it "when the string contains 'X86_64'" do
488
- expect(host.send(:get_arch_from_string, 'blahX86_64blah')).to eq('x64')
488
+ expect(host.send(:get_arch_from_string, 'blahX86_64blah')).to eq('x86_64')
489
489
  end
490
490
 
491
491
  it "when the string contains 'amd64'" do
492
- expect(host.send(:get_arch_from_string, 'blahamd64blah')).to eq('x64')
492
+ expect(host.send(:get_arch_from_string, 'blahamd64blah')).to eq('x86_64')
493
493
  end
494
494
 
495
495
  it "when the string contains 'AMD64'" do
496
- expect(host.send(:get_arch_from_string, 'blahAMD64blah')).to eq('x64')
496
+ expect(host.send(:get_arch_from_string, 'blahAMD64blah')).to eq('x86_64')
497
497
  end
498
498
 
499
499
  it "when the string contains 'aMd64'" do
500
- expect(host.send(:get_arch_from_string, 'blahamd64blah')).to eq('x64')
500
+ expect(host.send(:get_arch_from_string, 'blahamd64blah')).to eq('x86_64')
501
501
  end
502
502
  end
503
503
 
@@ -531,21 +531,21 @@ RSpec.describe Mdm::Host, type: :model do
531
531
  end
532
532
  end
533
533
 
534
- context "should return 'ppc'" do
534
+ context "should return 'PowerPC'" do
535
535
  it "when the string contains 'PowerPC'" do
536
- expect(host.send(:get_arch_from_string, 'blahPowerPCblah')).to eq('ppc')
536
+ expect(host.send(:get_arch_from_string, 'blahPowerPCblah')).to eq('PowerPC')
537
537
  end
538
538
 
539
539
  it "when the string contains 'PPC'" do
540
- expect(host.send(:get_arch_from_string, 'blahPPCblah')).to eq('ppc')
540
+ expect(host.send(:get_arch_from_string, 'blahPPCblah')).to eq('PowerPC')
541
541
  end
542
542
 
543
543
  it "when the string contains 'POWER'" do
544
- expect(host.send(:get_arch_from_string, 'blahPOWERblah')).to eq('ppc')
544
+ expect(host.send(:get_arch_from_string, 'blahPOWERblah')).to eq('PowerPC')
545
545
  end
546
546
 
547
547
  it "when the string contains 'ppc'" do
548
- expect(host.send(:get_arch_from_string, 'blahppcblah')).to eq('ppc')
548
+ expect(host.send(:get_arch_from_string, 'blahppcblah')).to eq('PowerPC')
549
549
  end
550
550
  end
551
551
 
@@ -560,22 +560,22 @@ RSpec.describe Mdm::Host, type: :model do
560
560
  end
561
561
  end
562
562
 
563
- it "should return 'sparc' if the string contains SPARC, regardless of case" do
564
- expect(host.send(:get_arch_from_string, 'blahSPARCblah')).to eq('sparc')
565
- expect(host.send(:get_arch_from_string, 'blahSPaRCblah')).to eq('sparc')
566
- expect(host.send(:get_arch_from_string, 'blahsparcblah')).to eq('sparc')
563
+ it "should return 'Sparc' if the string contains SPARC, regardless of case" do
564
+ expect(host.send(:get_arch_from_string, 'blahSPARCblah')).to eq('Sparc')
565
+ expect(host.send(:get_arch_from_string, 'blahSPaRCblah')).to eq('Sparc')
566
+ expect(host.send(:get_arch_from_string, 'blahsparcblah')).to eq('Sparc')
567
567
  end
568
568
 
569
- it "should return 'arm' if the string contains 'ARM', regardless of case" do
570
- expect(host.send(:get_arch_from_string, 'blahARMblah')).to eq('arm')
571
- expect(host.send(:get_arch_from_string, 'blahArMblah')).to eq('arm')
572
- expect(host.send(:get_arch_from_string, 'blaharmblah')).to eq('arm')
569
+ it "should return 'ARM' if the string contains 'ARM', regardless of case" do
570
+ expect(host.send(:get_arch_from_string, 'blahARMblah')).to eq('ARM')
571
+ expect(host.send(:get_arch_from_string, 'blahArMblah')).to eq('ARM')
572
+ expect(host.send(:get_arch_from_string, 'blaharmblah')).to eq('ARM')
573
573
  end
574
574
 
575
- it "should return 'mips' if the string contains 'MIPS', regardless of case" do
576
- expect(host.send(:get_arch_from_string, 'blahMIPSblah')).to eq('mips')
577
- expect(host.send(:get_arch_from_string, 'blahMiPslah')).to eq('mips')
578
- expect(host.send(:get_arch_from_string, 'blahmipsblah')).to eq('mips')
575
+ it "should return 'MIPS' if the string contains 'MIPS', regardless of case" do
576
+ expect(host.send(:get_arch_from_string, 'blahMIPSblah')).to eq('MIPS')
577
+ expect(host.send(:get_arch_from_string, 'blahMiPslah')).to eq('MIPS')
578
+ expect(host.send(:get_arch_from_string, 'blahmipsblah')).to eq('MIPS')
579
579
  end
580
580
  end
581
581
 
@@ -588,7 +588,7 @@ RSpec.describe Mdm::Host, type: :model do
588
588
  context 'arch' do
589
589
  it 'should return a value for arch if there is one' do
590
590
  result = host.send(:parse_windows_os_str, 'Windows x64')
591
- expect(result['os.arch']).to eq('x64')
591
+ expect(result['os.arch']).to eq('x86_64')
592
592
  end
593
593
 
594
594
  it "should not have an arch key if we don't know the arch" do
@@ -1093,7 +1093,7 @@ RSpec.describe Mdm::Host, type: :model do
1093
1093
  fingerprint = FactoryBot.build(:mdm_retina_fingerprint, :host => host)
1094
1094
  result = host.send(:normalize_scanner_fp, fingerprint).first
1095
1095
  expect(result['os.product']).to eq( 'Windows Server 2003')
1096
- expect(result['os.arch']).to eq('x64')
1096
+ expect(result['os.arch']).to eq('x86_64')
1097
1097
  expect(result['os.version']).to eq('SP2')
1098
1098
  expect(result['os.certainty'].to_f).to eq(0.8)
1099
1099
  end
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: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Huckins
@@ -96,7 +96,7 @@ cert_chain:
96
96
  JI/W23RbIRksG2pioMhd4dCXq3FLLlkOV1YfCwWixNB+iIhQPPZVaPNfgPhCn4Dt
97
97
  DeGjje/qA4fkLtRmOtb9PUBq3ToRDE4=
98
98
  -----END CERTIFICATE-----
99
- date: 2020-04-14 00:00:00.000000000 Z
99
+ date: 2020-07-07 00:00:00.000000000 Z
100
100
  dependencies:
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: metasploit-yard
metadata.gz.sig CHANGED
Binary file