程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> 關於JAVA >> 在J2EE 中集成賽門鐵克防病毒掃描引擎

在J2EE 中集成賽門鐵克防病毒掃描引擎

編輯:關於JAVA

賽門鐵克防病毒掃描引擎是一款企業級的殺毒引擎,並可以和各種環境進行集成,目前項目中需要在J2EE的環境中使用這個技術,故公布出實現方法供人參考。

  為此目的專門開發了一個jar包用於和Scan Server 交互,關於這款產品的試用版下載:http://www.symantec.com/enterprise/products/trialware.JSP?pcid=1008&pvid=836_1

  我將在文件下載中提供這個jar包的下載,名字為 virus-scan-connect.zip

  以下的是最簡單的實現步驟

0 Install virus scan server

SSE-InstallConfig-20061220

<1>, Install the SSE V51:

0, Download trial version software and license.

http://symantec.com/enterprise/products/trialware.JSP?pcid=1008&pvid=836_1

1, Install JDK 5;

2, Install ScanEngine.exe, setup the Admin port and passWord;

3, Install license file

(1) By web console, https://ip:8004/; System-->License-->Install.

[Note, only with https is available.]

(2) Copy license file to C:\Program Files\Common Files\Symantec Shared\Licenses;

4, Working with ICAP;

1 Virus Scan in JSP

1 Import the Jar package- virusscan-0.1.jar

2 A simple implement practice is

1 Sample Invode Code:

2 public static void main(String[] args) {

3 //icap://10.225.69.89:1344/avscan 是scan server的url

4 VirusScanManager vsm=new VirusScanManager("icap://10.225.69.89:1344/avscan");

5

6

7

8 String testFile="./test/eicar.com.txt";

9 InputStream in=null;

10

11 try {

12 //Eicar是測試病毒代碼

13 //in=new ByteArrayInputStream(Eicar.getEicar());

14 in=new FileInputStream(testFile);

15 } catch (Exception e) { e.printStackTrace();

16

17 } vsm.processScanVirus("eicarTestFile.txt", "plain/text", in);

18

19 }

20

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved