Optimize rendering, fix Android app extraction, and remove Cloudflare token leak
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -9,12 +9,40 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"crypto-miner-server/internal/recon"
|
||||
)
|
||||
|
||||
var updateWSFixture = flag.Bool("updateWSFixture", false, "rewrite testdata/ws_types_fixture.json from ws_types.go struct tags")
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
// Enable AI control endpoints for the duration of the API tests
|
||||
os.Setenv("AETHERFORGE_ENABLE_AI_CONTROL", "1")
|
||||
// Stub banner hooks to avoid any real network requests during scans
|
||||
recon.SetBannerHooks(
|
||||
func(host string, port int) string {
|
||||
if port == 22 {
|
||||
return "SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5"
|
||||
}
|
||||
return ""
|
||||
},
|
||||
func(host string, port int) (string, string) {
|
||||
if port == 80 || port == 443 || port == 8080 {
|
||||
return "Test Title", "nginx/1.18.0"
|
||||
}
|
||||
return "", ""
|
||||
},
|
||||
func(host string, port int) string {
|
||||
if port == 5985 {
|
||||
return "winrm_listening"
|
||||
}
|
||||
return ""
|
||||
},
|
||||
func() bool {
|
||||
return false
|
||||
},
|
||||
)
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user