📶 [WIP] RouterOS WinBox bruteforce
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mtbf/service.go

28 lines
493 B

package main
import (
"errors"
)
// TODO: multiple services...
func TryLogin(task *Task, conn *Connection) (res bool, err error) {
defer func() {
if r := recover(); r != nil {
log("srv", 1, "fatal error (panic) in service handler: %v", r)
res = false
switch x := r.(type) {
case string:
err = errors.New(x)
case error:
err = x
default:
err = errors.New("unknown error")
}
}
}()
res, err = NewLegacyWinbox(task, conn).TryLogin()
return res, err
}