@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ['mimeType' => '', 'extensions' => ['xls'], 'signature' => ['starting' => ['offset' => 512, 'bytes' => ['/0908100000060500/']]]], |
| 46 | 46 | ['mimeType' => '', 'extensions' => ['doc'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/0d444f43/']]]], |
| 47 | 47 | ['mimeType' => '', 'extensions' => ['webm'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/1a45dfa3/']]]], |
| 48 | - ['mimeType' => '', 'extensions' => ['mkv','mka', 'mks', 'mk3d', 'webm'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/45dfa3934282886d6174726f736b61/', '/1a45dfa3/']]]], |
|
| 48 | + ['mimeType' => '', 'extensions' => ['mkv', 'mka', 'mks', 'mk3d', 'webm'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/45dfa3934282886d6174726f736b61/', '/1a45dfa3/']]]], |
|
| 49 | 49 | ['mimeType' => '', 'extensions' => ['gz', 'tgz', 'vlt'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/1f8b08/']]]], |
| 50 | 50 | ['mimeType' => '', 'extensions' => ['tar'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/1f9d/', '/1fA0/']]]], |
| 51 | 51 | ['mimeType' => '', 'extensions' => ['eps'], 'signature' => ['starting' => ['offset' => 0, 'bytes' => ['/252150532d41646f62652d332e3020455053462d332030/']]]], |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | <h3> |
| 29 | 29 | <?php p($l->t('Current color mode')); ?> |
| 30 | 30 | </h3> |
| 31 | - <select id="color-scheme" name="color-scheme" data-placeholder="<?php p($l->t('Color mode'));?>"> |
|
| 31 | + <select id="color-scheme" name="color-scheme" data-placeholder="<?php p($l->t('Color mode')); ?>"> |
|
| 32 | 32 | <option value="<?php p($_['color_active']['code']); ?>"> |
| 33 | 33 | <?php p($_['color_active']['name']); ?> |
| 34 | 34 | </option> |
@@ -89,18 +89,18 @@ |
||
| 89 | 89 | |
| 90 | 90 | foreach ($sequences as $id => $sequence) { |
| 91 | 91 | if (sizeof($sequence) >= $this->config->getAppValue(Application::APP_ID, 'minimum_sequence_length', 0)) { |
| 92 | - usort($sequence, function ($a, $b) { |
|
| 92 | + usort($sequence, function($a, $b) { |
|
| 93 | 93 | return $b->getId() - $a->getId(); |
| 94 | 94 | }); |
| 95 | 95 | $result = $this->sequenceAnalyzer->analyze($id, $sequence); |
| 96 | - $this->logger->debug('detection: suspicion score of sequence ' . $id . ' is ' . $result->getSuspicionScore() . '.', array('app' => Application::APP_ID)); |
|
| 96 | + $this->logger->debug('detection: suspicion score of sequence '.$id.' is '.$result->getSuspicionScore().'.', array('app' => Application::APP_ID)); |
|
| 97 | 97 | if ($result->getSuspicionScore() >= 0.5) { |
| 98 | 98 | $detection = new Detection($id, $sequence); |
| 99 | 99 | array_push($detectionObjects, $detection); |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | - usort($detectionObjects, function ($a, $b) { |
|
| 103 | + usort($detectionObjects, function($a, $b) { |
|
| 104 | 104 | return $b->getId() - $a->getId(); |
| 105 | 105 | }); |
| 106 | 106 | return $detectionObjects; |
@@ -68,33 +68,33 @@ discard block |
||
| 68 | 68 | $container = $this->getContainer(); |
| 69 | 69 | |
| 70 | 70 | // mapper |
| 71 | - $container->registerService('FileOperationMapper', function ($c) { |
|
| 71 | + $container->registerService('FileOperationMapper', function($c) { |
|
| 72 | 72 | return new FileOperationMapper( |
| 73 | 73 | $c->query('ServerContainer')->getDb() |
| 74 | 74 | ); |
| 75 | 75 | }); |
| 76 | 76 | |
| 77 | - $container->registerService('RecoveredFileOperationMapper', function ($c) { |
|
| 77 | + $container->registerService('RecoveredFileOperationMapper', function($c) { |
|
| 78 | 78 | return new RecoveredFileOperationMapper( |
| 79 | 79 | $c->query('ServerContainer')->getDb() |
| 80 | 80 | ); |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | - $container->registerService('DetectionDeserializer', function ($c) { |
|
| 83 | + $container->registerService('DetectionDeserializer', function($c) { |
|
| 84 | 84 | return new DetectionDeserializer( |
| 85 | 85 | $c->query('FileOperationMapper') |
| 86 | 86 | ); |
| 87 | 87 | }); |
| 88 | 88 | |
| 89 | 89 | // services |
| 90 | - $container->registerService('FileOperationService', function ($c) { |
|
| 90 | + $container->registerService('FileOperationService', function($c) { |
|
| 91 | 91 | return new FileOperationService( |
| 92 | 92 | $c->query(FileOperationMapper::class), |
| 93 | 93 | $c->query('ServerContainer')->getUserSession()->getUser()->getUID() |
| 94 | 94 | ); |
| 95 | 95 | }); |
| 96 | 96 | |
| 97 | - $container->registerService('RecoveredFileOperationService', function ($c) { |
|
| 97 | + $container->registerService('RecoveredFileOperationService', function($c) { |
|
| 98 | 98 | return new RecoveredFileOperationService( |
| 99 | 99 | $c->query(FileOperationMapper::class), |
| 100 | 100 | $c->query(RecoveredFileOperationMapper::class), |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ); |
| 103 | 103 | }); |
| 104 | 104 | |
| 105 | - $container->registerService('DetectionService', function ($c) { |
|
| 105 | + $container->registerService('DetectionService', function($c) { |
|
| 106 | 106 | return new DetectionService( |
| 107 | 107 | $c->query(ILogger::class), |
| 108 | 108 | $c->query('FileOperationService'), |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | }); |
| 115 | 115 | |
| 116 | 116 | // classifier |
| 117 | - $container->registerService('Classifier', function ($c) { |
|
| 117 | + $container->registerService('Classifier', function($c) { |
|
| 118 | 118 | return new Classifier( |
| 119 | 119 | $c->query(ILogger::class), |
| 120 | 120 | $c->query(FileOperationMapper::class), |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | }); |
| 124 | 124 | |
| 125 | 125 | // controller |
| 126 | - $container->registerService('DetectionController', function ($c) { |
|
| 126 | + $container->registerService('DetectionController', function($c) { |
|
| 127 | 127 | return new DetectionController( |
| 128 | 128 | $c->query('AppName'), |
| 129 | 129 | $c->query('Request'), |
@@ -132,28 +132,28 @@ discard block |
||
| 132 | 132 | }); |
| 133 | 133 | |
| 134 | 134 | // entropy |
| 135 | - $container->registerService('Entropy', function ($c) { |
|
| 135 | + $container->registerService('Entropy', function($c) { |
|
| 136 | 136 | return new Entropy( |
| 137 | 137 | $c->query(ILogger::class) |
| 138 | 138 | ); |
| 139 | 139 | }); |
| 140 | 140 | |
| 141 | 141 | // analyzer |
| 142 | - $container->registerService('SequenceSizeAnalyzer', function ($c) { |
|
| 142 | + $container->registerService('SequenceSizeAnalyzer', function($c) { |
|
| 143 | 143 | return new SequenceSizeAnalyzer(); |
| 144 | 144 | }); |
| 145 | 145 | |
| 146 | - $container->registerService('FileTypeFunnellingAnalyzer', function ($c) { |
|
| 146 | + $container->registerService('FileTypeFunnellingAnalyzer', function($c) { |
|
| 147 | 147 | return new FileTypeFunnellingAnalyzer(); |
| 148 | 148 | }); |
| 149 | 149 | |
| 150 | - $container->registerService('EntropyFunnellingAnalyzer', function ($c) { |
|
| 150 | + $container->registerService('EntropyFunnellingAnalyzer', function($c) { |
|
| 151 | 151 | return new EntropyFunnellingAnalyzer( |
| 152 | 152 | $c->query(ILogger::class) |
| 153 | 153 | ); |
| 154 | 154 | }); |
| 155 | 155 | |
| 156 | - $container->registerService('FileExtensionAnalyzer', function ($c) { |
|
| 156 | + $container->registerService('FileExtensionAnalyzer', function($c) { |
|
| 157 | 157 | return new FileExtensionAnalyzer( |
| 158 | 158 | $c->query(ILogger::class), |
| 159 | 159 | $c->query(Entropy::class) |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | ); |
| 162 | 162 | }); |
| 163 | 163 | |
| 164 | - $container->registerService('SequenceAnalyzer', function ($c) { |
|
| 164 | + $container->registerService('SequenceAnalyzer', function($c) { |
|
| 165 | 165 | return new SequenceAnalyzer( |
| 166 | 166 | $c->query(SequenceSizeAnalyzer::class), |
| 167 | 167 | $c->query(FileTypeFunnellingAnalyzer::class), |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ); |
| 170 | 170 | }); |
| 171 | 171 | |
| 172 | - $container->registerService('EntropyAnalyzer', function ($c) { |
|
| 172 | + $container->registerService('EntropyAnalyzer', function($c) { |
|
| 173 | 173 | return new EntropyAnalyzer( |
| 174 | 174 | $c->query(ILogger::class), |
| 175 | 175 | $c->query(IRootFolder::class), |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | ); |
| 179 | 179 | }); |
| 180 | 180 | |
| 181 | - $container->registerService('FileCorruptionAnalyzer', function ($c) { |
|
| 181 | + $container->registerService('FileCorruptionAnalyzer', function($c) { |
|
| 182 | 182 | return new FileCorruptionAnalyzer( |
| 183 | 183 | $c->query(ILogger::class), |
| 184 | 184 | $c->query(IRootFolder::class), |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | ); |
| 187 | 187 | }); |
| 188 | 188 | |
| 189 | - $container->registerService('Monitor', function ($c) { |
|
| 189 | + $container->registerService('Monitor', function($c) { |
|
| 190 | 190 | return new Monitor( |
| 191 | 191 | $c->query(IRequest::class), |
| 192 | 192 | $c->query(IConfig::class), |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | ); |
| 203 | 203 | }); |
| 204 | 204 | |
| 205 | - $container->registerService('FilesEvents', function ($c) { |
|
| 205 | + $container->registerService('FilesEvents', function($c) { |
|
| 206 | 206 | return new FilesEvents( |
| 207 | 207 | $c->query(ILogger::class), |
| 208 | 208 | $c->query(Monitor::class), |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | { |
| 219 | 219 | // register sabre plugin to catch the profind requests |
| 220 | 220 | $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
| 221 | - $eventDispatcher->addListener('OCA\DAV\Connector\Sabre::addPlugin', function (SabrePluginEvent $event) { |
|
| 221 | + $eventDispatcher->addListener('OCA\DAV\Connector\Sabre::addPlugin', function(SabrePluginEvent $event) { |
|
| 222 | 222 | $logger = $this->getContainer()->query(ILogger::class); |
| 223 | 223 | $config = $this->getContainer()->query(IConfig::class); |
| 224 | 224 | $userSession = $this->getContainer()->query(IUserSession::class); |