SIDN / CycleHunter

Python software that reads zone files, extract NS records, and detect cyclic dependencies
https://tsuname.io
BSD 2-Clause "Simplified" License
37 stars 14 forks source link

More generic way to split fields in input zonefiles #4

Closed dirkvdplas closed 3 years ago

dirkvdplas commented 3 years ago

Hey Giovane,

Just a small change to better handle zonefiles as some of then are split on \t and others without (at least in our environment). split() splits on whitespace in general

Dirk

gmmoura commented 3 years ago

thanks for submitting this PR. will test tomorrow with my zones and let you know

dirkvdplas commented 3 years ago

Hey Giovane,

I did another PR. This fixes bug in fullDepParser.py https://github.com/SIDN/CycleHunter/compare/main...dirkvdplas:improvements#diff-f9cd26ba7c2c112de1b5fe4c2667f7410318a296be1f686e04f4222a53b6dfde, and zonematcher.py (pay attention to lines 56-61!!!) Regex matching might be more robust way to go. Performance wise this should not matter much

I am quite new to github, so please forgive me ;-)

Dirk

On Mon, Feb 8, 2021 at 4:14 PM Giovane Moura notifications@github.com wrote:

thanks for submitting this PR. will test tomorrow with my zones and let you know

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SIDN/CycleHunter/pull/4#issuecomment-775218545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6FMIVXF7ABKFW7PE6PKI3S575UHANCNFSM4XI6JSPQ .

gmmoura commented 3 years ago

I think the solution would be regex + have some instrumentation that allows the code to tell if the file is tab or space separated, and which position the NS records are located.

gmmoura commented 3 years ago

(i guesss it is a bit duplicate of the previous PR)

gmmoura commented 3 years ago

we re-wrote the parser, so this shoudl be already covered