let's do the reverse operation and encode a file so we can decode it on our attack host.

Encode File Using PowerShell

[Convert]::ToBase64String((Get-Content -path "C:\\Windows\\system32\\drivers\\etc\\hosts" -Encoding byte))
base64encodedtexthere

Get-FileHash "C:\\Windows\\system32\\drivers\\etc\\hosts" -Algorithm MD5 | select Hash

We copy this content and paste it into our attack host, use the base64 command to decode it, and use the md5sum application to confirm the transfer happened correctly.

Decode Base64 String in Linux

echo base64encodedtext | base64 -d > hosts

md5sum hosts