# JS Deobuscation

## Commands

| **Command**                                                | **Description**             |
| ---------------------------------------------------------- | --------------------------- |
| `curl http:/SERVER_IP:PORT/`                               | cURL GET request            |
| `curl -s http:/SERVER_IP:PORT/ -X POST`                    | cURL POST request           |
| `curl -s http:/SERVER_IP:PORT/ -X POST -d "param1=sample"` | cURL POST request with data |
| `echo hackthebox \| base64`                                | base64 encode               |
| `echo ENCODED_B64 \| base64 -d`                            | base64 decode               |
| `echo hackthebox \| xxd -p`                                | hex encode                  |
| `echo ENCODED_HEX \| xxd -p -r`                            | hex decode                  |
| `echo hackthebox \| tr 'A-Za-z' 'N-ZA-Mn-za-m'`            | rot13 encode                |
| `echo ENCODED_ROT13 \| tr 'A-Za-z' 'N-ZA-Mn-za-m'`         | rot13 decode                |

## Deobfuscation Websites

| **Website**                                 |
| ------------------------------------------- |
| [JS Console](https://jsconsole.com)         |
| [Prettier](https://prettier.io/playground/) |
| [Beautifier](https://beautifier.io/)        |
| [JSNice](http://www.jsnice.org/)            |

## Misc

| **Command** | **Description**                  |
| ----------- | -------------------------------- |
| `ctrl+u`    | Show HTML source code in Firefox |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ctrl-z.rocks/tools/js-deobuscation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
