3 ms·
I just added two lines to the starting brute-force code: if v, _ := validateCode(passcode); v == 1 { return []string{passcode} }
by shhsshs 7y ago
I just added two lines to the starting brute-force code:
if v, _ := validateCode(passcode); v == 1 {
return []string{passcode}
}
- shurcooL 7y agoYep. Based on the hint for that question, I expect this is the "normal" solution.
- roskilli 7y agoOh heh, I declared another method then used that to set the passcode var (without the var being shadowed), return it to the hardcoded method name, and returned that. // readCodesFromKeypad - get codes from keypad input func readCodesFromKeypad() []string { var passcode string var codes = make([]string, 0) // Agent Getter - bypass keypad input // codes := streamKeypad() // Agent Getter - try brute force login // TODO: not finished, someone's coming... // use shadowed "passcode" to avoid unused var error return append([]string{passcode}, unshadowedMethod()...}[1:] } func unshadowedMethod() []string { codes := []string{passcode} return codes }