ollvm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MaxProb - Maxium probability
	MaxProb = 100
	// MaxBCFLoop - Max loop value
	MaxBCFLoop = 5
	// MaxSubLoop - Max loop value
	MaxSubLoop = 4
	// MaxSplit - Max split value
	MaxSplit = 5
)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clang

type Clang struct {
	ClangRootDir string
	ClangBinDir  string
	ClangExe     string
}

Clang - Holds an instances of a clang install

func InitClang

func InitClang(clangDir string) (*Clang, error)

InitClang - Initalize a Clang struct

func (*Clang) Compile

func (c *Clang) Compile(wd string, args []string) ([]byte, []byte, error)

Compile - Compile C code (no obfuscation)

func (*Clang) ObfCompile

func (c *Clang) ObfCompile(wd string, args []string, obfArgs *ObfArgs) ([]byte, []byte, error)

ObfCompile - Compile obfuscated C code

func (*Clang) Version

func (c *Clang) Version() (string, error)

Version - Get clang version info

type ObfArgs

type ObfArgs struct {

	// Bogus control flow
	BCF     bool `json:"bcf"`
	BCFProb int  `json:"bcf_prob"`
	BCFLoop int  `json:"bcf_loop"`

	// Instructions substitution
	Sub     bool `json:"sub"`
	SubLoop int  `json:"sub_loop"`

	// Control flow flattening
	Flatten      bool `json:"flaten"`
	FlattenSplit int  `json:"flatten_split"`

	AESSeed string `json:"aes_seed"`
}

ObfArgs - Build options

Jump to

Keyboard shortcuts

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