test
This commit is contained in:
parent
577a12d5c0
commit
00385479f4
@ -33,21 +33,26 @@ func CreateShellAliases(data []string, username string, config config.Config) {
|
|||||||
message := fmt.Sprintf("%vecho \"Authenticating as: %v\";%v", greentext, remoteUser, resettext)
|
message := fmt.Sprintf("%vecho \"Authenticating as: %v\";%v", greentext, remoteUser, resettext)
|
||||||
|
|
||||||
// TXT Record Parsing
|
// TXT Record Parsing
|
||||||
if strings.Contains(txt, "SSH_PORT") {
|
|
||||||
port := strings.TrimLeft(txt, "SSH_PORT=")
|
txtSplit := strings.Split(txt, ";")
|
||||||
racOpts = fmt.Sprintf("ssh -AXt -p %v -l", port)
|
|
||||||
} else if strings.Contains(txt, "OS_FAMILY") {
|
for _, i := range txtSplit {
|
||||||
osFamily := strings.Split(txt, "=")
|
if strings.Contains(i, "SSH_PORT") {
|
||||||
if osFamily[1] == "ESXi" {
|
port := strings.TrimLeft(i, "SSH_PORT=")
|
||||||
sudo = ""
|
racOpts = fmt.Sprintf("ssh -AXt -p %v -l", port)
|
||||||
remoteUser = "root"
|
} else if strings.Contains(i, "OS_FAMILY") {
|
||||||
} else if osFamily[1] == "Windows" {
|
osFamily := strings.Split(i, "=")
|
||||||
prerac = fmt.Sprintf("%vecho \"Password: \"; %v", redtext, resettext)
|
if osFamily[1] == "ESXi" {
|
||||||
hop = "ssh -XCAT"
|
sudo = ""
|
||||||
rac = "rdesktop"
|
remoteUser = "root"
|
||||||
windowsDomain := ""
|
} else if osFamily[1] == "Windows" {
|
||||||
racOpts = fmt.Sprintf("-r clipboard:CLIPBOARD -a 16 -k en-us -g %v -p - %v -u", windowsGeometry, windowsDomain)
|
prerac = fmt.Sprintf("%vecho \"Password: \"; %v", redtext, resettext)
|
||||||
sudo = ""
|
hop = "ssh -XCAT"
|
||||||
|
rac = "rdesktop"
|
||||||
|
windowsDomain := ""
|
||||||
|
racOpts = fmt.Sprintf("-r clipboard:CLIPBOARD -a 16 -k en-us -g %v -p - %v -u", windowsGeometry, windowsDomain)
|
||||||
|
sudo = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user