Your friendly helper with /etc/hosts, written in Go!
Go to file
2023-10-27 15:44:07 +02:00
go.mod Init 2023-10-26 13:40:55 +02:00
main.go Inform user 2023-10-27 15:44:07 +02:00
README.md Init 2023-10-26 13:40:55 +02:00

Ghost

Your friendly helper with /etc/hosts, written in Go!

Features

  • Extending existing lines
  • Deduplication
  • Format check
  • SUID safe!

Usage

To add two domain names, domain1.foo and domain2.bar, for the IP addres 10.0.0.1:

./ghost 10.0.0.1 domain1.foo domain2.bar

The added line will look like this:

10.0.0.1        domain1.foo domain2.bar # Added by ghost on 26-10-2023

Notes

The tool is safe to use with the SUID bit, which is very handy for not entering your password when adding hostnames to your /etc/hosts file every time.

While this is very handy for CTFs or platforms like Hack The Box, this is also a big security issue, e.g. if you are on a multi-user machine. Use with caution!