cloudmersive-virus-scan-api-client 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -6
- data/cloudmersive-virus-scan-api-client.gemspec +2 -2
- data/docs/ScanApi.md +72 -3
- data/docs/VirusScanAdvancedResult.md +14 -0
- data/lib/cloudmersive-virus-scan-api-client.rb +3 -2
- data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +76 -8
- data/lib/cloudmersive-virus-scan-api-client/api_client.rb +2 -2
- data/lib/cloudmersive-virus-scan-api-client/api_error.rb +2 -2
- data/lib/cloudmersive-virus-scan-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-virus-scan-api-client/models/virus_found.rb +2 -2
- data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb +251 -0
- data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_result.rb +2 -2
- data/lib/cloudmersive-virus-scan-api-client/models/website_scan_request.rb +2 -2
- data/lib/cloudmersive-virus-scan-api-client/models/website_scan_result.rb +4 -4
- data/lib/cloudmersive-virus-scan-api-client/version.rb +3 -3
- data/spec/api/scan_api_spec.rb +21 -5
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/virus_found_spec.rb +2 -2
- data/spec/models/virus_scan_advanced_result_spec.rb +78 -0
- data/spec/models/virus_scan_result_spec.rb +2 -2
- data/spec/models/website_scan_request_spec.rb +2 -2
- data/spec/models/website_scan_result_spec.rb +3 -3
- data/spec/spec_helper.rb +2 -2
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42a6f7f3bf7adf87cc2e7e6ed8d61f442f14fb205efe9c8c9b0cde3641ec0248
|
4
|
+
data.tar.gz: 9815f17f9fe44a2d68a2243b0d119d93ba7238c9b29a20e8989f203f56ff4f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86cfb74ffc0871b7d8b0dbbcd0de6630b1d54777fea18138442ab46c85eb75f11d75fcf3f3b5625e51223e982aba38c9a35ce3dbd26203ecda054bbbe5786ec8
|
7
|
+
data.tar.gz: '09bac10de65353120af2135bd6744b8a1105828ed90007e98bd9cf7b5b01677b6ce9ab9934ea3aef027b67e063f7b39afe60ae35b1eb032dd4ddb1c91d1d73fe'
|
data/README.md
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
CloudmersiveVirusScanApiClient - the Ruby gem for the virusapi
|
4
4
|
|
5
|
-
Virus API lets you scan files and content for viruses and identify security issues with content.
|
5
|
+
The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.3.
|
10
|
+
- Package version: 1.3.1
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-virus-scan-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-virus-scan-api-client-1.3.
|
26
|
+
gem install ./cloudmersive-virus-scan-api-client-1.3.1.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-1.3.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-1.3.1.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-virus-scan-api-client', '~> 1.3.
|
34
|
+
gem 'cloudmersive-virus-scan-api-client', '~> 1.3.1'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -84,12 +84,14 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
84
84
|
Class | Method | HTTP request | Description
|
85
85
|
------------ | ------------- | ------------- | -------------
|
86
86
|
*CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file**](docs/ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
|
87
|
-
*CloudmersiveVirusScanApiClient::ScanApi* | [**
|
87
|
+
*CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file_advanced**](docs/ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
|
88
|
+
*CloudmersiveVirusScanApiClient::ScanApi* | [**scan_website**](docs/ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
|
88
89
|
|
89
90
|
|
90
91
|
## Documentation for Models
|
91
92
|
|
92
93
|
- [CloudmersiveVirusScanApiClient::VirusFound](docs/VirusFound.md)
|
94
|
+
- [CloudmersiveVirusScanApiClient::VirusScanAdvancedResult](docs/VirusScanAdvancedResult.md)
|
93
95
|
- [CloudmersiveVirusScanApiClient::VirusScanResult](docs/VirusScanResult.md)
|
94
96
|
- [CloudmersiveVirusScanApiClient::WebsiteScanRequest](docs/WebsiteScanRequest.md)
|
95
97
|
- [CloudmersiveVirusScanApiClient::WebsiteScanResult](docs/WebsiteScanResult.md)
|
@@ -3,12 +3,12 @@
|
|
3
3
|
=begin
|
4
4
|
#virusapi
|
5
5
|
|
6
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
6
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
7
7
|
|
8
8
|
OpenAPI spec version: v1
|
9
9
|
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
-
Swagger Codegen version:
|
11
|
+
Swagger Codegen version: 2.3.1
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
data/docs/ScanApi.md
CHANGED
@@ -5,7 +5,8 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**scan_file**](ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
|
8
|
-
[**
|
8
|
+
[**scan_file_advanced**](ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
|
9
|
+
[**scan_website**](ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
|
9
10
|
|
10
11
|
|
11
12
|
# **scan_file**
|
@@ -13,6 +14,8 @@ Method | HTTP request | Description
|
|
13
14
|
|
14
15
|
Scan a file for viruses
|
15
16
|
|
17
|
+
Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
18
|
+
|
16
19
|
### Example
|
17
20
|
```ruby
|
18
21
|
# load the gem
|
@@ -60,10 +63,76 @@ Name | Type | Description | Notes
|
|
60
63
|
|
61
64
|
|
62
65
|
|
66
|
+
# **scan_file_advanced**
|
67
|
+
> VirusScanAdvancedResult scan_file_advanced(input_file, opts)
|
68
|
+
|
69
|
+
Advanced Scan a file for viruses
|
70
|
+
|
71
|
+
Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
72
|
+
|
73
|
+
### Example
|
74
|
+
```ruby
|
75
|
+
# load the gem
|
76
|
+
require 'cloudmersive-virus-scan-api-client'
|
77
|
+
# setup authorization
|
78
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
79
|
+
# Configure API key authorization: Apikey
|
80
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
81
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
82
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
83
|
+
end
|
84
|
+
|
85
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
|
86
|
+
|
87
|
+
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
88
|
+
|
89
|
+
opts = {
|
90
|
+
allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
91
|
+
allow_invalid_files: true, # BOOLEAN | Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
92
|
+
allow_scripts: true, # BOOLEAN | Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
93
|
+
restrict_file_types: "restrict_file_types_example" # String | Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
94
|
+
}
|
95
|
+
|
96
|
+
begin
|
97
|
+
#Advanced Scan a file for viruses
|
98
|
+
result = api_instance.scan_file_advanced(input_file, opts)
|
99
|
+
p result
|
100
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
101
|
+
puts "Exception when calling ScanApi->scan_file_advanced: #{e}"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
### Parameters
|
106
|
+
|
107
|
+
Name | Type | Description | Notes
|
108
|
+
------------- | ------------- | ------------- | -------------
|
109
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
110
|
+
**allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
|
111
|
+
**allow_invalid_files** | **BOOLEAN**| Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended). | [optional]
|
112
|
+
**allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended). | [optional]
|
113
|
+
**restrict_file_types** | **String**| Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled. | [optional]
|
114
|
+
|
115
|
+
### Return type
|
116
|
+
|
117
|
+
[**VirusScanAdvancedResult**](VirusScanAdvancedResult.md)
|
118
|
+
|
119
|
+
### Authorization
|
120
|
+
|
121
|
+
[Apikey](../README.md#Apikey)
|
122
|
+
|
123
|
+
### HTTP request headers
|
124
|
+
|
125
|
+
- **Content-Type**: multipart/form-data
|
126
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
127
|
+
|
128
|
+
|
129
|
+
|
63
130
|
# **scan_website**
|
64
131
|
> WebsiteScanResult scan_website(input)
|
65
132
|
|
66
|
-
Scan a website for malicious content
|
133
|
+
Scan a website for malicious content and threats
|
134
|
+
|
135
|
+
Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
|
67
136
|
|
68
137
|
### Example
|
69
138
|
```ruby
|
@@ -83,7 +152,7 @@ input = CloudmersiveVirusScanApiClient::WebsiteScanRequest.new # WebsiteScanRequ
|
|
83
152
|
|
84
153
|
|
85
154
|
begin
|
86
|
-
#Scan a website for malicious content
|
155
|
+
#Scan a website for malicious content and threats
|
87
156
|
result = api_instance.scan_website(input)
|
88
157
|
p result
|
89
158
|
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::VirusScanAdvancedResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**clean_result** | **BOOLEAN** | True if the scan contained no viruses, false otherwise | [optional]
|
7
|
+
**contains_executable** | **BOOLEAN** | True if the scan contained an executable (application code), which can be a significant risk factor | [optional]
|
8
|
+
**contains_invalid_file** | **BOOLEAN** | True if the scan contained an invalid file (such as a PDF that is not a valid PDF, Word Document that is not a valid Word Document, etc.), which can be a significant risk factor | [optional]
|
9
|
+
**contains_script** | **BOOLEAN** | True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor | [optional]
|
10
|
+
**contains_restricted_file_format** | **BOOLEAN** | True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false | [optional]
|
11
|
+
**verified_file_format** | **String** | For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null. | [optional]
|
12
|
+
**found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
|
13
|
+
|
14
|
+
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,6 +18,7 @@ require 'cloudmersive-virus-scan-api-client/configuration'
|
|
18
18
|
|
19
19
|
# Models
|
20
20
|
require 'cloudmersive-virus-scan-api-client/models/virus_found'
|
21
|
+
require 'cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result'
|
21
22
|
require 'cloudmersive-virus-scan-api-client/models/virus_scan_result'
|
22
23
|
require 'cloudmersive-virus-scan-api-client/models/website_scan_request'
|
23
24
|
require 'cloudmersive-virus-scan-api-client/models/website_scan_result'
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,7 +21,7 @@ module CloudmersiveVirusScanApiClient
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# Scan a file for viruses
|
24
|
-
#
|
24
|
+
# Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
25
25
|
# @param input_file Input file to perform the operation on.
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [VirusScanResult]
|
@@ -31,7 +31,7 @@ module CloudmersiveVirusScanApiClient
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Scan a file for viruses
|
34
|
-
#
|
34
|
+
# Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
35
35
|
# @param input_file Input file to perform the operation on.
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
37
|
# @return [Array<(VirusScanResult, Fixnum, Hash)>] VirusScanResult data, response status code and response headers
|
@@ -76,8 +76,76 @@ module CloudmersiveVirusScanApiClient
|
|
76
76
|
return data, status_code, headers
|
77
77
|
end
|
78
78
|
|
79
|
-
# Scan a
|
80
|
-
#
|
79
|
+
# Advanced Scan a file for viruses
|
80
|
+
# Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
81
|
+
# @param input_file Input file to perform the operation on.
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
84
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
85
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
86
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
87
|
+
# @return [VirusScanAdvancedResult]
|
88
|
+
def scan_file_advanced(input_file, opts = {})
|
89
|
+
data, _status_code, _headers = scan_file_advanced_with_http_info(input_file, opts)
|
90
|
+
return data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Advanced Scan a file for viruses
|
94
|
+
# Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
95
|
+
# @param input_file Input file to perform the operation on.
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
98
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
99
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
100
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
101
|
+
# @return [Array<(VirusScanAdvancedResult, Fixnum, Hash)>] VirusScanAdvancedResult data, response status code and response headers
|
102
|
+
def scan_file_advanced_with_http_info(input_file, opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "Calling API: ScanApi.scan_file_advanced ..."
|
105
|
+
end
|
106
|
+
# verify the required parameter 'input_file' is set
|
107
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
108
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ScanApi.scan_file_advanced"
|
109
|
+
end
|
110
|
+
# resource path
|
111
|
+
local_var_path = "/virus/scan/file/advanced"
|
112
|
+
|
113
|
+
# query parameters
|
114
|
+
query_params = {}
|
115
|
+
|
116
|
+
# header parameters
|
117
|
+
header_params = {}
|
118
|
+
# HTTP header 'Accept' (if needed)
|
119
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
120
|
+
# HTTP header 'Content-Type'
|
121
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
122
|
+
header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
|
123
|
+
header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
|
124
|
+
header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
|
125
|
+
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
126
|
+
|
127
|
+
# form parameters
|
128
|
+
form_params = {}
|
129
|
+
form_params["inputFile"] = input_file
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = nil
|
133
|
+
auth_names = ['Apikey']
|
134
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names,
|
140
|
+
:return_type => 'VirusScanAdvancedResult')
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug "API called: ScanApi#scan_file_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
143
|
+
end
|
144
|
+
return data, status_code, headers
|
145
|
+
end
|
146
|
+
|
147
|
+
# Scan a website for malicious content and threats
|
148
|
+
# Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
|
81
149
|
# @param input
|
82
150
|
# @param [Hash] opts the optional parameters
|
83
151
|
# @return [WebsiteScanResult]
|
@@ -86,8 +154,8 @@ module CloudmersiveVirusScanApiClient
|
|
86
154
|
return data
|
87
155
|
end
|
88
156
|
|
89
|
-
# Scan a website for malicious content
|
90
|
-
#
|
157
|
+
# Scan a website for malicious content and threats
|
158
|
+
# Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
|
91
159
|
# @param input
|
92
160
|
# @param [Hash] opts the optional parameters
|
93
161
|
# @return [Array<(WebsiteScanResult, Fixnum, Hash)>] WebsiteScanResult data, response status code and response headers
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -0,0 +1,251 @@
|
|
1
|
+
=begin
|
2
|
+
#virusapi
|
3
|
+
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CloudmersiveVirusScanApiClient
|
16
|
+
# Result of running an advanced virus scan
|
17
|
+
class VirusScanAdvancedResult
|
18
|
+
# True if the scan contained no viruses, false otherwise
|
19
|
+
attr_accessor :clean_result
|
20
|
+
|
21
|
+
# True if the scan contained an executable (application code), which can be a significant risk factor
|
22
|
+
attr_accessor :contains_executable
|
23
|
+
|
24
|
+
# True if the scan contained an invalid file (such as a PDF that is not a valid PDF, Word Document that is not a valid Word Document, etc.), which can be a significant risk factor
|
25
|
+
attr_accessor :contains_invalid_file
|
26
|
+
|
27
|
+
# True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor
|
28
|
+
attr_accessor :contains_script
|
29
|
+
|
30
|
+
# True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false
|
31
|
+
attr_accessor :contains_restricted_file_format
|
32
|
+
|
33
|
+
# For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null.
|
34
|
+
attr_accessor :verified_file_format
|
35
|
+
|
36
|
+
# Array of viruses found, if any
|
37
|
+
attr_accessor :found_viruses
|
38
|
+
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'clean_result' => :'CleanResult',
|
44
|
+
:'contains_executable' => :'ContainsExecutable',
|
45
|
+
:'contains_invalid_file' => :'ContainsInvalidFile',
|
46
|
+
:'contains_script' => :'ContainsScript',
|
47
|
+
:'contains_restricted_file_format' => :'ContainsRestrictedFileFormat',
|
48
|
+
:'verified_file_format' => :'VerifiedFileFormat',
|
49
|
+
:'found_viruses' => :'FoundViruses'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.swagger_types
|
55
|
+
{
|
56
|
+
:'clean_result' => :'BOOLEAN',
|
57
|
+
:'contains_executable' => :'BOOLEAN',
|
58
|
+
:'contains_invalid_file' => :'BOOLEAN',
|
59
|
+
:'contains_script' => :'BOOLEAN',
|
60
|
+
:'contains_restricted_file_format' => :'BOOLEAN',
|
61
|
+
:'verified_file_format' => :'String',
|
62
|
+
:'found_viruses' => :'Array<VirusFound>'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
return unless attributes.is_a?(Hash)
|
70
|
+
|
71
|
+
# convert string to symbol for hash key
|
72
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
73
|
+
|
74
|
+
if attributes.has_key?(:'CleanResult')
|
75
|
+
self.clean_result = attributes[:'CleanResult']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'ContainsExecutable')
|
79
|
+
self.contains_executable = attributes[:'ContainsExecutable']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'ContainsInvalidFile')
|
83
|
+
self.contains_invalid_file = attributes[:'ContainsInvalidFile']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'ContainsScript')
|
87
|
+
self.contains_script = attributes[:'ContainsScript']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'ContainsRestrictedFileFormat')
|
91
|
+
self.contains_restricted_file_format = attributes[:'ContainsRestrictedFileFormat']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'VerifiedFileFormat')
|
95
|
+
self.verified_file_format = attributes[:'VerifiedFileFormat']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'FoundViruses')
|
99
|
+
if (value = attributes[:'FoundViruses']).is_a?(Array)
|
100
|
+
self.found_viruses = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
107
|
+
# @return Array for valid properties with the reasons
|
108
|
+
def list_invalid_properties
|
109
|
+
invalid_properties = Array.new
|
110
|
+
return invalid_properties
|
111
|
+
end
|
112
|
+
|
113
|
+
# Check to see if the all the properties in the model are valid
|
114
|
+
# @return true if the model is valid
|
115
|
+
def valid?
|
116
|
+
return true
|
117
|
+
end
|
118
|
+
|
119
|
+
# Checks equality by comparing each attribute.
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def ==(o)
|
122
|
+
return true if self.equal?(o)
|
123
|
+
self.class == o.class &&
|
124
|
+
clean_result == o.clean_result &&
|
125
|
+
contains_executable == o.contains_executable &&
|
126
|
+
contains_invalid_file == o.contains_invalid_file &&
|
127
|
+
contains_script == o.contains_script &&
|
128
|
+
contains_restricted_file_format == o.contains_restricted_file_format &&
|
129
|
+
verified_file_format == o.verified_file_format &&
|
130
|
+
found_viruses == o.found_viruses
|
131
|
+
end
|
132
|
+
|
133
|
+
# @see the `==` method
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def eql?(o)
|
136
|
+
self == o
|
137
|
+
end
|
138
|
+
|
139
|
+
# Calculates hash code according to all attributes.
|
140
|
+
# @return [Fixnum] Hash code
|
141
|
+
def hash
|
142
|
+
[clean_result, contains_executable, contains_invalid_file, contains_script, contains_restricted_file_format, verified_file_format, found_viruses].hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
self.class.swagger_types.each_pair do |key, type|
|
151
|
+
if type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :DateTime
|
172
|
+
DateTime.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :BOOLEAN
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
temp_model = CloudmersiveVirusScanApiClient.const_get(type).new
|
203
|
+
temp_model.build_from_hash(value)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the string representation of the object
|
208
|
+
# @return [String] String presentation of the object
|
209
|
+
def to_s
|
210
|
+
to_hash.to_s
|
211
|
+
end
|
212
|
+
|
213
|
+
# to_body is an alias to to_hash (backward compatibility)
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
215
|
+
def to_body
|
216
|
+
to_hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Returns the object in the form of hash
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_hash
|
222
|
+
hash = {}
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
224
|
+
value = self.send(attr)
|
225
|
+
next if value.nil?
|
226
|
+
hash[param] = _to_hash(value)
|
227
|
+
end
|
228
|
+
hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Outputs non-array value in the form of hash
|
232
|
+
# For object, use to_hash. Otherwise, just return the value
|
233
|
+
# @param [Object] value Any valid value
|
234
|
+
# @return [Hash] Returns the value in the form of hash
|
235
|
+
def _to_hash(value)
|
236
|
+
if value.is_a?(Array)
|
237
|
+
value.compact.map{ |v| _to_hash(v) }
|
238
|
+
elsif value.is_a?(Hash)
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
241
|
+
end
|
242
|
+
elsif value.respond_to? :to_hash
|
243
|
+
value.to_hash
|
244
|
+
else
|
245
|
+
value
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -87,7 +87,7 @@ module CloudmersiveVirusScanApiClient
|
|
87
87
|
# Check to see if the all the properties in the model are valid
|
88
88
|
# @return true if the model is valid
|
89
89
|
def valid?
|
90
|
-
website_threat_type_validator = EnumAttributeValidator.new('String', ["None", "Malware", "Phishing", "ForcedDownload"])
|
90
|
+
website_threat_type_validator = EnumAttributeValidator.new('String', ["None", "Malware", "Phishing", "ForcedDownload", "UnableToConnect"])
|
91
91
|
return false unless website_threat_type_validator.valid?(@website_threat_type)
|
92
92
|
return true
|
93
93
|
end
|
@@ -95,7 +95,7 @@ module CloudmersiveVirusScanApiClient
|
|
95
95
|
# Custom attribute writer method checking allowed values (enum).
|
96
96
|
# @param [Object] website_threat_type Object to be assigned
|
97
97
|
def website_threat_type=(website_threat_type)
|
98
|
-
validator = EnumAttributeValidator.new('String', ["None", "Malware", "Phishing", "ForcedDownload"])
|
98
|
+
validator = EnumAttributeValidator.new('String', ["None", "Malware", "Phishing", "ForcedDownload", "UnableToConnect"])
|
99
99
|
unless validator.valid?(website_threat_type)
|
100
100
|
fail ArgumentError, "invalid value for 'website_threat_type', must be one of #{validator.allowable_values}."
|
101
101
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module CloudmersiveVirusScanApiClient
|
14
|
-
VERSION = "1.3.
|
14
|
+
VERSION = "1.3.1"
|
15
15
|
end
|
data/spec/api/scan_api_spec.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -34,7 +34,7 @@ describe 'ScanApi' do
|
|
34
34
|
|
35
35
|
# unit tests for scan_file
|
36
36
|
# Scan a file for viruses
|
37
|
-
#
|
37
|
+
# Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
38
38
|
# @param input_file Input file to perform the operation on.
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [VirusScanResult]
|
@@ -44,9 +44,25 @@ describe 'ScanApi' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
# unit tests for scan_file_advanced
|
48
|
+
# Advanced Scan a file for viruses
|
49
|
+
# Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
50
|
+
# @param input_file Input file to perform the operation on.
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
53
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
54
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
55
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
56
|
+
# @return [VirusScanAdvancedResult]
|
57
|
+
describe 'scan_file_advanced test' do
|
58
|
+
it "should work" do
|
59
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
47
63
|
# unit tests for scan_website
|
48
|
-
# Scan a website for malicious content
|
49
|
-
#
|
64
|
+
# Scan a website for malicious content and threats
|
65
|
+
# Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
|
50
66
|
# @param input
|
51
67
|
# @param [Hash] opts the optional parameters
|
52
68
|
# @return [WebsiteScanResult]
|
data/spec/api_client_spec.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/configuration_spec.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
=begin
|
2
|
+
#virusapi
|
3
|
+
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for CloudmersiveVirusScanApiClient::VirusScanAdvancedResult
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'VirusScanAdvancedResult' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveVirusScanApiClient::VirusScanAdvancedResult.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of VirusScanAdvancedResult' do
|
31
|
+
it 'should create an instance of VirusScanAdvancedResult' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveVirusScanApiClient::VirusScanAdvancedResult)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "clean_result"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "contains_executable"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "contains_invalid_file"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "contains_script"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "contains_restricted_file_format"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "verified_file_format"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "found_viruses"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -41,7 +41,7 @@ describe 'WebsiteScanResult' do
|
|
41
41
|
describe 'test attribute "website_threat_type"' do
|
42
42
|
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
-
#validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["None", "Malware", "Phishing", "ForcedDownload"])
|
44
|
+
#validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["None", "Malware", "Phishing", "ForcedDownload", "UnableToConnect"])
|
45
45
|
#validator.allowable_values.each do |value|
|
46
46
|
# expect { @instance.website_threat_type = value }.not_to raise_error
|
47
47
|
#end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#virusapi
|
3
3
|
|
4
|
-
#Virus API lets you scan files and content for viruses and identify security issues with content.
|
4
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
5
5
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmersive-virus-scan-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -34,42 +34,42 @@ dependencies:
|
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '2.1'
|
40
37
|
- - ">="
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: 2.1.0
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2.1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '2.1'
|
50
47
|
- - ">="
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: 2.1.0
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '2.1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rspec
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '3.6'
|
60
57
|
- - ">="
|
61
58
|
- !ruby/object:Gem::Version
|
62
59
|
version: 3.6.0
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3.6'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '3.6'
|
70
67
|
- - ">="
|
71
68
|
- !ruby/object:Gem::Version
|
72
69
|
version: 3.6.0
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '3.6'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: vcr
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,6 +204,7 @@ files:
|
|
204
204
|
- "./cloudmersive-virus-scan-api-client.gemspec"
|
205
205
|
- "./docs/ScanApi.md"
|
206
206
|
- "./docs/VirusFound.md"
|
207
|
+
- "./docs/VirusScanAdvancedResult.md"
|
207
208
|
- "./docs/VirusScanResult.md"
|
208
209
|
- "./docs/WebsiteScanRequest.md"
|
209
210
|
- "./docs/WebsiteScanResult.md"
|
@@ -214,6 +215,7 @@ files:
|
|
214
215
|
- "./lib/cloudmersive-virus-scan-api-client/api_error.rb"
|
215
216
|
- "./lib/cloudmersive-virus-scan-api-client/configuration.rb"
|
216
217
|
- "./lib/cloudmersive-virus-scan-api-client/models/virus_found.rb"
|
218
|
+
- "./lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb"
|
217
219
|
- "./lib/cloudmersive-virus-scan-api-client/models/virus_scan_result.rb"
|
218
220
|
- "./lib/cloudmersive-virus-scan-api-client/models/website_scan_request.rb"
|
219
221
|
- "./lib/cloudmersive-virus-scan-api-client/models/website_scan_result.rb"
|
@@ -222,6 +224,7 @@ files:
|
|
222
224
|
- "./spec/api_client_spec.rb"
|
223
225
|
- "./spec/configuration_spec.rb"
|
224
226
|
- "./spec/models/virus_found_spec.rb"
|
227
|
+
- "./spec/models/virus_scan_advanced_result_spec.rb"
|
225
228
|
- "./spec/models/virus_scan_result_spec.rb"
|
226
229
|
- "./spec/models/website_scan_request_spec.rb"
|
227
230
|
- "./spec/models/website_scan_result_spec.rb"
|
@@ -245,8 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
248
|
- !ruby/object:Gem::Version
|
246
249
|
version: '0'
|
247
250
|
requirements: []
|
248
|
-
|
249
|
-
rubygems_version: 2.7.6
|
251
|
+
rubygems_version: 3.0.3
|
250
252
|
signing_key:
|
251
253
|
specification_version: 4
|
252
254
|
summary: Scan files and content for viruses.
|