-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoinject.ahk
62 lines (53 loc) · 1.22 KB
/
autoinject.ahk
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
ProcessID := "csgo.exe"
pids := pidListFromName(ProcessID)
;loop 13
value1 := pids[1]
value2 := pids[2]
value3 := pids[3]
value4 := pids[4]
value5 := pids[5]
value6 := pids[6]
value7 := pids[7]
value8 := pids[8]
value9 := pids[9]
value10 := pids[10]
value11 := pids[11]
value12 := pids[12]
value13 := pids[13]
value14 := pids[14]
value15 := pids[15]
value16 := pids[16]
value17 := pids[17]
value18 := pids[18]
value19 := pids[19]
value20 := pids[20]
OutputDebug %pids%
OutputDebug %pids0%
i = 1
Loop 20
{
apid := value%i%
OutputDebug %apid%
if (apid = "")
{
ExitApp
}
Run Injector.exe -p %apid% -i aa.dll
IniWrite, %apid%, injected.ini,current, %i%
Sleep 500
i++
}
pidListFromName(name) {
static wmi := ComObjGet("winmgmts:\\.\root\cimv2")
if (name == "")
return
PIDs := []
for Process in wmi.ExecQuery("SELECT * FROM Win32_Process WHERE Name = '" name "'")
PIDs.Push(Process.processId)
return PIDs
}
ExitApp