Hack the box is a useful website to learn Pen-Testing .
To start with hack the box first you need to join in it.
click 'JOIN'
It will ask for an invite code. Do you have any invite code?
So Lets hack......
Go to inspect option (Ctrl+shift+I)
In Elements you can see <script defer="" src="/js/inviteapi.min.js"></script>
Now Go to
In this script you can see 'makeInviteCode'
Now go to inspect again and click on console and type 'makeInviteCode()' and press enter
There you can get a data and it is BASE64 encrypted.
so decrypt it using any BASE64 decrypt online sites like https://www.base64decode.org/
After decryption you will the data like this 'In order to generate the invite code, make a POST request to /api/invite/generate'
open terminal and make Post request
curl -XPOST https://www.hackthebox.eu/api/invite/generate
This is my code . the code is different for different ip's.
it is also encoded so decode it same as above.
Then submit the code.
That's all!
Now Register with your details.