Skip to main content

Module util

Module util 

Source
Expand description

Utility functions used by VM detection techniques. Includes file I/O, registry access, process checking, OS queries, etc.

Modules§

linux

Functions§

dir_exists
Check if a directory exists.
file_exists
Check if a file exists.
find
Check if a string contains a substring (case-sensitive).
find_ci
Check if a string contains a substring (case-insensitive).
get_hostname
Get the hostname of the system.
get_username
Get the current username.
read_file
Read a file to string, returning None on failure.
run_command
Run a command and capture stdout. Returns None on failure.
thread_count
Get the number of logical CPUs/threads.