frida / frida-clr

Frida .NET bindings
Other
80 stars 34 forks source link

Why does frida-clr depend on WPF? #12

Open daddycocoaman opened 2 years ago

daddycocoaman commented 2 years ago

Hi,

I was just wondering why frida-clr depends on WPF libraries to use (namely System.Windows.Threading)? With the advancement of .NET/.NET Core over the years, is this still necessary? The use of Forms seems like more than what's required for normal Frida usage and it makes using things like Script.Post really unintuitive.

hostar commented 1 year ago

I tried to remove the dependency, so far it seems to work. Feel free to try it https://github.com/hostar/frida-clr/tree/dispatcher-removed

(You need to somehow incorporate it to your local build manually.)

ekologic commented 1 year ago

But still it requires WPF dll (PresentationCore) in Process.hpp, Marshal.hpp, Device.hpp and by quickly looking at the usage, it is mainly required for ImageSource and for icons. I wonder if we can just return Bitmap in order to use in other frameworks, such as Avalonia

Edit: Yeah the dispatcher is in WPF dll