recog 2.3.22 → 3.0.2

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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +2 -0
  3. data/LICENSE +1 -1
  4. data/README.md +25 -16
  5. data/Rakefile +2 -9
  6. data/lib/recog/db_manager.rb +1 -1
  7. data/lib/recog/fingerprint.rb +21 -7
  8. data/lib/recog/fingerprint_parse_error.rb +10 -0
  9. data/lib/recog/match_reporter.rb +37 -3
  10. data/lib/recog/matcher.rb +5 -10
  11. data/lib/recog/verifier.rb +4 -4
  12. data/lib/recog/verify_reporter.rb +7 -6
  13. data/lib/recog/version.rb +1 -1
  14. data/{bin → recog/bin}/recog_match +20 -7
  15. data/{xml → recog/xml}/apache_modules.xml +0 -0
  16. data/{xml → recog/xml}/apache_os.xml +61 -19
  17. data/{xml → recog/xml}/architecture.xml +15 -1
  18. data/{xml → recog/xml}/dhcp_vendor_class.xml +10 -10
  19. data/{xml → recog/xml}/dns_versionbind.xml +16 -13
  20. data/{xml → recog/xml}/favicons.xml +167 -9
  21. data/{xml → recog/xml}/fingerprints.xsd +9 -1
  22. data/{xml → recog/xml}/ftp_banners.xml +131 -141
  23. data/{xml → recog/xml}/h323_callresp.xml +2 -2
  24. data/{xml → recog/xml}/hp_pjl_id.xml +81 -81
  25. data/{xml → recog/xml}/html_title.xml +250 -9
  26. data/{xml → recog/xml}/http_cookies.xml +111 -34
  27. data/{xml → recog/xml}/http_servers.xml +483 -270
  28. data/{xml → recog/xml}/http_wwwauth.xml +83 -37
  29. data/{xml → recog/xml}/imap_banners.xml +10 -10
  30. data/{xml → recog/xml}/ldap_searchresult.xml +0 -0
  31. data/{xml → recog/xml}/mdns_device-info_txt.xml +0 -0
  32. data/{xml → recog/xml}/mdns_workstation_txt.xml +0 -0
  33. data/{xml → recog/xml}/mysql_banners.xml +0 -0
  34. data/{xml → recog/xml}/mysql_error.xml +0 -0
  35. data/{xml → recog/xml}/nntp_banners.xml +8 -5
  36. data/{xml → recog/xml}/ntp_banners.xml +33 -33
  37. data/{xml → recog/xml}/operating_system.xml +92 -77
  38. data/{xml → recog/xml}/pop_banners.xml +25 -25
  39. data/{xml → recog/xml}/rsh_resp.xml +0 -0
  40. data/{xml → recog/xml}/rtsp_servers.xml +0 -0
  41. data/{xml → recog/xml}/sip_banners.xml +16 -5
  42. data/{xml → recog/xml}/sip_user_agents.xml +122 -27
  43. data/{xml → recog/xml}/smb_native_lm.xml +5 -5
  44. data/{xml → recog/xml}/smb_native_os.xml +25 -25
  45. data/{xml → recog/xml}/smtp_banners.xml +132 -131
  46. data/{xml → recog/xml}/smtp_debug.xml +0 -0
  47. data/{xml → recog/xml}/smtp_ehlo.xml +0 -0
  48. data/{xml → recog/xml}/smtp_expn.xml +0 -0
  49. data/{xml → recog/xml}/smtp_help.xml +1 -1
  50. data/{xml → recog/xml}/smtp_mailfrom.xml +0 -0
  51. data/{xml → recog/xml}/smtp_noop.xml +0 -0
  52. data/{xml → recog/xml}/smtp_quit.xml +0 -0
  53. data/{xml → recog/xml}/smtp_rcptto.xml +0 -0
  54. data/{xml → recog/xml}/smtp_rset.xml +0 -0
  55. data/{xml → recog/xml}/smtp_turn.xml +0 -0
  56. data/{xml → recog/xml}/smtp_vrfy.xml +0 -0
  57. data/{xml → recog/xml}/snmp_sysdescr.xml +1248 -1233
  58. data/{xml → recog/xml}/snmp_sysobjid.xml +13 -2
  59. data/{xml → recog/xml}/ssh_banners.xml +9 -5
  60. data/{xml → recog/xml}/telnet_banners.xml +83 -1
  61. data/{xml → recog/xml}/tls_jarm.xml +30 -2
  62. data/{xml → recog/xml}/x11_banners.xml +3 -3
  63. data/{xml → recog/xml}/x509_issuers.xml +24 -4
  64. data/{xml → recog/xml}/x509_subjects.xml +32 -3
  65. data/recog.gemspec +9 -5
  66. data/spec/data/external_example_fingerprint/hp_printer_ex_01.txt +1 -0
  67. data/spec/data/external_example_fingerprint/hp_printer_ex_02.txt +1 -0
  68. data/spec/data/external_example_fingerprint.xml +8 -0
  69. data/spec/data/external_example_illegal_path_fingerprint.xml +7 -0
  70. data/spec/lib/recog/db_spec.rb +84 -61
  71. data/spec/lib/recog/fingerprint_spec.rb +4 -4
  72. data/spec/lib/recog/match_reporter_spec.rb +22 -8
  73. data/spec/lib/recog/verify_reporter_spec.rb +8 -8
  74. data/spec/spec_helper.rb +4 -0
  75. data.tar.gz.sig +0 -0
  76. metadata +154 -142
  77. metadata.gz.sig +0 -0
  78. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -37
  79. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
  80. data/.github/ISSUE_TEMPLATE/fingerprint_request.md +0 -27
  81. data/.github/PULL_REQUEST_TEMPLATE +0 -24
  82. data/.github/SECURITY.md +0 -35
  83. data/.github/dependabot.yml +0 -8
  84. data/.github/workflows/ci.yml +0 -26
  85. data/.github/workflows/verify.yml +0 -89
  86. data/.gitignore +0 -23
  87. data/.rspec +0 -3
  88. data/.ruby-gemset +0 -1
  89. data/.ruby-version +0 -1
  90. data/.snyk +0 -10
  91. data/.travis.yml +0 -25
  92. data/CONTRIBUTING.md +0 -276
  93. data/bin/recog_cleanup +0 -16
  94. data/bin/recog_export +0 -81
  95. data/bin/recog_standardize +0 -163
  96. data/bin/recog_verify +0 -63
  97. data/cpe-remap.yaml +0 -356
  98. data/features/data/failing_banners_fingerprints.xml +0 -20
  99. data/features/data/matching_banners_fingerprints.xml +0 -23
  100. data/features/data/multiple_banners_fingerprints.xml +0 -32
  101. data/features/data/no_tests.xml +0 -3
  102. data/features/data/sample_banner.txt +0 -2
  103. data/features/data/successful_tests.xml +0 -18
  104. data/features/data/tests_with_failures.xml +0 -20
  105. data/features/data/tests_with_warnings.xml +0 -17
  106. data/features/match.feature +0 -36
  107. data/features/support/aruba.rb +0 -3
  108. data/features/support/env.rb +0 -6
  109. data/features/verify.feature +0 -48
  110. data/identifiers/README.md +0 -70
  111. data/identifiers/fields.txt +0 -105
  112. data/identifiers/hw_device.txt +0 -84
  113. data/identifiers/hw_family.txt +0 -121
  114. data/identifiers/hw_product.txt +0 -461
  115. data/identifiers/os_architecture.txt +0 -10
  116. data/identifiers/os_device.txt +0 -75
  117. data/identifiers/os_family.txt +0 -234
  118. data/identifiers/os_product.txt +0 -350
  119. data/identifiers/service_family.txt +0 -249
  120. data/identifiers/service_product.txt +0 -764
  121. data/identifiers/vendor.txt +0 -847
  122. data/lib/recog/verifier_factory.rb +0 -13
  123. data/misc/convert_mysql_err +0 -61
  124. data/misc/order.xsl +0 -17
  125. data/requirements.txt +0 -2
  126. data/spec/lib/fingerprint_self_test_spec.rb +0 -175
  127. data/tools/dev/hooks/pre-commit +0 -21
  128. data/update_cpes.py +0 -250
@@ -75,7 +75,7 @@ describe Recog::Fingerprint do
75
75
  let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[6]) }
76
76
 
77
77
  it "identifies when a parameter defined by a capture group is not included in one example" do
78
- expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:warn, String])
78
+ expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String])
79
79
  end
80
80
  end
81
81
 
@@ -83,7 +83,7 @@ describe Recog::Fingerprint do
83
83
  let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[7]) }
84
84
 
85
85
  it "identifies when two parameters defined by a capture groups are not included in one example" do
86
- expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:warn, String], [:warn, String])
86
+ expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String], [:fail, String])
87
87
  end
88
88
  end
89
89
 
@@ -92,7 +92,7 @@ describe Recog::Fingerprint do
92
92
  let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[8]) }
93
93
 
94
94
  it "identifies when a parameter defined by a capture group is not included in one example" do
95
- expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:warn, String])
95
+ expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String])
96
96
  end
97
97
  end
98
98
 
@@ -100,7 +100,7 @@ describe Recog::Fingerprint do
100
100
  let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[9]) }
101
101
 
102
102
  it "identifies when two parameters defined by a capture groups are not included in one example" do
103
- expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:warn, String], [:warn, String])
103
+ expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String], [:fail, String])
104
104
  end
105
105
  end
106
106
 
@@ -1,31 +1,31 @@
1
1
  require 'recog/match_reporter'
2
2
 
3
3
  describe Recog::MatchReporter do
4
- let(:options) { double(detail: false, quiet: false) }
4
+ let(:options) { double(detail: false, json_format: false, quiet: false, multi_match: false) }
5
5
  let(:formatter) { double('formatter').as_null_object }
6
6
  subject { Recog::MatchReporter.new(options, formatter) }
7
7
 
8
8
  def run_report
9
9
  subject.report do
10
10
  subject.increment_line_count
11
- subject.match 'a match'
11
+ subject.match [{'data' => 'a match'}]
12
12
  subject.failure 'a failure'
13
13
  end
14
14
  end
15
15
 
16
16
  describe "#report" do
17
17
  it "prints matches" do
18
- expect(formatter).to receive(:success_message).with('a match')
18
+ expect(formatter).to receive(:success_message).with('MATCH: {"data"=>"a match"}')
19
19
  run_report
20
20
  end
21
21
 
22
22
  it "prints failures" do
23
- expect(formatter).to receive(:failure_message).with('a failure')
23
+ expect(formatter).to receive(:failure_message).with('FAIL: a failure')
24
24
  run_report
25
25
  end
26
26
 
27
27
  context "with detail" do
28
- subject { Recog::MatchReporter.new(double(detail: true, quiet: false), formatter) }
28
+ subject { Recog::MatchReporter.new(double(detail: true, json_format: false, quiet: false, multi_match: false), formatter) }
29
29
 
30
30
  it "prints the lines processed" do
31
31
  expect(formatter).to receive(:status_message).with("\nProcessed 1 lines")
@@ -37,11 +37,25 @@ describe Recog::MatchReporter do
37
37
  run_report
38
38
  end
39
39
  end
40
+
41
+ context "with JSON" do
42
+ subject { Recog::MatchReporter.new(double(detail: false, json_format: true, quiet: false, multi_match: false), formatter) }
43
+
44
+ it "prints matches" do
45
+ expect(formatter).to receive(:success_message).with('{"data":"a match","match":{}}')
46
+ run_report
47
+ end
48
+
49
+ it "prints failures" do
50
+ expect(formatter).to receive(:failure_message).with('{"data":"a failure","match_failure":true,"match":null}')
51
+ run_report
52
+ end
53
+ end
40
54
  end
41
55
 
42
56
  describe "#print_summary" do
43
57
  context "with all matches" do
44
- before { subject.match 'match' }
58
+ before { subject.match ['match'] }
45
59
 
46
60
  it "prints a successful summary" do
47
61
  msg = "SUMMARY: 1 matches and 0 failures"
@@ -64,7 +78,7 @@ describe Recog::MatchReporter do
64
78
  describe "#stop?" do
65
79
  context "with a failure limit" do
66
80
 
67
- let(:options) { double(fail_fast: true, stop_after: 3, detail: false) }
81
+ let(:options) { double(fail_fast: true, stop_after: 3, detail: false, json_format: false, multi_match: false) }
68
82
  before do
69
83
  subject.failure 'first'
70
84
  subject.failure 'second'
@@ -81,7 +95,7 @@ describe Recog::MatchReporter do
81
95
  end
82
96
 
83
97
  context "with no failure limit" do
84
- let(:options) { double(fail_fast: false, detail: false) }
98
+ let(:options) { double(fail_fast: false, detail: false, json_format: false, multi_match: false) }
85
99
 
86
100
  it "return false" do
87
101
  expect(subject.stop?).to be false
@@ -22,12 +22,12 @@ describe Recog::VerifyReporter do
22
22
 
23
23
  describe "#report" do
24
24
  it "prints warnings" do
25
- expect(formatter).to receive(:warning_message).with('a warning')
25
+ expect(formatter).to receive(:warning_message).with('WARN: a warning')
26
26
  run_report
27
27
  end
28
28
 
29
29
  it "prints failures" do
30
- expect(formatter).to receive(:failure_message).with('a failure')
30
+ expect(formatter).to receive(:failure_message).with('FAIL: a failure')
31
31
  run_report
32
32
  end
33
33
 
@@ -50,12 +50,12 @@ describe Recog::VerifyReporter do
50
50
  end
51
51
 
52
52
  it "prints warnings" do
53
- expect(formatter).to receive(:warning_message).with(' a warning')
53
+ expect(formatter).to receive(:warning_message).with(' WARN: a warning')
54
54
  run_report
55
55
  end
56
56
 
57
57
  it "prints failures" do
58
- expect(formatter).to receive(:failure_message).with(' a failure')
58
+ expect(formatter).to receive(:failure_message).with(' FAIL: a failure')
59
59
  run_report
60
60
  end
61
61
 
@@ -84,12 +84,12 @@ describe Recog::VerifyReporter do
84
84
  subject { Recog::VerifyReporter.new(double(detail: false, quiet: false, warnings: true), formatter, path) }
85
85
 
86
86
  it "prints warnings" do
87
- expect(formatter).to receive(:warning_message).with("#{path}: a warning")
87
+ expect(formatter).to receive(:warning_message).with("#{path}: WARN: a warning")
88
88
  run_report
89
89
  end
90
90
 
91
91
  it "prints failures" do
92
- expect(formatter).to receive(:failure_message).with("#{path}: a failure")
92
+ expect(formatter).to receive(:failure_message).with("#{path}: FAIL: a failure")
93
93
  run_report
94
94
  end
95
95
 
@@ -118,12 +118,12 @@ describe Recog::VerifyReporter do
118
118
  end
119
119
 
120
120
  it "prints warnings" do
121
- expect(formatter).to receive(:warning_message).with(' a warning')
121
+ expect(formatter).to receive(:warning_message).with(' WARN: a warning')
122
122
  run_report
123
123
  end
124
124
 
125
125
  it "prints failures" do
126
- expect(formatter).to receive(:failure_message).with(' a failure')
126
+ expect(formatter).to receive(:failure_message).with(' FAIL: a failure')
127
127
  run_report
128
128
  end
129
129
 
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,10 @@
1
+ FINGERPRINT_DIR = File.expand_path(File.join('..', 'recog', 'xml'), __dir__)
2
+
3
+ # setup code coverage
1
4
  require 'simplecov'
2
5
  SimpleCov.start
3
6
 
7
+ require 'rspec'
4
8
  # This file was generated by the `rspec --init` command. Conventionally, all
5
9
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
6
10
  # The generated `.rspec` file contains `--require spec_helper` which will cause this
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recog
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.22
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rapid7 Research
8
- autorequire:
9
- bindir: bin
10
- cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
8
+ autorequire:
9
+ bindir: recog/bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
14
+ MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
15
+ d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
16
+ b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
17
+ EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
18
+ cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi
19
+ MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c
20
+ JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP
21
+ mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+
22
+ wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4
23
+ VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/
24
+ AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB
25
+ AAGjYzBhMA4G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91
+ YQaTmmNWNI3PCDTyJ2PXUc+bDiNNwcZ7yc5o78UNRvp9Jxghya17Q76c9Ov9wvnv
92
+ dxxQKWGOQy0m4fBrkyjAyH9Djjn81RbQrqYgPuhd5nD0HjN3VUQLhQbIJrk9TVs0
93
+ EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
+ 9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
+ -----END CERTIFICATE-----
96
+ date: 2022-08-24 00:00:00.000000000 Z
12
97
  dependencies:
13
98
  - !ruby/object:Gem::Dependency
14
99
  name: rspec
@@ -52,20 +137,6 @@ dependencies:
52
137
  - - ">="
53
138
  - !ruby/object:Gem::Version
54
139
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: cucumber
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
140
  - !ruby/object:Gem::Dependency
70
141
  name: aruba
71
142
  requirement: !ruby/object:Gem::Requirement
@@ -115,92 +186,94 @@ description: Recog is a framework for identifying products, services, operating
115
186
  email:
116
187
  - research@rapid7.com
117
188
  executables:
118
- - recog_cleanup
119
- - recog_export
120
189
  - recog_match
121
- - recog_standardize
122
- - recog_verify
123
190
  extensions: []
124
191
  extra_rdoc_files: []
125
192
  files:
126
- - ".github/ISSUE_TEMPLATE/bug_report.md"
127
- - ".github/ISSUE_TEMPLATE/feature_request.md"
128
- - ".github/ISSUE_TEMPLATE/fingerprint_request.md"
129
- - ".github/PULL_REQUEST_TEMPLATE"
130
- - ".github/SECURITY.md"
131
- - ".github/dependabot.yml"
132
- - ".github/workflows/ci.yml"
133
- - ".github/workflows/verify.yml"
134
- - ".gitignore"
135
- - ".rspec"
136
- - ".ruby-gemset"
137
- - ".ruby-version"
138
- - ".snyk"
139
- - ".travis.yml"
140
193
  - ".yardopts"
141
- - CONTRIBUTING.md
142
194
  - COPYING
143
195
  - Gemfile
144
196
  - LICENSE
145
197
  - README.md
146
198
  - Rakefile
147
- - bin/recog_cleanup
148
- - bin/recog_export
149
- - bin/recog_match
150
- - bin/recog_standardize
151
- - bin/recog_verify
152
- - cpe-remap.yaml
153
- - features/data/failing_banners_fingerprints.xml
154
- - features/data/matching_banners_fingerprints.xml
155
- - features/data/multiple_banners_fingerprints.xml
156
- - features/data/no_tests.xml
157
- - features/data/sample_banner.txt
158
- - features/data/successful_tests.xml
159
- - features/data/tests_with_failures.xml
160
- - features/data/tests_with_warnings.xml
161
- - features/match.feature
162
- - features/support/aruba.rb
163
- - features/support/env.rb
164
- - features/verify.feature
165
- - identifiers/README.md
166
- - identifiers/fields.txt
167
- - identifiers/hw_device.txt
168
- - identifiers/hw_family.txt
169
- - identifiers/hw_product.txt
170
- - identifiers/os_architecture.txt
171
- - identifiers/os_device.txt
172
- - identifiers/os_family.txt
173
- - identifiers/os_product.txt
174
- - identifiers/service_family.txt
175
- - identifiers/service_product.txt
176
- - identifiers/vendor.txt
177
199
  - lib/recog.rb
178
200
  - lib/recog/db.rb
179
201
  - lib/recog/db_manager.rb
180
202
  - lib/recog/fingerprint.rb
181
203
  - lib/recog/fingerprint/regexp_factory.rb
182
204
  - lib/recog/fingerprint/test.rb
205
+ - lib/recog/fingerprint_parse_error.rb
183
206
  - lib/recog/formatter.rb
184
207
  - lib/recog/match_reporter.rb
185
208
  - lib/recog/matcher.rb
186
209
  - lib/recog/matcher_factory.rb
187
210
  - lib/recog/nizer.rb
188
211
  - lib/recog/verifier.rb
189
- - lib/recog/verifier_factory.rb
190
212
  - lib/recog/verify_reporter.rb
191
213
  - lib/recog/version.rb
192
- - misc/convert_mysql_err
193
- - misc/order.xsl
194
214
  - recog.gemspec
195
- - requirements.txt
215
+ - recog/bin/recog_match
216
+ - recog/xml/apache_modules.xml
217
+ - recog/xml/apache_os.xml
218
+ - recog/xml/architecture.xml
219
+ - recog/xml/dhcp_vendor_class.xml
220
+ - recog/xml/dns_versionbind.xml
221
+ - recog/xml/favicons.xml
222
+ - recog/xml/fingerprints.xsd
223
+ - recog/xml/ftp_banners.xml
224
+ - recog/xml/h323_callresp.xml
225
+ - recog/xml/hp_pjl_id.xml
226
+ - recog/xml/html_title.xml
227
+ - recog/xml/http_cookies.xml
228
+ - recog/xml/http_servers.xml
229
+ - recog/xml/http_wwwauth.xml
230
+ - recog/xml/imap_banners.xml
231
+ - recog/xml/ldap_searchresult.xml
232
+ - recog/xml/mdns_device-info_txt.xml
233
+ - recog/xml/mdns_workstation_txt.xml
234
+ - recog/xml/mysql_banners.xml
235
+ - recog/xml/mysql_error.xml
236
+ - recog/xml/nntp_banners.xml
237
+ - recog/xml/ntp_banners.xml
238
+ - recog/xml/operating_system.xml
239
+ - recog/xml/pop_banners.xml
240
+ - recog/xml/rsh_resp.xml
241
+ - recog/xml/rtsp_servers.xml
242
+ - recog/xml/sip_banners.xml
243
+ - recog/xml/sip_user_agents.xml
244
+ - recog/xml/smb_native_lm.xml
245
+ - recog/xml/smb_native_os.xml
246
+ - recog/xml/smtp_banners.xml
247
+ - recog/xml/smtp_debug.xml
248
+ - recog/xml/smtp_ehlo.xml
249
+ - recog/xml/smtp_expn.xml
250
+ - recog/xml/smtp_help.xml
251
+ - recog/xml/smtp_mailfrom.xml
252
+ - recog/xml/smtp_noop.xml
253
+ - recog/xml/smtp_quit.xml
254
+ - recog/xml/smtp_rcptto.xml
255
+ - recog/xml/smtp_rset.xml
256
+ - recog/xml/smtp_turn.xml
257
+ - recog/xml/smtp_vrfy.xml
258
+ - recog/xml/snmp_sysdescr.xml
259
+ - recog/xml/snmp_sysobjid.xml
260
+ - recog/xml/ssh_banners.xml
261
+ - recog/xml/telnet_banners.xml
262
+ - recog/xml/tls_jarm.xml
263
+ - recog/xml/x11_banners.xml
264
+ - recog/xml/x509_issuers.xml
265
+ - recog/xml/x509_subjects.xml
196
266
  - spec/data/best_os_match_1.yml
197
267
  - spec/data/best_os_match_2.yml
198
268
  - spec/data/best_service_match_1.yml
269
+ - spec/data/external_example_fingerprint.xml
270
+ - spec/data/external_example_fingerprint/hp_printer_ex_01.txt
271
+ - spec/data/external_example_fingerprint/hp_printer_ex_02.txt
272
+ - spec/data/external_example_illegal_path_fingerprint.xml
199
273
  - spec/data/smb_native_os.txt
200
274
  - spec/data/test_fingerprints.xml
201
275
  - spec/data/verification_fingerprints.xml
202
276
  - spec/data/whitespaced_fingerprint.xml
203
- - spec/lib/fingerprint_self_test_spec.rb
204
277
  - spec/lib/recog/db_spec.rb
205
278
  - spec/lib/recog/fingerprint/regexp_factory_spec.rb
206
279
  - spec/lib/recog/fingerprint_spec.rb
@@ -209,62 +282,10 @@ files:
209
282
  - spec/lib/recog/nizer_spec.rb
210
283
  - spec/lib/recog/verify_reporter_spec.rb
211
284
  - spec/spec_helper.rb
212
- - tools/dev/hooks/pre-commit
213
- - update_cpes.py
214
- - xml/apache_modules.xml
215
- - xml/apache_os.xml
216
- - xml/architecture.xml
217
- - xml/dhcp_vendor_class.xml
218
- - xml/dns_versionbind.xml
219
- - xml/favicons.xml
220
- - xml/fingerprints.xsd
221
- - xml/ftp_banners.xml
222
- - xml/h323_callresp.xml
223
- - xml/hp_pjl_id.xml
224
- - xml/html_title.xml
225
- - xml/http_cookies.xml
226
- - xml/http_servers.xml
227
- - xml/http_wwwauth.xml
228
- - xml/imap_banners.xml
229
- - xml/ldap_searchresult.xml
230
- - xml/mdns_device-info_txt.xml
231
- - xml/mdns_workstation_txt.xml
232
- - xml/mysql_banners.xml
233
- - xml/mysql_error.xml
234
- - xml/nntp_banners.xml
235
- - xml/ntp_banners.xml
236
- - xml/operating_system.xml
237
- - xml/pop_banners.xml
238
- - xml/rsh_resp.xml
239
- - xml/rtsp_servers.xml
240
- - xml/sip_banners.xml
241
- - xml/sip_user_agents.xml
242
- - xml/smb_native_lm.xml
243
- - xml/smb_native_os.xml
244
- - xml/smtp_banners.xml
245
- - xml/smtp_debug.xml
246
- - xml/smtp_ehlo.xml
247
- - xml/smtp_expn.xml
248
- - xml/smtp_help.xml
249
- - xml/smtp_mailfrom.xml
250
- - xml/smtp_noop.xml
251
- - xml/smtp_quit.xml
252
- - xml/smtp_rcptto.xml
253
- - xml/smtp_rset.xml
254
- - xml/smtp_turn.xml
255
- - xml/smtp_vrfy.xml
256
- - xml/snmp_sysdescr.xml
257
- - xml/snmp_sysobjid.xml
258
- - xml/ssh_banners.xml
259
- - xml/telnet_banners.xml
260
- - xml/tls_jarm.xml
261
- - xml/x11_banners.xml
262
- - xml/x509_issuers.xml
263
- - xml/x509_subjects.xml
264
- homepage: https://www.github.com/rapid7/recog
285
+ homepage: https://www.github.com/rapid7/recog-ruby
265
286
  licenses: []
266
287
  metadata: {}
267
- post_install_message:
288
+ post_install_message:
268
289
  rdoc_options: []
269
290
  require_paths:
270
291
  - lib
@@ -279,31 +300,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
300
  - !ruby/object:Gem::Version
280
301
  version: '0'
281
302
  requirements: []
282
- rubygems_version: 3.0.3
283
- signing_key:
303
+ rubygems_version: 3.1.6
304
+ signing_key:
284
305
  specification_version: 4
285
306
  summary: Network service fingerprint database, classes, and utilities
286
307
  test_files:
287
- - features/data/failing_banners_fingerprints.xml
288
- - features/data/matching_banners_fingerprints.xml
289
- - features/data/multiple_banners_fingerprints.xml
290
- - features/data/no_tests.xml
291
- - features/data/sample_banner.txt
292
- - features/data/successful_tests.xml
293
- - features/data/tests_with_failures.xml
294
- - features/data/tests_with_warnings.xml
295
- - features/match.feature
296
- - features/support/aruba.rb
297
- - features/support/env.rb
298
- - features/verify.feature
299
308
  - spec/data/best_os_match_1.yml
300
309
  - spec/data/best_os_match_2.yml
301
310
  - spec/data/best_service_match_1.yml
311
+ - spec/data/external_example_fingerprint.xml
312
+ - spec/data/external_example_fingerprint/hp_printer_ex_01.txt
313
+ - spec/data/external_example_fingerprint/hp_printer_ex_02.txt
314
+ - spec/data/external_example_illegal_path_fingerprint.xml
302
315
  - spec/data/smb_native_os.txt
303
316
  - spec/data/test_fingerprints.xml
304
317
  - spec/data/verification_fingerprints.xml
305
318
  - spec/data/whitespaced_fingerprint.xml
306
- - spec/lib/fingerprint_self_test_spec.rb
307
319
  - spec/lib/recog/db_spec.rb
308
320
  - spec/lib/recog/fingerprint/regexp_factory_spec.rb
309
321
  - spec/lib/recog/fingerprint_spec.rb
metadata.gz.sig ADDED
Binary file
@@ -1,37 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
-
5
- ---
6
-
7
- **Describe the bug**
8
- A clear and concise description of what the bug is.
9
-
10
- **To Reproduce**
11
- Steps to reproduce the behavior:
12
-
13
- 1. Do this...
14
- 2. Do that...
15
- 3. Then something happens...
16
-
17
- Code that reproduces the behavior: <!-- This is optional -->
18
- ```ruby
19
- # paste code here, or create a gist, or link to public code snippet
20
- ```
21
-
22
- Matcher that reproduces the behavior: <!-- This is optional -->
23
- ```xml
24
- <!-- paste matcher xml here, or create a gist, or link to public code snippet -->
25
- ```
26
-
27
- **Expected behavior**
28
- A clear and concise description of what you expected to happen.
29
-
30
-
31
- **Environment (please complete the following information):**
32
- - Operating System:
33
- - Ruby Version:
34
- - Recog Version:
35
-
36
- **Additional context**
37
- Add any other context about the problem here.
@@ -1,17 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
-
5
- ---
6
-
7
- **Is your feature request related to a problem? Please describe.**
8
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
-
10
- **Describe the solution you'd like**
11
- A clear and concise description of what you want to happen.
12
-
13
- **Describe alternatives you've considered**
14
- A clear and concise description of any alternative solutions or features you've considered.
15
-
16
- **Additional context**
17
- Add any other context or screenshots about the feature request here.
@@ -1,27 +0,0 @@
1
- ---
2
- name: Fingerprint request
3
- about: Request new fingerprint coverage
4
-
5
- ---
6
-
7
- **Request for new fingerprint(s) for a product**
8
- Briefly describe the product to be fingerprinted, including vendor and version information.
9
- <!-- Include links to relevant public documentation from the vendor or other sources, if available -->
10
-
11
- **Provide details about the product**
12
- What protocol(s) can be used to retrieve identifiable information about the product?
13
- <!-- Examples: Telnet, SSH, SNMP, SMTP, HTTP(S), Vendor Proprietary Protocol -->
14
-
15
- What information can be collected on each protocol?
16
- <!-- Example: HTTP Server banner: nginx/0.8.53 -->
17
-
18
- What request, command, and/or payload can be used to retrieve information on each protocol?
19
- <!-- Use code fences like the below example to preserve formatting -->
20
- ```
21
- HTTP HEAD /
22
-
23
- HTTP GET /info.php
24
- ```
25
-
26
- **Example banner(s) with specific version info**
27
- <!-- Paste raw text here, using code fences to preserve formatting if needed-->
@@ -1,24 +0,0 @@
1
- ## Description
2
- A detailed description of your changes.
3
-
4
-
5
- ## Motivation and Context
6
- Explanation of why these changes are being proposed, including any links to other relevant issues or pull requests.
7
-
8
-
9
- ## How Has This Been Tested?
10
- A clear and concise description of your changes were tested.
11
-
12
-
13
- ## Types of changes
14
- <!--- What types of changes does your code introduce? Remove any that do not apply: -->
15
- - Bug fix (non-breaking change which fixes an issue)
16
- - New feature (non-breaking change which adds functionality)
17
- - Breaking change (fix or feature that would cause existing functionality to change)
18
-
19
-
20
- ## Checklist:
21
- <!--- After submitting the PR, check all of the boxes that apply. -->
22
- - [ ] I have updated the documentation accordingly (or changes are not required).
23
- - [ ] I have added tests to cover my changes (or new tests are not required).
24
- - [ ] All new and existing tests passed.