Skip to content

module abstracts.abstractFactory


class AbstractFactory

Public Abstract factory class handling standard methods used by child instances

method __init__

__init__() → None

Init method. Register a self.data var containing the raw data that will be used for operations Setup a Logger singleton to self.logger shared var usable by child clases


method generate_random_seed

generate_random_seed() → int

Public method used to generate a random int used as seed Range from: 2^28 to (2^32 - 1)

Returns:

  • int: The generated random seed

method generate_random_string

generate_random_string(
    length: int,
    choices: list = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
) → str

Public method used to generate a random string

Args:

  • length (int): The random string length to generate
  • choices (list, optional): The chars space used for generation. Defaults to string.ascii_letters.

Returns:

  • str: The generated random string

method get_function_hash

get_function_hash(seed: int, name: str) → int

Public method used to hash kernel call to evade with random hex number in order to avoid static analysis detection.

Args:

  • name (str): The kernel call to evade

Returns:

  • int: The kernel call hashed

method remove_tag

remove_tag(name: str) → None

Public method used to remove a TAG pattern in self.data var (dropping the line for clean code at the same time)

Args:

  • name (str): the tag name to remove

method replace_tag

replace_tag(name: str, content: str) → None

Public method used to replace a TAG pattern in data var with content

Args:

  • name (str): the tag name to replace
  • content (str): the content value to replace tag with

This file was automatically generated via lazydocs.