@@ -14,6 +14,9 @@ var defaultConfig = ConfFromFile{
|
||||
Type: "1",
|
||||
Acid: "5",
|
||||
Enc: "srun_bx1",
|
||||
OS: "Windows 10",
|
||||
Name: "windows",
|
||||
DoubleStack: false,
|
||||
},
|
||||
Settings: SettingsConf{
|
||||
Basic: BasicConf{
|
||||
|
||||
@@ -13,6 +13,9 @@ type LoginMeta struct {
|
||||
Type string `json:"type" yaml:"type"`
|
||||
Acid string `json:"acid" yaml:"acid"`
|
||||
Enc string `json:"enc" yaml:"enc"`
|
||||
OS string `json:"os" yaml:"os"`
|
||||
Name string `json:"name" yaml:"name"`
|
||||
DoubleStack bool `json:"double_stack" json:"double_stack"`
|
||||
}
|
||||
|
||||
type LoginInfo struct {
|
||||
|
||||
@@ -93,16 +93,25 @@ func (c Srun) DoLogin(clientIP string) error {
|
||||
tokenStr + EncryptedInfo,
|
||||
)
|
||||
|
||||
res, err = c.api.Login(
|
||||
c.LoginInfo.Form.Username,
|
||||
EncryptedMd5,
|
||||
c.LoginInfo.Meta.Acid,
|
||||
clientIP,
|
||||
EncryptedInfo,
|
||||
EncryptedChkstr,
|
||||
c.LoginInfo.Meta.N,
|
||||
c.LoginInfo.Meta.Type,
|
||||
)
|
||||
var doubleStack string
|
||||
if c.LoginInfo.Meta.DoubleStack {
|
||||
doubleStack = "1"
|
||||
} else {
|
||||
doubleStack = "0"
|
||||
}
|
||||
res, err = c.api.Login(&LoginRequest{
|
||||
Username: c.LoginInfo.Form.Username,
|
||||
Password: EncryptedMd5,
|
||||
AcID: c.LoginInfo.Meta.Acid,
|
||||
IP: clientIP,
|
||||
Info: EncryptedInfo,
|
||||
ChkSum: EncryptedChkstr,
|
||||
N: c.LoginInfo.Meta.N,
|
||||
Type: c.LoginInfo.Meta.Type,
|
||||
OS: c.LoginInfo.Meta.OS,
|
||||
Name: c.LoginInfo.Meta.Name,
|
||||
DoubleStack: doubleStack,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user