Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/undo-ransomware/ransomware_detection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias <ilovemilk@wusa.io>2020-09-20 21:42:08 +0300
committerMatthias <ilovemilk@wusa.io>2020-09-20 21:42:08 +0300
commit4e4bfeeb0885992e54e36eb2abdbaf2832fc112d (patch)
tree73d323770ca0e6fc4947510680d6b17ed87a3eda
parent889a36b518245b77d7c68f2f6adb7c889e3c3eff (diff)
fix settings page
-rw-r--r--img/app-dark.svg7
-rw-r--r--lib/Settings/Admin.php16
-rw-r--r--templates/admin.php9
3 files changed, 6 insertions, 26 deletions
diff --git a/img/app-dark.svg b/img/app-dark.svg
index b902e4a..0edade1 100644
--- a/img/app-dark.svg
+++ b/img/app-dark.svg
@@ -1,6 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="20" height="20" viewBox="0 0 5.2916665 5.2916665">
- <g transform="translate(-26.75,-198.89161)">
- <path style="fill:#ffffff;stroke:none;fill-opacity:1" d="m 29.395833,199.15619 c -0.438816,0 -0.816733,0.15631 -1.048508,0.4516 -0.231777,0.29522 -0.313118,0.68348 -0.313118,1.12263 v 0.53135 h -0.653428 c -0.0612,0 -0.110445,0.0492 -0.110445,0.11047 v 2.43599 c 0,0.0612 0.04926,0.11046 0.110445,0.11046 h 4.030108 c 0.0612,0 0.110445,-0.0492 0.110445,-0.11046 v -2.43599 c 0,-0.0612 -0.04926,-0.11047 -0.110445,-0.11047 h -0.653429 v -0.53135 c 0,-0.43915 -0.08134,-0.82741 -0.313117,-1.12263 -0.231776,-0.29524 -0.609695,-0.4516 -1.048508,-0.4516 z m 0,0.5978 c 0.313119,0 0.46667,0.0809 0.578287,0.223 0.111613,0.14215 0.18554,0.3916 0.18554,0.75343 v 0.53135 h -1.527654 v -0.53135 c 0,-0.36183 0.07393,-0.61124 0.18554,-0.75343 0.111614,-0.14215 0.265167,-0.223 0.578287,-0.223 z m -0.144239,1.73572 h 0.313351 v 0.25865 c 0.08621,0.009 0.159995,0.0207 0.221347,0.0374 0.06301,0.016 0.112746,0.0332 0.149214,0.0497 l -0.0771,0.29846 c -0.05472,-0.0232 -0.118552,-0.0432 -0.191507,-0.0596 -0.07128,-0.016 -0.146752,-0.0248 -0.226329,-0.0248 -0.07959,0 -0.136768,0.0124 -0.171589,0.0398 -0.03482,0.0266 -0.05222,0.0612 -0.05222,0.10444 0,0.0266 0.005,0.0497 0.01487,0.0696 0.01168,0.0182 0.02901,0.0349 0.05222,0.0497 0.02321,0.0142 0.05141,0.0299 0.08457,0.0447 0.03482,0.0124 0.07625,0.0282 0.124341,0.0447 0.07295,0.0266 0.140132,0.0556 0.201471,0.0871 0.06301,0.0316 0.116871,0.068 0.16164,0.1094 0.04644,0.0399 0.08209,0.0871 0.106958,0.1418 0.02653,0.0547 0.03978,0.11861 0.03978,0.1915 0,0.0497 -0.0074,0.0995 -0.02236,0.14924 -0.01487,0.0481 -0.0398,0.0928 -0.07462,0.13436 -0.03482,0.0414 -0.08042,0.0772 -0.136786,0.10693 -0.05472,0.03 -0.122695,0.0513 -0.203936,0.0646 v 0.3034 h -0.313352 v -0.29593 c -0.12103,-0.0106 -0.219697,-0.0282 -0.295968,-0.0547 -0.07462,-0.0282 -0.130147,-0.0513 -0.166632,-0.0696 l 0.106923,-0.28602 c 0.05803,0.0282 0.126837,0.0538 0.206427,0.077 0.08124,0.0232 0.166632,0.0349 0.256165,0.0349 0.101135,0 0.16996,-0.0124 0.206428,-0.0398 0.03813,-0.0282 0.05721,-0.0671 0.05721,-0.11684 0,-0.0315 -0.0074,-0.058 -0.02239,-0.0797 -0.01487,-0.0232 -0.03647,-0.0439 -0.06466,-0.0621 -0.02818,-0.0183 -0.06383,-0.0356 -0.106939,-0.0522 -0.0431,-0.0183 -0.09285,-0.0374 -0.149214,-0.0572 -0.05472,-0.0198 -0.108603,-0.0414 -0.161675,-0.0646 -0.05141,-0.025 -0.09864,-0.0547 -0.141743,-0.0896 -0.04144,-0.0349 -0.07545,-0.077 -0.101966,-0.12675 -0.02488,-0.0513 -0.03732,-0.11276 -0.03732,-0.18406 0,-0.0547 0.0074,-0.10691 0.02239,-0.15666 0.01664,-0.0513 0.04144,-0.0979 0.0746,-0.13932 0.03316,-0.0414 0.07628,-0.0763 0.129334,-0.10444 0.05306,-0.03 0.116057,-0.0513 0.189017,-0.0646 z" />
- </g>
-</svg>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 20 20" width="20" height="20"><defs><path d="M6.04 2.71C5.16 3.82 4.85 5.29 4.85 6.95C4.85 7.08 4.85 7.75 4.85 8.96C3.37 8.96 2.55 8.96 2.38 8.96C2.15 8.96 1.97 9.14 1.97 9.38C1.97 10.3 1.97 17.66 1.97 18.58C1.97 18.81 2.15 19 2.38 19C3.91 19 16.09 19 17.62 19C17.85 19 18.03 18.81 18.03 18.58C18.03 17.66 18.03 10.3 18.03 9.38C18.03 9.14 17.85 8.96 17.62 8.96C17.45 8.96 16.63 8.96 15.15 8.96C15.15 7.75 15.15 7.08 15.15 6.95C15.15 5.29 14.84 3.82 13.96 2.71C13.09 1.59 11.66 1 10 1C8.34 1 6.91 1.59 6.04 2.71ZM12.19 4.1C12.61 4.64 12.89 5.58 12.89 6.95C12.89 7.08 12.89 7.75 12.89 8.96L7.11 8.96C7.11 7.75 7.11 7.08 7.11 6.95C7.11 5.58 7.39 4.64 7.81 4.1C8.24 3.56 8.82 3.26 10 3.26C11.18 3.26 11.76 3.57 12.19 4.1ZM9.45 9.82L10.64 9.82C10.64 10.41 10.64 10.73 10.64 10.8C10.96 10.83 11.24 10.88 11.48 10.94C11.71 11 11.9 11.06 12.04 11.13C12.01 11.24 11.78 12.14 11.75 12.25C11.54 12.17 11.3 12.09 11.02 12.03C10.76 11.97 10.47 11.94 10.17 11.94C9.87 11.94 9.65 11.98 9.52 12.09C9.39 12.19 9.32 12.32 9.32 12.48C9.32 12.58 9.34 12.67 9.38 12.74C9.42 12.81 9.49 12.88 9.58 12.93C9.66 12.99 9.77 13.04 9.9 13.1C10.03 13.15 10.18 13.21 10.37 13.27C10.64 13.37 10.9 13.48 11.13 13.6C11.37 13.72 11.57 13.86 11.74 14.01C11.91 14.16 12.05 14.34 12.14 14.55C12.24 14.75 12.29 15 12.29 15.27C12.29 15.46 12.27 15.65 12.21 15.84C12.15 16.02 12.06 16.19 11.93 16.34C11.8 16.5 11.62 16.64 11.41 16.75C11.2 16.86 10.95 16.94 10.64 16.99C10.64 17.07 10.64 17.45 10.64 18.14L9.45 18.14C9.45 17.47 9.45 17.09 9.45 17.02C9 16.98 8.62 16.91 8.34 16.81C8.05 16.71 7.84 16.62 7.71 16.55C7.75 16.44 8.07 15.58 8.11 15.47C8.33 15.58 8.59 15.67 8.89 15.76C9.2 15.85 9.52 15.89 9.86 15.89C10.24 15.89 10.5 15.85 10.64 15.74C10.78 15.64 10.86 15.49 10.86 15.3C10.86 15.18 10.83 15.08 10.77 15C10.71 14.91 10.63 14.83 10.53 14.76C10.42 14.7 10.28 14.63 10.12 14.57C9.96 14.5 9.77 14.43 9.56 14.35C9.35 14.28 9.15 14.19 8.95 14.11C8.75 14.01 8.57 13.9 8.41 13.77C8.25 13.64 8.13 13.48 8.03 13.29C7.93 13.1 7.88 12.86 7.88 12.59C7.88 12.39 7.91 12.19 7.97 12C8.03 11.81 8.13 11.63 8.25 11.47C8.38 11.32 8.54 11.19 8.74 11.08C8.94 10.97 9.18 10.89 9.45 10.84C9.45 10.7 9.45 10.36 9.45 9.82Z" id="d3JjRkcPM3"></path></defs><g><g><g><use xlink:href="#d3JjRkcPM3" opacity="1" fill="#000000" fill-opacity="1"></use><g><use xlink:href="#d3JjRkcPM3" opacity="1" fill-opacity="0" stroke="#000000" stroke-width="1" stroke-opacity="0"></use></g></g></g></g></svg> \ No newline at end of file
diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php
index 052ba30..8036683 100644
--- a/lib/Settings/Admin.php
+++ b/lib/Settings/Admin.php
@@ -47,23 +47,7 @@ class Admin implements ISettings
*/
public function getForm()
{
- $suspicionLevel = $this->config->getAppValue(Application::APP_ID, 'suspicion_level', 2);
-
- $activeSuspicionLevel = [];
- $suspicionLevels = [['code' => 1, 'name' => 'Maybe suspicious'], ['code' => 2, 'name' => 'Suspicious']];
-
- if (intval($suspicionLevel) === 1) {
- $activeSuspicionLevel = ['code' => 1, 'name' => 'Maybe suspicious'];
- $suspicionLevels = [['code' => 2, 'name' => 'Suspicious']];
- } elseif (intval($suspicionLevel) === 2) {
- $activeSuspicionLevel = ['code' => 2, 'name' => 'Suspicious'];
- $suspicionLevels = [['code' => 1, 'name' => 'Maybe suspicious']];
- }
-
return new TemplateResponse(Application::APP_ID, 'admin', [
- 'minimum_sequence_length' => $this->config->getAppValue(Application::APP_ID, 'minimum_sequence_length', 5),
- 'active_suspicion_level' => $activeSuspicionLevel,
- 'suspicion_levels' => $suspicionLevels,
'expire_days' => $this->config->getAppValue(Application::APP_ID, 'expire_days', 7),
], '');
}
diff --git a/templates/admin.php b/templates/admin.php
index 32baae8..adbc929 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -21,12 +21,11 @@ style('ransomware_detection', 'style');
script('ransomware_detection', 'admin');
?>
<div id="ransomware_detection_service" class="section">
- <h2 class="inlineblock"><?php p($l->t('Service')); ?></h2>
- <div class="ransomware_detection_service">
+ <h2 class="inlineblock"><?php p($l->t('Recovery')); ?></h2>
+ <div class="ransomware_detection_cronjob">
<h3>
- <?php p($l->t('URI to the ransomware detection service:')); ?>
+ <?php p($l->t('Number of days until a sequence will be deleted')); ?>
</h3>
- <input id="service-uri" type="text" name="service-uri" value="<?php p($_['service_uri']); ?>"/>
- <button id="save"><?php p($l->t('Save')); ?></button>
+ <input id="expire_days" type="text" name="expire_days" value="<?php p($_['expire_days']); ?>"/>
</div>
</div>