Comments (3)
@JohnLaTwC this should be fixed now. Thanks for the heads up.
from offensivenim.
Yup this is my bad, honestly I've haven't had that much experience coding in lower level languages and just forgot to do that here, was more preoccupied in getting the examples working lol.
I think the best way of doing this in nim is with the defer
or try/finally
statement. Did that here I'll go through the code tonight and add that to all of the handles.
from offensivenim.
yes, though I think you need a defer
on hProcess
in isMainModule
in that example you site.
when isMainModule:
let processId: int = GetLsassPid()
if not bool(processId):
echo "[X] Unable to find lsass process"
quit(1)
echo "[*] lsass process PID: ", processId
var hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, cast[DWORD](processId))
+ defer: CloseHandle(hProcess)
...
from offensivenim.
Related Issues (20)
- /OffensiveNim/src/clr_host_cpp_embed_bin.nim(28, 12) Error: Must be compiled in cpp mode HOT 2
- Typographical error
- Mention -d:noRes for winim
- Importing NimMain with msvc compiler fails. HOT 2
- Shellcode execution in same thread HOT 9
- Trailing whitespace
- Makefile - opt
- CLR HOST CPP FAILS WHEN COMPILING
- compile
- Error Running make - memfd_python_interpreter_bin.nim
- Load (0x80131604) [CLRError] HOT 1
- [Contribution]: steal token HOT 4
- minidump access denied HOT 2
- Update example for HTTP Request HOT 1
- why it is a advantage?
- amsi patch
- Fail to compile chrome_dump_bin.nim
- Making scripts more reusable HOT 1
- NimMain in Dll HOT 4
- Supported Nim Version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from offensivenim.