How can I send a binary DNS query over the network using Linux?

0
18
Asked By TechWhiz42 On

Hey everyone, I'm working on a project and I need some help. I want to send a DNS query from my machine, and I've created a binary query complete with the necessary headers. Is there a Linux command that allows me to send this binary file over the network? And does that command include a header? I really appreciate any guidance from those who are knowledgeable about this. Thanks!

3 Answers

Answered By NetworkNinja77 On

You could use tools like `curl` or `nc` (netcat) since they can handle sending binaries along with headers quite easily! They're pretty straightforward to work with too.

TechWhiz42 -

Thanks for the suggestion, I’ll check them out!

Answered By BinaryBandit93 On

Instead of assembling everything from scratch, why not use existing tools like `dig` or `nslookup`? Those are specifically designed for DNS lookups. If you're looking to send data over the network, check out Bash's pseudo-devices like `/dev/tcp` and `/dev/udp`. You can find more about that in various documentation online. Another solid option is `netcat` or `nc`, depending on what Linux distro you're using!

HelpfulHacker07 -

Unless you have a super specific reason, using `dig` is way easier and will save you a lot of hassle. Even low-level languages like C usually don’t write DNS packets by hand—there's no need to reinvent the wheel here!

CuriousCoder99 -

Totally agree! Just look up the manual pages for those tools to get a solid understanding before diving deeper.

Answered By QuestionSkeptic12 On

Honestly, the question seems a bit unclear. What are you trying to achieve by sending a DNS query this way? Are you trying to build something like rsync or FTP? It might help to clarify your end goal instead of just focusing on the implementation details.

TechWhiz42 -

I just want to understand how to send custom DNS queries effectively, but I see your point.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.