-
Notifications
You must be signed in to change notification settings - Fork 9
/
main.go
36 lines (32 loc) · 822 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
_ "embed"
"fmt"
"time"
"github.com/Mrs4s/go-db-key-injector/injector"
"github.com/mitchellh/go-ps"
)
//go:embed internal/internal.dll
var internalDll []byte
func main() {
list, err := ps.Processes()
if err != nil {
fmt.Printf("获取进程列表失败: %v\n", err)
return
}
buff := make([]byte, len(internalDll))
copy(buff, internalDll)
for _, p := range list {
if p.Executable() == "QQ.exe" {
fmt.Printf("正在注入 %v (%v)\n", p.Executable(), p.Pid())
inj, err := injector.NewInjector(uint32(p.Pid()))
if err != nil {
fmt.Printf("初始化注入器失败: %v\n", err)
continue
}
inj.ManualMapInject(buff)
}
}
fmt.Println("模块注入成功, 数据库Key将被输出到QQ根目录Bin文件夹下的 db_key_log.txt")
time.Sleep(time.Second * 60)
}