sharpgen

package
v2.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(config *Config) error

Generate uses .NET core to compile source code and return the assembly as bytes

func Parse

func Parse(options map[string]string) ([]string, error)

Parse is the initial entry point for all extended modules. All validation checks and processing will be performed here The function input types are limited to strings and therefore require additional processing

Types

type Config

type Config struct {
	DotNetBin     string // Location of the `dotnet` executable
	SharpGenBin   string // Location of the SharpGen DLL
	DotNetVersion string // The Dotnet Framework version to target (net35 or net40)
	OutputFile    string // Location where the generated .NET assembly will be save
	OutputKind    string // The OutputKind to use (dll or console)
	Platform      string // The Platform to use (AnyCpy, x86, or x64)
	AssemblyName  string // The name of the assembly to be generated
	SourceCode    string // The source code to compile
	InlineCode    string // CSharp code to compile
	ClassName     string // The name of the class to be generated
	Optimization  bool   // Don't use source code optimization
	Confuse       string // The ConfuserEx ProjectFile configuration
	Verbose       bool   // Enable verbose output to STDOUT
	Help          bool   // Print Help
}

Config is a structure that contains all the necessary information for the SharpGen module to create a payload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL