Rewrite dns command

- Cross platform
- Doesn't depend on external tools