Skip to main content

Module utils

Module utils 

Source
Expand description

Utility functions for common operations\npub mod utils; Utility functions for common operations.

Provides helper functions for:

  • [download]: Downloading files from URLs with progress tracking
  • File operations: Creating tar.gz archives, loading Shurikens from disk
  • Process management: Killing processes by PID or name
  • Port detection: Finding which process is using a given port
  • Configuration parsing: Extracting ports from Apache/Nginx configs

Modules§

download

Structs§

PortOwner

Functions§

create_tar_gz_bytes
get_http_port
get_port_owner
kill_process_by_name
kill_process_by_pid
load_shurikens
normalize_shuriken_name
Normalizes a shuriken name to lowercase for consistent directory naming. This ensures all shuriken directories use lowercase names.
resolve_path