Cat the inputbinfile-to-encode just generated to display the text encoded file in your SecureCRT / Putty / SuperPutty etc. Line wrapping is perhaps not needed if you will copy paste the data.īase64 Encoded string chunk with line wrappingįor a complete list of possible accepted arguments check here. The -w0 option is given to disable line wrapping. Encode the binary file with base64 base64 -w0 inputbinfile-to-encode > outputbin-file.base64 On Server Host A encode with md5sum md5sum -b /tmp/inputbinfile-to-encodeĦ6c4d7b03ed6df9df5305ae535e40b7d *inputbinfile-to-encodeĪs you see one good location to encode the file would be /tmp as this is a temporary home or you can use alternatively your HOME dirīut you have to be quite careful to not run out of space if you produce it anywhere □Ģ. The file copy process to the highly secured PCI host goes like this:ġ. Keep in mind, that this hack to copy the binary from Machine A to Machine B of course depends on the Copy / Paste buffer being enabled both on remote Jump host or Citrix from where you reach the servers as well as your own PC laptop from where you access the remote side.īase64 Encoding and Decoding text strings legend The main use of base64 encoding to encode non-text Attachment files to Electronic Mail, but for our case it fits perfectly. Base64 binary is pretty standard in most Linux / Unix OS-es today on most Linux distributions it is part of the coreutils package. In this article, I'll show how this is done with base64 and uuencode. Then decode the encoded file with an encoding tool such as base64 or uuencode. The way to complete the binary file copy is to Encode the binary on Server Host A and then, use cat command to display the encoded string and copy whole encoded cat command output to your (local PC buffer from where you access the remote side via SSH via the CITRIX or Jump host.). Or for example if you have 2 or more servers that are in a special Demilitarized Network Zones ( DMZ ) and the machines does not have SFTP / FTP / WebServer or other kind of copy protocol service that can be used to copy files between the hosts and you still need to copy some files between the 2 or more machines in a slow but still functional way, then you might not know of one old school hackers trick you can employee to complete the copy of files between DMZ-ed Server Host A lets say with IP address (192.168.50.5) -> Server Host B (192.168.30.7). If you have to work on servers in a protected environments that are accessed via multiple VPNs, Jump hosts or Web Citrix and you have no mean to copy binary files to your computer or from your computer because you have all kind of FTP / SFTP or whatever Data Copy clients disabled on remote jump host side or CITRIX server and you still are looking for a way to copy files between your PC and the Remote server Side.
0 Comments
Leave a Reply. |