ficture7 / unicorn-net Goto Github PK
View Code? Open in Web Editor NEWWIP .NET binding/wrapper for the Unicorn engine written in C#
License: MIT License
WIP .NET binding/wrapper for the Unicorn engine written in C#
License: MIT License
Migrating to .NET Standard would easily make the project available on more platforms, and is the recommended way to do things now. Please consider doing it.
If needed, I can help doing the migration.
https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L101
https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L103
https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L128
https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L130
Page alignment checks are wrong, they should be:
if ((address & ((ulong)PageSize - 1)) != 0)
Same for size.
oh this is awesome! linked to your binding from our homepage at http://www.unicorn-engine.org/download/ now.
keep it up, cheers!
Make Registers an IEnumerable so it allows for LINQ and compensate for uc_reg_{read,write}_batch not being implemented (kinda).
Provide raw bindings, so you don't need to go through the wrapper to do stuff.
There are places where the unsafe context could be avoided.
Afternoon, thank you for creating this enhanced wrapper. I have a feeling I might be answering the question myself but just in case I am wrong I thought i would ask the following.
I loaded the project and build the class library and have then included this into my own person project such that I can use it.
I try and execute the line:
using (var emulator = new X86Emulator(X86Mode.b32)) I get the following issue after executing the first line.
'System.DllNotFound Exception 'Unable to load DLL 'unicorn' or one of its dependencies.....
I haven't build unicorn and I only have the .dll, im guessing I need to have built the unicorn project also and put it next to the .dll?
Thank you so much,
HookContainers call AddInternal
to bind .NET delegate and unicorn hook callbacks.
but these AddInternals , just simply new
a delegate and use Marshal.GetFunctionPointerForDelegate
to bind native pointers.
But there is a problem that .NET RT may GC these delegate and cause Execption like this
"CallbackOnCollectedDelegate": "A callback was made to a garbage collection delegate of type "Unicorn.Net!Unicorn.Internal.uc_cb_hookcode::Invoke". This could cause application crashes, corruption, and data loss. When passing a delegate to unmanaged code The managed application must keep these delegates active until they are sure they will not be called again."
I suggest create a List<object> field to save all delegates in order to avoid GC
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.