B2R2-org / B2R2

B2R2 is a collection of useful algorithms, functions, and tools for binary analysis.
https://b2r2.org
MIT License
418 stars 62 forks source link

Detect format from byte array #12

Closed enkomio closed 5 years ago

enkomio commented 5 years ago

The new autoDetect argument in BinHandler.Init function doesn't consider detection on an array of bytes.

This PR slightly modify the code in order to consider also the detection given an array of bytes.

enkomio commented 5 years ago

Update done.

Initially I haven't changed the name from Detect to DetectBuffer since I supposed that you added that attribute to be more C# user friendly. If so, we can use the overload concept instead of rely on a different name.

sangkilc commented 5 years ago

I didn't think about overloading, but you really have a point. The previous version should be better. Could you revert your modification? Thanks for making the point :+1:

enkomio commented 5 years ago

Sure, done :)