Get Invite Code Hack The Box

Hack The Box: Get Invite Code Hack The Box
------------------------------------------

1. Open URL : https://www.hackthebox.eu/invite

2. In Chrome browser --> Open Developer Tools --> tab Elements --> copy attribut src(/js/inviteapi.min.js)

3. open newtab in browser --> https://www.hackthebox.eu/js/inviteapi.min.js --> found function : makeInviteCode

4. back to Developer tools --> execute : makeInviteCode();

data: {…}
data: "SW4gb3JkZXIgdG8gZ2VuZXJhdGUgdGhlIGludml0ZSBjb2RlLCBtYWtlIGEgUE9TVCByZXF1ZXN0IHRvIC9hcGkvaW52aXRlL2dlbmVyYXRl"
enctype: "BASE64"

5. Copy base64 data: "SW4gb3JkZXIgdG8gZ2VuZXJhdGUgdGhlIGludml0ZSBjb2RlLCBtYWtlIGEgUE9TVCByZXF1ZXN0IHRvIC9hcGkvaW52aXRlL2dlbmVyYXRl" --> 
open url https://www.base64decode.org/ --> copy base64 data --> result : In order to generate the invite code, make a POST request to /api/invite/generate

6. open terminal / console --> curl -XPOST https://www.hackthebox.eu/api/invite/generate --> result : 
{"success":1,"data":{"code":"TkVXUEYtUkhMWlEtQ1BER08tQUlPQ1EtWEROWlU=","format":"encoded"},"0":200}%

7. back to url https://www.base64decode.org/ --> paste base64 code "TkVXUEYtUkhMWlEtQ1BER08tQUlPQ1EtWEROWlU=" --> result : NEWPF-RHLZQ-CPDGO-AIOCQ-XDNZU <-- copy

8. back to url https://www.hackthebox.eu/invite --> paste : NEWPF-RHLZQ-CPDGO-AIOCQ-XDNZU

9. now your in register page, input your data --> end register --> verify your email

10. done