Afternoon, Morning and Evening depending on when you are reading this. I’ve come across this one recently and thought I would post it.
You know those situations where you need to copy a file from a machine, but can’t as it’s blocked in RDP, but you can still copy text through RDP. Well, you still can copy files as well. here’s how.
To work around this:-
- Encode the contents of a file.
- Copy the contents over to the destination.
- Decode the text file back to the correct format.
Source machine is Linux
1. base64 <sourcefile.zip> <destfile.txt>
2. Open destfile.txt and copy the contents to the clipboard (can take some time depending on the size)
Destination machine is Windows
- Open Notepad, and paste content in. Save destfile.txt
- Open Command Prompt and navigate to the file location.
- Use Certuitl -decode destfile.txt sourcefile.zip
For the reverse
- Certutil -encode sourcefile.zip destfile.txt
- Copy contents over
- base64 -d destfile.txt sourcefile.zip
Job Done!