30 lines
798 B
Markdown
30 lines
798 B
Markdown
# 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](https://www.redhat.com/sysadmin/suid-sgid-sticky-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!**
|
|
|