diff --git a/docs/assets/commands/getflag/demo.png b/docs/assets/commands/getflag/demo.png new file mode 100644 index 0000000..c3ab7c9 Binary files /dev/null and b/docs/assets/commands/getflag/demo.png differ diff --git a/docs/assets/commands/hosts/add.png b/docs/assets/commands/hosts/add.png new file mode 100644 index 0000000..70ef0fb Binary files /dev/null and b/docs/assets/commands/hosts/add.png differ diff --git a/docs/assets/commands/hosts/delete.png b/docs/assets/commands/hosts/delete.png new file mode 100644 index 0000000..de1f0c2 Binary files /dev/null and b/docs/assets/commands/hosts/delete.png differ diff --git a/docs/assets/commands/start/search.png b/docs/assets/commands/start/search.png index 1565cd2..7fbec45 100644 Binary files a/docs/assets/commands/start/search.png and b/docs/assets/commands/start/search.png differ diff --git a/docs/assets/commands/status/status.png b/docs/assets/commands/status/status.png index fc5398d..52c5679 100644 Binary files a/docs/assets/commands/status/status.png and b/docs/assets/commands/status/status.png differ diff --git a/docs/assets/commands/stop/stop.png b/docs/assets/commands/stop/stop.png index 8823222..dc54ee3 100644 Binary files a/docs/assets/commands/stop/stop.png and b/docs/assets/commands/stop/stop.png differ diff --git a/docs/assets/commands/submit/achievement.png b/docs/assets/commands/submit/achievement.png new file mode 100644 index 0000000..c52174f Binary files /dev/null and b/docs/assets/commands/submit/achievement.png differ diff --git a/docs/assets/commands/submit/achievement2.png b/docs/assets/commands/submit/achievement2.png new file mode 100644 index 0000000..454f737 Binary files /dev/null and b/docs/assets/commands/submit/achievement2.png differ diff --git a/docs/assets/commands/submit/challenge.png b/docs/assets/commands/submit/challenge.png index da0f204..7fc9741 100644 Binary files a/docs/assets/commands/submit/challenge.png and b/docs/assets/commands/submit/challenge.png differ diff --git a/docs/assets/commands/submit/endgame.png b/docs/assets/commands/submit/endgame.png index 570782f..3b474c1 100644 Binary files a/docs/assets/commands/submit/endgame.png and b/docs/assets/commands/submit/endgame.png differ diff --git a/docs/assets/commands/submit/fortress.png b/docs/assets/commands/submit/fortress.png index b736d61..590b24a 100644 Binary files a/docs/assets/commands/submit/fortress.png and b/docs/assets/commands/submit/fortress.png differ diff --git a/docs/assets/commands/submit/machine.png b/docs/assets/commands/submit/machine.png index ab38647..68f4257 100644 Binary files a/docs/assets/commands/submit/machine.png and b/docs/assets/commands/submit/machine.png differ diff --git a/docs/assets/commands/submit/prolab.png b/docs/assets/commands/submit/prolab.png index 86b8376..2111778 100644 Binary files a/docs/assets/commands/submit/prolab.png and b/docs/assets/commands/submit/prolab.png differ diff --git a/docs/assets/commands/submit/ra.png b/docs/assets/commands/submit/ra.png index 051af52..680e2ab 100644 Binary files a/docs/assets/commands/submit/ra.png and b/docs/assets/commands/submit/ra.png differ diff --git a/docs/assets/commands/update/update.png b/docs/assets/commands/update/update.png index f80f398..840cf11 100644 Binary files a/docs/assets/commands/update/update.png and b/docs/assets/commands/update/update.png differ diff --git a/docs/assets/commands/version/version.png b/docs/assets/commands/version/version.png index bc853a6..e3dae45 100644 Binary files a/docs/assets/commands/version/version.png and b/docs/assets/commands/version/version.png differ diff --git a/docs/commands/getflag.md b/docs/commands/getflag.md new file mode 100644 index 0000000..f5cc107 --- /dev/null +++ b/docs/commands/getflag.md @@ -0,0 +1,17 @@ +# Getflag + +The **getflag** command will make an **SSH connection** to a remote server and try to locate the **user.txt** file in the **home directories**. If the file is found, the flag is submitted directly via the HackTheBox API. + +The `-u` / `--username` option is used to specify the **username**. + +The `-p` / `--password` option specifies the **password**. + +The `--host` option specifies the **hostname**. + +The `-P` / `--port` option specifies the **SSH port** (Default: 22). + +```bash +htb-cli getflag -u jaeger -p 'Sh0ppyBest@pp!' --host 10.10.11.180 -P 22 --batch +``` + +![Getflag](/assets/commands/getflag/demo.png) \ No newline at end of file diff --git a/docs/commands/hosts.md b/docs/commands/hosts.md new file mode 100644 index 0000000..1506738 --- /dev/null +++ b/docs/commands/hosts.md @@ -0,0 +1,25 @@ +# Hosts + +!!! warning "Command in beta (v1)" + + The **hosts** command is a first version and may have **bugs** that could affect your `/etc/hosts` file. If it contains important information, I advise you to save it to avoid unpleasant surprises. + +The **hosts** command lets the user interact with the `/etc/hosts` file to **add and remove** entries. + +The `-a` / `--add` option specifies the domain to add. + +The `-d` / `--delete` option specifies the domain to delete. + +The `-i` / `--ip` option specifies the IP address associated with the domain. + +```bash +htb-cli hosts -a git.machine.htb -i 10.10.10.10 +``` + +![Add](/assets/commands/hosts/add.png) + +```bash +htb-cli hosts -d dev.machine.htb -i 10.10.10.10 +``` + +![Add](/assets/commands/hosts/delete.png) \ No newline at end of file diff --git a/docs/commands/start.md b/docs/commands/start.md index 25a3dea..aa9ec3e 100644 --- a/docs/commands/start.md +++ b/docs/commands/start.md @@ -2,7 +2,7 @@ ## Machine search -The **start** command starts an instance for a machine. The **machine name** must be specified using the `-m` or `--machine` argument. Once started, its **IP address** is displayed. +The **start** command starts an instance for a machine. The **machine name** must be specified using the `-m` or `--machine` argument. Once started, its **IP address** is displayed as well as the **start-up time**. ```bash htb-cli start -m Visual diff --git a/docs/commands/submit.md b/docs/commands/submit.md index 8587ac5..9bd5350 100644 --- a/docs/commands/submit.md +++ b/docs/commands/submit.md @@ -9,14 +9,24 @@ The **submit** command is used to **submit a flag**. Currently, the following su * Challenges * Fortresses +## Achievements + +When submitting a flag with the **submit command**, if the user has submitted both the user flag and the root flag, a link to the user's achievement will be displayed. + +```bash +htb-cli submit -m Shoppy +``` + +![Achievement](/assets/commands/submit/achievement.png) + +![Achievement2](/assets/commands/submit/achievement2.png) + ## Release Arena If no flag is submitted, then the machine in **release arena** will be chosen. The machine in **release arena** can also be searched via the `-m` or `--machine` flag. -The `-d` or `--difficulty` flag must be used to indicate the **difficulty** of obtaining the flag. - ```bash -htb-cli submit -d 3 +htb-cli submit ``` ![Machine](/assets/commands/submit/ra.png) @@ -25,10 +35,8 @@ htb-cli submit -d 3 A **machine name** can be specified to submit the flag for a specific machine. The `-m` or `--machine` option can be used for this. -The `-d` or `--difficulty` flag must be used to indicate the **difficulty** of obtaining the flag. - ```bash -htb-cli submit -m Sau -d 3 +htb-cli submit -m Sau ``` ![Machine](/assets/commands/submit/machine.png) @@ -76,5 +84,4 @@ The exact name is not essential. A **fuzzy finder** will retrieve the prolab wit htb-cli submit --prolab Dante ``` -![Prolab](/assets/commands/submit/prolab.png) - +![Prolab](/assets/commands/submit/prolab.png) \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 5b08a0f..54cd902 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,9 +22,9 @@ -!!! note "Outdated documentation" +!!! note "Updated documentation !" - Documentation is being written for update v1.6.0. Thank you for understanding. + The documentation is up to date with the latest release on Github (v1.6.0). htb-cli is a project developed and maintained by QU35T-code. It interacts with the **API of HackTheBox**, a popular cybersecurity platform. It responds to the need to be **competitive**, limit user interaction with the website and **save time** with possible actions. diff --git a/mkdocs.yml b/mkdocs.yml index c6842c5..680102a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -67,6 +67,8 @@ nav: - Reset: commands/reset.md - Submit: commands/submit.md - VPN: commands/vpn.md + - Getflag: commands/getflag.md + - Hosts: commands/hosts.md - Status: commands/status.md \ No newline at end of file