dump memory command (#23)
This commit is contained in:
@@ -74,6 +74,16 @@ func (c *Context) SwitchHistory(account string) {
|
||||
c.WorkDir = history.WorkDir
|
||||
c.HTTPEnabled = history.HTTPEnabled
|
||||
c.HTTPAddr = history.HTTPAddr
|
||||
} else {
|
||||
c.Account = ""
|
||||
c.Platform = ""
|
||||
c.Version = 0
|
||||
c.FullVersion = ""
|
||||
c.DataKey = ""
|
||||
c.DataDir = ""
|
||||
c.WorkDir = ""
|
||||
c.HTTPEnabled = false
|
||||
c.HTTPAddr = ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
V3ProcessName = "WeChat"
|
||||
V4ProcessName = "Weixin"
|
||||
V3DBFile = "Message/msg_0.db"
|
||||
V4DBFile = "db_storage/message/message_0.db"
|
||||
ProcessNameOfficial = "WeChat"
|
||||
ProcessNameBeta = "Weixin"
|
||||
V3DBFile = "Message/msg_0.db"
|
||||
V4DBFile = "db_storage/session/session.db"
|
||||
)
|
||||
|
||||
// Detector 实现 macOS 平台的进程检测器
|
||||
@@ -40,7 +40,7 @@ func (d *Detector) FindProcesses() ([]*model.Process, error) {
|
||||
var result []*model.Process
|
||||
for _, p := range processes {
|
||||
name, err := p.Name()
|
||||
if err != nil || (name != V3ProcessName && name != V4ProcessName) {
|
||||
if err != nil || (name != ProcessNameOfficial && name != ProcessNameBeta) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user