MiSecurity / x-patrol

github泄露扫描系统
1.15k stars 303 forks source link

一运行就panic #27

Closed runique closed 5 years ago

runique commented 5 years ago

./x-patrol_darwin_amd64 [0000] PANIC xsec patrol: Error 1045: Access denied for user 'xsec'@'localhost' (using password: YES) panic: (*logrus.Entry) (0xb455e0,0xc00009c730)

goroutine 1 [running]: github.com/sirupsen/logrus.Entry.log(0xc00009c0a0, 0xc00008ebd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f2300000000, ...) /opt/apps/gopath/src/github.com/sirupsen/logrus/entry.go:126 +0x2ab github.com/sirupsen/logrus.(Entry).Panic(0xc00009c190, 0xc0000d3ec8, 0x1, 0x1) /opt/apps/gopath/src/github.com/sirupsen/logrus/entry.go:194 +0x103 github.com/sirupsen/logrus.(Entry).Panicln(0xc00009c190, 0xc0000d3f28, 0x1, 0x1) /opt/apps/gopath/src/github.com/sirupsen/logrus/entry.go:289 +0xc6 x-patrol/models.init.0() /opt/apps/gopath/src/x-patrol/models/models.go:70 +0x3f4

netxfly commented 5 years ago

没有配对mysql账户,需要准备个正确的mysql账户。

f1ashine commented 5 years ago

已经修改过app.ini文件中的用户名和密码,在linux命令行使用mysql命令能成功登录,但是使用代码就一直连不上,这是为啥啊

f1ashine commented 5 years ago

mmp,找了条打印日志的语句把连接字符串打印出来之后发现mysql密码里不允许有@ @符号之后的所有内容都被过滤了,难怪一直提示连接失败