Coder Social home page Coder Social logo

malwarescan.amsi's People

Contributors

flytzen avatar r0wi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

malwarescan.amsi's Issues

Logging providers cause issues in unit test context

We use NLog in our solution. It seems that LibLog resolves and initializes NLog provider with the configuration we have in the project root. This means that Malware scanner tries to internally write according to our default nlog configuration when running unit tests. This even causes tests to crash when they try to resolve NLog db connection while lacking permissions.

As a workaround we clear the NLog configuration via static access point at the start of unit test
LogManager.Configuration = new NLog.Config.LoggingConfiguration();

However I think this is an ugly and unwanted side effect.
Maybe this could be avoided by using ILogger interface and dependency injection approach instead. Let the software always decide the implementation instead of sniffing for usable providers.

Thread safety

Hi There,

Just a thought for documentation - from reviewing the source code it looks like this would be safe to register as a singleton in DI and reuse it across threads. If you agree: it would be good to add this information to the documentation?

Cheers,
Stuart

OutOfMemoryException on Large Files

Hello - thank you for creating this library, its very useful.

I'm getting OutOfMemoryException when trying to scan large files 500mb and bigger. Sharing the details below:

I took a look at the CopyToByteArray() method implementation, but not sure what should be modified. I'm able to successfully open the same big file using File.OpenRead (returns FileStream) and File.ReadAllBytes (returns byte array). I wonder if CopyToByteArray() could be modified to handle large files. Is this something that could be addressed?

Thanks in advance!

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
        at MalwareScan.AMSI.MalwareScanner.CopyToByteArray(Stream stream)
        at MalwareScan.AMSI.MalwareScanner.HasVirus(Stream stream, String filename)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.