diff --git a/spec/app/finders/interesting_findings/duplicator_installer_log_spec.rb b/spec/app/finders/interesting_findings/duplicator_installer_log_spec.rb index 9e7ec17d..43067737 100644 --- a/spec/app/finders/interesting_findings/duplicator_installer_log_spec.rb +++ b/spec/app/finders/interesting_findings/duplicator_installer_log_spec.rb @@ -35,15 +35,47 @@ describe WPScan::Finders::InterestingFindings::DuplicatorInstallerLog do end context 'when the body matches' do - let(:body) { File.read(fixtures.join(filename)) } - - it 'returns the InterestingFinding' do + after do expect(finder.aggressive).to eql WPScan::Model::DuplicatorInstallerLog.new( log_url, confidence: 100, found_by: described_class::DIRECT_ACCESS ) end + + context 'when old versions of the file' do + let(:body) { File.read(fixtures.join('old.txt')) } + + it 'returns the InterestingFinding' do + # handled in after loop above + end + end + + context 'when newest versions of the file' do + context 'when PRO format 1' do + let(:body) { File.read(fixtures.join('pro.txt')) } + + it 'returns the InterestingFinding' do + # handled in after loop above + end + end + + context 'when PRO format 2' do + let(:body) { File.read(fixtures.join('pro2.txt')) } + + it 'returns the InterestingFinding' do + # handled in after loop above + end + end + + context 'when LITE' do + let(:body) { File.read(fixtures.join('lite.txt')) } + + it 'returns the InterestingFinding' do + # handled in after loop above + end + end + end end end end diff --git a/spec/fixtures/finders/interesting_findings/duplicator_installer_log/lite.txt b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/lite.txt new file mode 100644 index 00000000..ed9a32e0 --- /dev/null +++ b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/lite.txt @@ -0,0 +1,5 @@ +******************************************************************************** +* DUPLICATOR-LITE INSTALL-LOG +* STEP1 START @ 04:10:42 +* NOTICE: Do NOT post to public sites or forums +******************************************************************************** \ No newline at end of file diff --git a/spec/fixtures/finders/interesting_findings/duplicator_installer_log/installer-log.txt b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/old.txt similarity index 100% rename from spec/fixtures/finders/interesting_findings/duplicator_installer_log/installer-log.txt rename to spec/fixtures/finders/interesting_findings/duplicator_installer_log/old.txt diff --git a/spec/fixtures/finders/interesting_findings/duplicator_installer_log/pro.txt b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/pro.txt new file mode 100644 index 00000000..465323bc --- /dev/null +++ b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/pro.txt @@ -0,0 +1,5 @@ +******************************************************************************** +* DUPLICATOR-PRO: Install-Log +* STEP1 START @ 04:10:42 +* NOTICE: Do NOT post to public sites or forums +******************************************************************************** \ No newline at end of file diff --git a/spec/fixtures/finders/interesting_findings/duplicator_installer_log/pro2.txt b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/pro2.txt new file mode 100644 index 00000000..56c68fd9 --- /dev/null +++ b/spec/fixtures/finders/interesting_findings/duplicator_installer_log/pro2.txt @@ -0,0 +1,5 @@ +******************************************************************************** +DUPLICATOR PRO INSTALL-LOG +STEP1 START @ 04:10:42 +NOTICE: Do NOT post to public sites or forums +******************************************************************************** \ No newline at end of file