π‘ FTP Uploads
π‘ FTP Uploads β Sending Files the Old-School Way
Just like downloading files via FTP, you can upload files using either:
PowerShell
The classic Windows FTP client
Letβs walk through how to set up your FTP server to accept uploads and how to send files from a Windows host! π§
π οΈ Step 1: Start Your FTP Server with Upload Support
Use the pyftpdlib
Python module. But this time, include the --write
flag to allow uploads βοΈ
β οΈ You may see this warning:
That's okay! It just means anonymous users can upload files.
π€ Step 2: Upload a File with PowerShell
Use UploadFile()
from the Net.WebClient
class in PowerShell to push a file:
β
This uploads your Windows hosts
file to the FTP server and saves it as ftp-hosts
.
π Step 3: Use Windows FTP Client to Upload
If you canβt use PowerShell or want to stay old-school, you can create a scriptable FTP command file:
Now run the FTP command using that file:
π‘ This avoids interactivity and runs everything in one go!
π Notes & Tips
binary
ensures the file isnβt corrupted (important for non-text files!).Make sure port 21 is open and accessible.
Consider enabling authentication if you're worried about security.
Last updated