All I did was build a version of Powersploits Out-CompressedDLL C# Csharp OutCompresseedDLL. I needed to convert a bin to base64 in c# and not powershell.
Original Author are the creators of Powersploit. I kept all the original Powershell code as comments for your review. REF: https://github.com/PowerShellMafia/PowerSploit/blob/master/ScriptModification/Out-CompressedDll.ps1
This C# code will only output the base64 of the input file. It does not load or execute it. See https://github.com/ceramicskate0/SafetyKatz/tree/master/SafetyKatz for 1 way on how to do that.
You want to pull it down from a web page see my https://github.com/ceramicskate0/dotNET_WebClient_Assembley for info on how to do that.
Legal Notice:
I dont recommend or condone using anything on here for any reason. The scipts here may work, but are just as likely have a chance to break the system they are run on. If you use them you do so at your own risk. I do/have NEVER authorized,condoned, or recommend the use of anything in any of my repos for any reason, even if previously stated. This is a collection of simple code I found useful with my own Kali OS for educational purposes only. All credit goes to the authors whos full URL and/or github account and/or Repo is listed in the section above, please see their sites for more info or issue with their repo's. It should be noted that since these are all publically available. Do not use for evil, malicious purposes, or on machines you do not own.