Documentation ¶
Index ¶
Constants ¶
const ( // GENERICMATCH is a string literal for generic regex matching strings in the executable // GENERICMATCH = `[[:word:]\.\/\(\)\*\[\]\&\%\{\}\$ ]*` GENERICMATCH = `[[:word:]\.\\/ ]*` )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mordor ¶
Mordor is a post compilation obfuscator type that replaces ascii strings out of binary files
func NewMordor ¶
NewMordor returns a new mordor object with some sane defaults added specifically for genesis
func (*Mordor) AddSingleGhost ¶
AddSingleGhost adds a ghost with a filter appended to the end of the regular expression
func (*Mordor) AddSingleGhostLiteral ¶
AddSingleGhostLiteral adds a ghost without building a generic regular expression filter
func (*Mordor) Assault ¶
Assault runs processes the given binary file by enumaerating each orc's filter on it to obfuscate strings out of the file
func (*Mordor) PrintStats ¶
func (m *Mordor) PrintStats()
PrintStats is a debug function that uses the Mordor object's logger and prints stats about which Orcs matched and how many times
type StringDef ¶
type StringDef struct { // unique ID of the string def in relation to the target source tree ID string `json:"id"` // original value of the string as defined in source Value string `json:"value"` // key used to encrypt string with Key rune `json:"key"` // the encrypted data to represent this string Data []rune `json:"data"` }
StringDef represents an instance of an obfuscated string within the gscript compilers intermediate representation
type Stylist ¶
type Stylist struct { sync.RWMutex // Defs is the StringDef slice for all the source code Combs map[*ast.File]*comb // BuildDir is the target build directory BuildDir string // Contains global fileset information for the package this comb belongs to FileSet *token.FileSet }
Stylist creates a new pre-obfuscation tangle manager
func (*Stylist) AddPurpleHairDyeToRoots ¶
AddPurpleHairDyeToRoots creates the tangled hair arrays
func (*Stylist) GetIDLiterals ¶
GetIDLiterals returns all IDs used by all combs in this Stylist
func (*Stylist) GetTheQueenToHerThrown ¶
GetTheQueenToHerThrown re-writes the intermediate representation with the embedded tangled hairs
func (*Stylist) LollerSkateDaStringz ¶
LollerSkateDaStringz walks the build directory package AST