3

VS2010 を使用して pop3 サーバーからメールを取得する簡単なプログラムを作成しています。おそらく、その一部にはオープンソースの OpenPOP を使用する予定です。そして、電子メールと添付ファイルを MS SQL データベースに保存することになっています。

問題は、添付ファイルはメール サーバーから簡単にダウンロードできるということですが、添付ファイルをスキャンする方法はありますか? 私が働いている小さな会社は、マイクロソフトのセキュリティの必需品だけを使用しています。

グーグルで調べましたが、この問題に関する情報を見つけることができなかったようです。

4

1 に答える 1

3

以下を使用できます。

"%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.
于 2012-11-09T14:13:40.970 に答える