> For the complete documentation index, see [llms.txt](https://p0db0t.gitbook.io/pentest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://p0db0t.gitbook.io/pentest/udp/69-tftp.md).

# 69 ) TFTP

* Enumerations

```bash
## ------------------| Nmap Script
nmap -n -Pn -sU -p69 -sV --script tftp-enum $IP

## ------------------| Metasploit 
use auxiliary/admin/tftp/tftp_transfer_util

## ------------------| Connect 
tftp -m binary $IP

## ------------------| Upload/Download file
get C:\\PROGRA~1\\file.txt
put C:\\PROGRA~1\\file.txt
```

* Python script for upload & download \[[source](https://book.hacktricks.xyz/pentesting/69-udp-tftp)]

```python
import tftpy
client = tftpy.TftpClient("<ip>", 69)
client.download("C:\\PROGRA~1\\file.txt", "/tmp/file.txt", timeout=5)
client.upload("C:\\PROGRA~1\\file.txt", "/tmp/file.txt", timeout=5)
```
