You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -100,6 +112,15 @@ public static void main(String[] args) {
100
112
101
113
When malicious content is detected in the scanned object, `scanResult` will show a non-zero value. Otherwise, the value will be `null`. Moreover, when malware is detected, `foundMalwares` will be non-empty containing one or more name/value pairs of `fileName` and `malwareName`. `fileName` will be filename of malware detected while `malwareName` will be the name of the virus/malware found.
102
114
115
+
### Enable Active Content Detection
116
+
117
+
Enables active content detection for scanning operations. This feature allows the scanner to detect potentially malicious active content within files, specifically:
118
+
119
+
-**PDF scripts**: Detects embedded JavaScript and other scripting content in PDF files
120
+
-**Office macros**: Detects VBA macros and other executable content in Microsoft Office documents
121
+
122
+
When active content is detected, the scan result will include a type field with values of either `macro` or `script` to indicate the type of active content found.
123
+
103
124
#### Verbose Format
104
125
105
126
```json
@@ -191,58 +212,38 @@ Creates a new instance of the `AmaasClient` class, and provisions essential sett
Scan a file for malware and retrieves response data from the API.
217
+
Scan an AMaasReader for malware and retrieves response data from the API. This is the core scanning method that provides the most flexibility by accepting an AMaasReader interface, allowing for different types of data sources.
| fileName | The name of the file with path of directory containing the file to scan. |
223
+
| reader |`AMaasReader` to be scanned. This can be an `AMaasFileReader` or any custom implementation you develop to support your specific data sources. |
224
+
| options | Scan options containing configuration for the scan operation (PML, feedback, verbose, activeContent, tags). |
203
225
204
226
**_Return_**
205
227
String the scanned result in JSON format.
206
228
207
-
#### ```public String scanFile(final String fileName, final String[] tagList, final boolean pml, final boolean feedback, final boolean verbose) throws AMaasException```
229
+
**_Note_**: For an example of implementing a custom AMaasReader, please refer to the `examples/s3stream/S3Stream.java` code which demonstrates a streaming implementation of the AMaasReader interface.
208
230
209
-
Scan a file for malware, add a list of tags to the scan result and retrieves response data from the API.
231
+
#### ```public String scanFile(final String fileName, final boolean digest, final AMaasScanOptions options) throws AMaasException```
232
+
233
+
Scan a file for malware and retrieves response data from the API.
| fileName | The name of the file with path of directory containing the file to scan. |
216
-
| tagList | A list of strings to be used to tag the scan result. At most 8 tags with the maximum length of 63 characters. |
217
-
| pml | A flag to indicate whether to enable predictive machine learning detection. |
218
-
| feedback | A flag to indicate whether to enable Trend Micro Smart Protection Network's Smart Feedback. |
219
-
| verbose | A flag to enable log verbose mode. |
220
240
| digest | A flag to enable/disable calculation of digests for cache search and result lookup. |
241
+
| options | Scan options containing configuration for the scan operation (PML, feedback, verbose, activeContent, tags). |
221
242
222
243
**_Return_**
223
244
String the scanned result in JSON format.
224
245
225
-
#### ```public String scanRun(final AMaasReader reader, final String[] tagList, final boolean pml, final boolean feedback, final boolean verbose, final boolean digest) throws AMaasException```
226
-
227
-
Scan an AMaasReader for malware and retrieves response data from the API. This is the core scanning method that provides the most flexibility by accepting an AMaasReader interface, allowing for different types of data sources.
| reader |`AMaasReader` to be scanned. This can be an `AMaasFileReader` or any custom implementation you develop to support your specific data sources. |
234
-
| tagList | A list of strings to be used to tag the scan result. At most 8 tags with the maximum length of 63 characters. |
235
-
| pml | A flag to indicate whether to use predictive machine learning detection. |
236
-
| feedback | A flag to indicate whether to use Trend Micro Smart Protection Network's Smart Feedback. |
237
-
| verbose | A flag to enable log verbose mode. |
238
-
| digest | A flag to enable calculation of digests for cache search and result lookup. |
239
-
240
-
**_Return_**
241
-
String the scanned result in JSON format.
242
-
243
-
**_Note_**: For an example of implementing a custom AMaasReader, please refer to the `examples/s3stream/S3Stream.java` code which demonstrates a streaming implementation of the AMaasReader interface.
| identifier | A unique name to identify the buffer. |
256
+
| digest | A flag to enable/disable calculation of digests for cache search and result lookup. |
257
+
| options | Scan options containing configuration for the scan operation (PML, feedback, verbose, activeContent, tags). |
255
258
256
259
**_Return_**
257
260
String the scanned result in JSON format.
258
261
259
-
#### ```public String scanBuffer(final byte[] buffer, final String identifier, final String[] tagList, final boolean pml, final boolean feedback, final boolean verbose) throws AMaasException```
262
+
---
260
263
261
-
Scan a buffer for malware, add a list of tags to the scan result, and retrieves response data from the API.
264
+
### ```AMaasScanOptions```
262
265
263
-
**_Parameters_**
266
+
The AMaasScanOptions class provides a convenient way to configure scan parameters using the builder pattern. This class encapsulates all scan-related configuration options.
0 commit comments