Enhancement parsing. Issue with multiple tables in port's script#76
Open
cactusFriday wants to merge 3 commits intocloudflare:masterfrom
Open
Enhancement parsing. Issue with multiple tables in port's script#76cactusFriday wants to merge 3 commits intocloudflare:masterfrom
cactusFriday wants to merge 3 commits intocloudflare:masterfrom
Conversation
87f3043 to
eb52240
Compare
eb52240 to
795e80c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello there :)
Issue:
I have ran into situation where nmap scanner return results where inside
<script>tag was more than 1
<table>tag. So while parsing raised Exception looks this:On some port were 2 cpes:
ISC BIND 9.9.4 (cpe:/a:isc:bind:9.9.4) (cpe:/o:redhat:enterprise_linux:7)XML fil after
nmapscanning looks like this:I've decided to bring few fixes and handle this problem.
JsonReportBuilder class:
builder._bufferchangesExample of actual parsing results:
ScanResult class:
flan_types.pychanges:FlanXmlParser class:
Core change
Core change is in the dict structure. Now
parser.resultsdict items consists of ScanResult objects, which attributevulnsis dict (defaultdict(list)). So if there are two or more cpes in the same port, it won't break anymore.