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)); });
public ScanResult String(string content, string contentName) => Execute(() => { using (var client = AMSIClient.Create(Configuration)) using (var session = client.CreateSession()) return(session.ScanString(content, contentName)); });
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(); }
public bool IsAvailable() => AMSIClient.IsAvailable();