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

Fix zone parsing #2

Closed subbink closed 3 years ago

subbink commented 3 years ago

The parsing of a zone file that has spaces between fields will not find those nameservers. This PR fixes this issue.

There is also a small typo fix included.

gmmoura commented 3 years ago

Thanks @subbink,

Given there's a large variation in way ppl write zone files, I need first to test if this change does not break the parsing for other zones (.nl, .com, .se. .nu), so then I can accepted the PR

gmmoura commented 3 years ago

Stefan, you think you can improve this PR with a detector that see if the files is either space or tab separated? so it can decide on the fly.

that'd be a HUGE help,a nd I can then accept the PR thanks

gmmoura commented 3 years ago

@subbink , I've updated the main branch to with a method that detects if the zone fie is space or tab sep. can you please confirm if your space sep zones are parsed correctlY

thanks

subbink commented 3 years ago

I've changed the new code to work with my zone. @gmmoura, please check and let me know if anything else is needed.

gmmoura commented 3 years ago

this fix issue #12 thanks @subbink