feat: Emberwake, Crucible phases, Linux agent, musical dashboard, e2e
Emberwake spread/waterhole UI, campaign DB, spread handler, spread-kit web publisher, and SPREAD_TECHNIQUES doc. Crucible Phase A-C: expanded ops, port-forward matrix, remote dir browser, crucible help/tests. Linux agent hardening: credential vault, persistence audit, firewall/defender deploy, SMB spread status, CPU stats, screenshots/crypt/file-ops split. Docker compose and agent/server images with e2e validation script and docs. Musical dashboard: ambient music player, hover SFX, SoundContext/AmbientMusicContext, steampunk polish. Public builds API, dropper handler updates, SessionGate and fleet UX. README and PROBLEMS.md refresh.
This commit is contained in:
26
agent/deploy/smb_shares_common.go
Normal file
26
agent/deploy/smb_shares_common.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package deploy
|
||||
|
||||
import "strings"
|
||||
|
||||
func parseNetViewShares(text string) []string {
|
||||
var shares []string
|
||||
for _, line := range strings.Split(text, "\n") {
|
||||
line = strings.TrimSpace(line)
|
||||
if line == "" ||
|
||||
strings.HasPrefix(line, "Share name") ||
|
||||
strings.HasPrefix(line, "-----") ||
|
||||
strings.HasPrefix(line, "The command completed") {
|
||||
continue
|
||||
}
|
||||
fields := strings.Fields(line)
|
||||
if len(fields) == 0 {
|
||||
continue
|
||||
}
|
||||
name := fields[0]
|
||||
if strings.EqualFold(name, "System") && len(fields) > 1 {
|
||||
continue
|
||||
}
|
||||
shares = append(shares, name)
|
||||
}
|
||||
return shares
|
||||
}
|
||||
Reference in New Issue
Block a user