gpt4 book ai didi

c# - 下载电子邮件附件时在 C# 中使用 Microsoft Security Essentials

转载 作者:行者123 更新时间:2023-11-30 16:21:20 24 4
gpt4 key购买 nike

我正在制作一个简单的程序,使用 VS2010 从 pop3 服务器获取电子邮件。其中一些可能会使用开源 OpenPOP。然后它应该将电子邮件和附件保存在 MS SQL 数据库中。

但问题是,虽然附件很容易从邮件服务器上下载下来,但是有没有办法扫描附件呢?我工作的小公司只使用 Microsoft 安全要素。

用谷歌搜索,但似乎找不到关于此事的任何信息。

最佳答案

您可以使用:

"%ProgramFiles%\Microsoft Security Client\MpCmdRun.exe" -Scan -ScanType 3 -File "<Path>"

并检查返回码。

附加信息:

-Scan [-ScanType value]
0 Default, according to your configuration
1 Quick scan
2 Full system scan
3 File and directory custom scan

[-File <path>]
Indicates the file or directory to be scanned, only valid for
custom scan.

[-DisableRemediation]
This option is valid only for custom scan.
When specified:
- File exclusions are ignored.
- Archive files are scanned.
- Actions are not applied after detection.
- Event log entries are not written after detection.
- Detections from the custom scan are not displayed in the user
interface.

Return code is
0 if no malware is found or malware is successfully remediated and no
additional user action is required
2 if malware is found and not remediated or additional user action is
required to complete remediation or there is error in scanning.
Please check History for more information.

关于c# - 下载电子邮件附件时在 C# 中使用 Microsoft Security Essentials,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13309167/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com