Closed brutexploiter closed 1 year ago
Hi, does your wordlist contains lines that are longer than 65536 characters?
If not, is there a test case I can use to reproduce this?
Thanks
Hey,
I'm using best-dns-wordlist.txt in my 2 GB VPS I've started facing problem only in my VPS recently
Thanks
edit: Can you confirm that this issue is only from my end and due to memory?
The issue is not due to memory and might not only be on your end. But I've never seen it before.
It's likely happening because puredns is trying to parse a line of text that is longer than 65536 characters. Given that DNS records can't really exceed 255 characters, this is not a case that is handled in puredns. However it's possible that massdns produces a longer line than expected and that would probably cause this issue.
To investigate it further I would need to know the domain you are trying to resolve and I could run a few tests on my end. Feel free to DM me the domain on Twitter if you don't want to share it publicly.
Thanks
We iterated over this issue via DM and we figured out that a corrupted wordlist was causing the issue. The corruption caused the file to have lines longer than 65536 characters, going over the default size of the bufio.Scanner buffer that's reading from the file.
To fix this, we would need to change domainreader.go to use something other than a bufio.Scanner, as simply increasing the buffer size isn't an option given that a corruption can cause a line to have excessively long length.
I'm closing it for now as I don't think it's worth fixing it at the moment but we should definitely consider it if this code is refactored.
puredns error: error resolving domains: bufio.Scanner: token too long