sysinfo

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sysinfo collects detailed system information to demonstrate what data info stealers can access on developer machines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStableHostname added in v0.4.0

func GetStableHostname() (string, error)

GetStableHostname returns a hostname that is stable across network changes. On macOS, it uses scutil --get LocalHostName which returns the user-set ComputerName rather than the DHCP-assigned name. Falls back to os.Hostname().

Types

type ExtendedInfo

type ExtendedInfo struct {
	System *SystemInfo `json:"system,omitempty"`
}

ExtendedInfo holds all extended host information

func Collect

func Collect(ctx context.Context) (*ExtendedInfo, error)

Collect gathers extended system information. It uses graceful degradation - if collection fails, it is logged and the function returns partial information.

type SystemInfo

type SystemInfo struct {
	OSVersion     string    `json:"os_version,omitempty"`
	KernelVersion string    `json:"kernel_version,omitempty"`
	CPUModel      string    `json:"cpu_model,omitempty"`
	CPUCores      int       `json:"cpu_cores,omitempty"`
	RAMTotalGB    float64   `json:"ram_total_gb,omitempty"`
	BootTime      time.Time `json:"boot_time,omitempty"`
	Timezone      string    `json:"timezone,omitempty"`
}

SystemInfo contains detailed system information

Jump to

Keyboard shortcuts

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