> For the complete documentation index, see [llms.txt](https://ed4m4s.blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ed4m4s.blog/tools/various-commands.md).

# Misc. Commands

#### Decode base64/58

```
echo -n ........base64here........ | base64 -d
echo -n ........base64here........ | base58 -d
```

#### Windows hidden files

```
dir /a     ---> should show hidden folders.
dir /a:d  ---> shows all directories.
dir /a:h  ---> shows all hidden files.
```

#### PWD command for Windows

```
<?php
echo shell_exec("echo %cd%");
?>
```

#### shell\_exec() VS system() VS exec()

```
shell_exec — Execute command via shell and return the complete output as a string
system     — Execute an external program and display the output
exec       — Execute an external program

# More info here:
https://www.php.net/manual/en/function.exec.php 
https://www.php.net/manual/en/function.system.php
https://www.php.net/manual/en/function.shell-exec.php
```

#### List VHD with 7z

```
7z l filename.vhd
```

#### Use PSExec to login to the target.&#x20;

```
Located in:
/usr/share/doc/python-impacket/examples/psexec.py

Execute:
python psexec.py administrator@10.10.10.10
```

#### Use Evil-Winrm to login to the target

```
ruby evil-winrm.rb -i 10.10.10.10 -u username -p 'password_here'
```

#### Database dump

```
sqlite3 name_of_the_db.db .dump
```

#### Setting PATH

```
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ed4m4s.blog/tools/various-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
