json

package
v0.0.0-...-006a730 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Json_t

type Json_t struct {
	// Build directory
	Build_directory string `json:"build_directory"` // The directory where everything will be placed

	//  File related stuff
	File_path string             `json:"file_path"`      // file path to the file we are reading
	File_gut  string             `json:"file_gut"`       // Contents of the file we read in
	Functions []functions.Func_t `json:"file_functions"` // A structure containing all functions def in the files

	// The malwares actual code will be found here
	GO_functions []functions.Go_func_t `json:"go_functions"` // Contains all the real go-code functions for the malware
	GO_imports   []string              `json:"go_imports"`   // Contains all imports needed for the malware to work
	GO_const     []string              `json:"go_const"`     // Contains all consts needed for the malware to work
	GO_global    []string              `json:"go_global"`    // Contains all globals needed for the malware to work
	GO_struct    []structs.Go_struct_t `json:"go_struct"`    // Contains all structs

	// Malware content
	Malware_gut      []string `json:"malware_gut"`     // The contents of the malware file
	Malware_Import   []string `json:"malware_imports"` // The libs the user wanted to include
	Malware_src_file string   `json:"malware_src"`     // The name of the malware src file
	Malware_path     string   `json:"malware_path"`    // The go file to compile

	// Malware configurations
	Target_os   string `json:"target_os"`   // The OS you are targeting
	Target_arch string `json:"target_arch"` // Target architecture
	Binary_name string `json:"binary_name"`
	Extension   string `json:"extension"`

	// Compiler configurations
	Debug_mode  bool   `json:"debug_mode"`
	Dump_json   bool   `json:"dump_json"`
	Obfuscate   bool   `json:"obfuscate"`
	Verbose_lvl string `json:"verbose_lvl"`

	// Text editor/window
	Width      int               `json:"width"`        // The width of the text editor/window
	Height     int               `json:"height"`       // The height of the text editor/window
	Title      string            `json:"window_title"` // Title of the window window (not the text editor)
	Html_gut   []string          `json:"html_gut"`     // The html code displayed in the window (not the text editor)
	Js_gut     []string          `json:"js_gut"`       // The javascript code used in the window (not the text editor)
	Css_gut    []string          `json:"css_gut"`      // The css code used in the window (not the text editor)
	Bind_gut   map[string]string `json:"bind_gut"`     // Contains all our bindings set by the user
	Index_file string            `json:"index_file"`   // Index file to utilize

	// Variables
	Var_max  int                        `json:"variable_max"`      // The max amount of allowed variables
	Comp_var []compilevar.Compile_var_t `json:"compile_variables"` // All the compile time variables
	Comp_id  int                        `json:"compile_ID"`        // The current index for the compile variable

	// Debugger behavior
	Debugger_behavior string `json:"debugger_behavior"` // How should the malware behave after detecting a debugger being used?

	// Custom alphabet
	Alphabet []string `json:"alphabet"` // Internal alphabet utilized

	// Function call order
	Boot_functions []string `json:"boot_function"`
	Loop_functions []string `json:"loop_function"`
	End_functions  []string `json:"end_function"`

	// External domain (lib) folders
	External_domain_paths []string `json:"external_domain_paths"`

	// Log object
	Log_object notify.Verbose_t `json:"log_object`
}

func (*Json_t) Add_binding

func (object *Json_t) Add_binding(js_call string, evil_call string)

Adds a binding to the window it's accessible by running `window.<js_call>()` in your html code

func (*Json_t) Add_boot_function

func (object *Json_t) Add_boot_function(new_function_call string)

func (*Json_t) Add_domain

func (object *Json_t) Add_domain(domain_name string)

Adds a domain to the imports

func (*Json_t) Add_end_function

func (object *Json_t) Add_end_function(new_function_call string)

func (*Json_t) Add_external_domains_path

func (object *Json_t) Add_external_domains_path(folder_path string) string

Adds an external domain which the program can use

func (*Json_t) Add_file_gut

func (object *Json_t) Add_file_gut(content string)

Adds all the contents of the read file

func (*Json_t) Add_function

func (object *Json_t) Add_function(name string, f_type string, return_type string, gut []string)

Adds a function to the structure

func (*Json_t) Add_go_const

func (object *Json_t) Add_go_const(new_const string)

Adds a const line to the final go code

func (*Json_t) Add_go_function

func (object *Json_t) Add_go_function(new_func functions.Go_func_t)

Adds a go based function to the final go code

func (*Json_t) Add_go_global

func (object *Json_t) Add_go_global(new_global string)

Adds a global variable line to the final go code

func (*Json_t) Add_go_import

func (object *Json_t) Add_go_import(new_import string)

Adds a import line to the final go code

func (*Json_t) Add_go_imports

func (object *Json_t) Add_go_imports(new_imports []string)

func (*Json_t) Add_go_struct

func (object *Json_t) Add_go_struct(new_struct structs.Go_struct_t)

Adds a structure to the final code

func (*Json_t) Add_index_file

func (object *Json_t) Add_index_file(index_file string)

func (*Json_t) Add_loop_function

func (object *Json_t) Add_loop_function(new_function_call string)

func (*Json_t) Add_malware_line

func (object *Json_t) Add_malware_line(line string)

Adds a single line to the malware gut

func (*Json_t) Add_malware_lines

func (object *Json_t) Add_malware_lines(lines []string)

Adds multiple lines to the malware gut

func (*Json_t) Change_detection_behavior

func (object *Json_t) Change_detection_behavior(tactic string) string

Sets the behavior tactic that the malware will undertaken if it detects that it's being launched with the help of a debugger

func (*Json_t) Check_global_var

func (object *Json_t) Check_global_var(var_name string) bool

Checks if the provided string is a global variable

func (*Json_t) Disable_obfuscate

func (object *Json_t) Disable_obfuscate()

Makes the source code readable

func (*Json_t) Dump

func (object *Json_t) Dump() []byte

Creates byte code from our json structure

func (*Json_t) Enable_obfuscate

func (object *Json_t) Enable_obfuscate(value string) string

Obfuscates the program

func (*Json_t) Generate_int_array

func (object *Json_t) Generate_int_array(message string) []int

Generates an int array representing the provided string

func (*Json_t) Generate_int_array_parameter

func (object *Json_t) Generate_int_array_parameter(message string) string

Generates a string which in turn represents an int array based on the input message

func (*Json_t) Get_alphabet

func (object *Json_t) Get_alphabet() string

Returns a string consisting of the internal alphabet

func (*Json_t) Get_external_domains_path

func (object *Json_t) Get_external_domains_path() []string

Returns an array containing all externally defined domain paths

func (*Json_t) Get_var_value

func (object *Json_t) Get_var_value(var_id string) string

Grabs the value of a compiletime variable

func (*Json_t) Set_alphabet

func (object *Json_t) Set_alphabet(alphabet string) string

Sets the internal alphabet utilized by the malware

func (*Json_t) Set_binary_name

func (object *Json_t) Set_binary_name(name string) string

Sets the binaries name

func (*Json_t) Set_build_directory

func (object *Json_t) Set_build_directory(new_bd string) string

Set the build directory

func (*Json_t) Set_css

func (object *Json_t) Set_css(content string)

Sets the css code being used in the window

func (*Json_t) Set_debug_mode

func (object *Json_t) Set_debug_mode(mode string) string

Sets the debug mode that the compiler will obey

func (*Json_t) Set_dump_json

func (object *Json_t) Set_dump_json(value string) string

Print the json object after compilation

func (*Json_t) Set_extension

func (object *Json_t) Set_extension(ext string) string

Sets the the extension

func (*Json_t) Set_file_path

func (object *Json_t) Set_file_path(new_path string) string

Updates the internal file path

func (*Json_t) Set_height

func (object *Json_t) Set_height(value string)

Sets the height of the text editor

func (*Json_t) Set_html

func (object *Json_t) Set_html(content string)

Sets the html code being displayed

func (*Json_t) Set_js

func (object *Json_t) Set_js(content string)

Sets the js code being used in the window

func (*Json_t) Set_target_arch

func (object *Json_t) Set_target_arch(arch string) string

Sets the target arch for the compiler

func (*Json_t) Set_target_os

func (object *Json_t) Set_target_os(os string) string

Sets the target os for the compiler

func (*Json_t) Set_title

func (object *Json_t) Set_title(value string)

Sets the height of the text editor

func (*Json_t) Set_variable_value

func (object *Json_t) Set_variable_value(value string)

Sets the value of a compiletime variable

func (*Json_t) Set_verbose_lvl

func (object *Json_t) Set_verbose_lvl(value string) string

Sets how verbose the program should be

func (*Json_t) Set_width

func (object *Json_t) Set_width(value string)

Sets the width of the text editor

Jump to

Keyboard shortcuts

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