예제 #1
0
 public ScanResult Buffer(byte[] buffer, uint length, string contentName)
 => Execute(() =>
 {
     using (var client = AMSIClient.Create(Configuration))
         using (var session = client.CreateSession())
             return(session.ScanBuffer(buffer, length, contentName));
 });
예제 #2
0
 public ScanResult String(string content, string contentName)
 => Execute(() =>
 {
     using (var client = AMSIClient.Create(Configuration))
         using (var session = client.CreateSession())
             return(session.ScanString(content, contentName));
 });
예제 #3
0
        internal AMSISession(AMSIClient client)
        {
            this.client = client;
            var result = AMSIMethods.AmsiOpenSession(client.ContextHandle, out sessionHandle);

            result.CheckResult(nameof(AMSIMethods.AmsiOpenSession));
            sessionHandle.Context = client.ContextHandle;
            sessionHandle.CheckHandle();
        }
예제 #4
0
 public bool IsAvailable()
 => AMSIClient.IsAvailable();