1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @copyright Copyright (c) 2017 Matthias Held <[email protected]> |
5
|
|
|
* @author Matthias Held <[email protected]> |
6
|
|
|
* @license GNU AGPL version 3 or any later version |
7
|
|
|
* |
8
|
|
|
* This program is free software: you can redistribute it and/or modify |
9
|
|
|
* it under the terms of the GNU Affero General Public License as |
10
|
|
|
* published by the Free Software Foundation, either version 3 of the |
11
|
|
|
* License, or (at your option) any later version. |
12
|
|
|
* |
13
|
|
|
* This program is distributed in the hope that it will be useful, |
14
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
|
|
|
* GNU Affero General Public License for more details. |
17
|
|
|
* |
18
|
|
|
* You should have received a copy of the GNU Affero General Public License |
19
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
20
|
|
|
*/ |
21
|
|
|
|
22
|
|
|
namespace OCA\RansomwareDetection\Analyzer; |
23
|
|
|
|
24
|
|
|
class FileExtensionResult |
25
|
|
|
{ |
26
|
|
|
/** |
27
|
|
|
* File extension classes. |
28
|
|
|
* |
29
|
|
|
* @var int |
30
|
|
|
*/ |
31
|
|
|
const NOT_SUSPICIOUS = 0; |
32
|
|
|
const SUSPICIOUS = 1; |
33
|
|
|
|
34
|
|
|
/** @var int */ |
35
|
|
|
private $fileExtensionClass; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @param int $fileExtensionClass |
39
|
|
|
*/ |
40
|
|
|
public function __construct( |
41
|
|
|
$fileExtensionClass |
42
|
|
|
) { |
43
|
|
|
$this->fileExtensionClass = $fileExtensionClass; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @param int $fileExtensionClass |
48
|
|
|
*/ |
49
|
|
|
public function setFileExtensionClass($fileExtensionClass) |
50
|
|
|
{ |
51
|
|
|
$this->fileExtensionClass = $fileExtensionClass; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return int |
56
|
|
|
*/ |
57
|
|
|
public function getFileExtensionClass() |
58
|
|
|
{ |
59
|
|
|
return $this->fileExtensionClass; |
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
|