Your friendly helper with /etc/hosts, written in Go!
go.mod | ||
main.go | ||
README.md |
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!