Skip to content

A Windows compatible version built with some added improvements.#12

Closed
Alb4don wants to merge 1 commit intoPanchajanya1999:masterfrom
Alb4don:master
Closed

A Windows compatible version built with some added improvements.#12
Alb4don wants to merge 1 commit intoPanchajanya1999:masterfrom
Alb4don:master

Conversation

@Alb4don
Copy link

@Alb4don Alb4don commented Jan 14, 2026

  • I found the project interesting and decided to contribute a little, especially for those who also use Windows. Considering the issue of DNS queries without external dependencies, I implemented direct communication via UDP socket with the DNS servers. I chose this approach because it works identically on Windows, Linux, and macOS, without the need for platform-specific tools like dig or nslookup.
  • The original bash script used temporary files for inter-process communication, which works but creates race conditions, so I replaced that with proper concurrent data structures (Python's lock). Log write operations acquire a mutex before being written, ensuring that log files are not corrupted, even with 50 simultaneous operations.
  • I also added an input sanitization layer. IP addresses are parsed by their respective libraries (ipaddress and the validate module in Python), which handles edge cases like leading zeros, shorthand notation, and malformed addresses well.
  • Handling filenames for export is done using os.path.basename(), helping to avoid directory traversal attempts. I've seen many tools that blindly accept ../../../../etc/passwdum filenames as valid for output.
  • It's important to mention that the correlation analysis combines DNS query times (70% weight) and network latency (30% weight) to identify servers that are fast at resolving and are close to you in terms of network connectivity. I chose these weights after testing several combinations.
  • Finally, I performed some tests using Windows and Linux environments with different network configurations, and it worked well.

pingerr

This comment was marked as outdated.

@Panchajanya1999
Copy link
Owner

@Alb4don good work! i wrote it exclusively in shell because I handle servers which don't even have python installed, and shell does the exact thing without any big dependencies or installing a whole new language to just run a script.

If you want to add Windows support, make sure you rewrite it as a batch file, which can run natively with as less as possible dependencies.

I am closing this PR without merging. A new PR is much welcome with the above points in mind!

I hope you get the point, have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants