π FTP Downloads
π FTP Downloads β Old-School but Still Useful!
FTP (File Transfer Protocol) runs on TCP ports 21 & 20 and is another handy method for moving files around a network. π―
You can use:
π¦ The built-in Windows FTP client
π» PowerShellβs
Net.WebClient
class
π Step 1: Set Up Your Own FTP Server (Pwnbox Side)
Use Python3 and the module pyftpdlib
to quickly spin up an FTP server:
Then launch the server on port 21 (default is 2121):
β This will allow anonymous logins by default (no username or password required).
πͺ Step 2: Download Files Using PowerShell
Hereβs a simple one-liner to pull a file from your FTP server:
π This saves file.txt
from the FTP server into the Public
directory.
π§° Bonus: Using FTP with a Script (Non-Interactive Shell)
If you're working with a limited shell (interactive shell), here's how to automate FTP with a command file:
π‘ This runs all the FTP steps automatically.
Example output:
Then check your file with:
π Output:
π¨ Quick Tips
π‘οΈ FTP is unencrypted! Avoid using it on sensitive or public networks.
π If needed, add authentication to your server.
πΎ
binary
mode ensures file integrity when transferring non-text files.
Last updated