Para executar esse código, siga os seguintes passos:
11
+
To run this code, follow these steps:
10
12
11
-
1. Instale as dependências do projeto usando o arquivo `requirements.txt`:
13
+
1. Install the project's dependencies using the `requirements.txt` file:
12
14
13
15
```bash
14
16
pip3 install -r requirements.txt
15
17
```
16
18
17
-
2. Execute o script main.py:
19
+
2. Run the main.py script:
18
20
19
21
```bash
20
22
python3 main.py
21
23
```
22
24
23
-
3. Para executar um comando, você pode adicioná-lo como um parâmetro na URL, juntamente com uma autenticação basica de usuario e password, segue um curl de exemplo:
25
+
3. To run a command, you can add it as a parameter in the URL, along with a basic username and password authentication, here's an example curl:
24
26
25
27
```bash
26
28
curl -u admin:password -X GET -i http://localhost:5000/?command=ls -la
27
29
```
28
30
29
-
Se o comando for executado com sucesso, você verá a saída do comando no navegador. Se ocorrer algum erro, você verá uma mensagem de erro.
31
+
If the command runs successfully, you will see the command output in the browser. If an error occurs, you will see an error message.