Cerber Security & Antispam - Version 7.0

Version Description

Download this release

Release Info

Developer Gioni
Plugin Icon 128x128 Cerber Security & Antispam
Version 7.0
Comparing to
See all releases

Code changes from version 6.7.5 to 7.0

assets/admin.css CHANGED
@@ -8,6 +8,10 @@
8
  font-weight: 500;
9
  }
10
 
 
 
 
 
11
  .crb-main a:focus,
12
  #crb-aside a:focus {
13
  -webkit-box-shadow: none !important;
@@ -87,7 +91,7 @@
87
  #crb-aside {
88
  float: right;
89
  width: 290px;
90
- margin: 1em 0;
91
  }
92
 
93
  @media (max-width: 1300px) {
@@ -633,8 +637,9 @@ a.nav-tab:first-child{
633
  font-weight: normal;
634
  }
635
  .cerber-tabs .nav-tab-active {
636
- color: #804040;
637
  color: rgb(0, 103, 153);
 
638
  }
639
 
640
  /* Preserve line-height for tabs */
@@ -664,11 +669,15 @@ a.nav-tab:first-child{
664
 
665
  /* Scanner page */
666
 
 
 
 
 
667
  #crb-scanner {
668
  text-align: center;
669
  }
670
  #crb-scan-display, #crb-scan-details {
671
- width: 97%;
672
  overflow: auto;
673
  padding: 20px 10px 10px 10px;
674
  background-color: #f9f9f9;
@@ -677,6 +686,7 @@ a.nav-tab:first-child{
677
  /*margin-bottom: 10px;*/
678
  }
679
  #crb-scan-details {
 
680
  border: solid #E5E5E5 2px;
681
  min-height: 20vh;
682
  max-height: 50vh;
@@ -731,42 +741,118 @@ div.scan-tile div {
731
  #crb-browse-files td {
732
  color: #333;
733
  text-align: left;
734
- padding: 0.5em;
735
  }
736
 
737
- #crb-browse-files tr.crb-file-file td:nth-child(2) {
738
- font-family: Menlo, Consolas, Monaco, monospace;
 
 
 
 
 
 
 
 
 
 
739
  cursor: pointer;
740
  }
 
 
 
 
 
 
 
 
741
 
742
  #crb-browse-files tr.crb-scan-section td {
743
- padding: 1em 0 1em 0;
744
  border-top: 1px dashed #aaa;
 
745
  }
746
- #crb-browse-files tr.crb-scan-section td span {
747
  font-weight: bold;
748
- color: #222;
749
  /*margin-right: 0.5em;*/
750
  }
751
 
752
- #crb-browse-files .risk3{
753
- color: #c91619;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754
  }
755
  #crb-browse-files .risk2{
756
  /*color: yellow;*/
757
  }
758
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  #crb-scan-controls .button {
760
  margin-right: 1em;
761
  }
 
 
 
 
762
 
763
  #crb-scan-progress {
 
764
  padding: 10px 5px 0 5px;
765
  clear: both;
766
  }
767
 
768
  #crb-scan-progress > div {
769
- display: none;
770
  text-align: left;
771
  clear: both;
772
  width: 100%;
@@ -776,13 +862,46 @@ div.scan-tile div {
776
 
777
  #the-scan-bar {
778
  display: block;
779
- width: 0;
780
  height: 5px;
781
  background-color: #00ae65cc;
782
  }
783
 
 
 
 
 
 
 
 
 
 
784
  /* end of Scanner page */
785
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
786
 
787
  /* Widgets */
788
 
@@ -1091,6 +1210,7 @@ table#admin-help img{
1091
  table#admin-help p{
1092
  margin-top: 0.5em;
1093
  margin-bottom: 1em;
 
1094
  }
1095
  table#admin-help span{
1096
  vertical-align: middle;
8
  font-weight: 500;
9
  }
10
 
11
+ .crb-admin h2, .crb-admin h3 {
12
+ font-weight: 500;
13
+ }
14
+
15
  .crb-main a:focus,
16
  #crb-aside a:focus {
17
  -webkit-box-shadow: none !important;
91
  #crb-aside {
92
  float: right;
93
  width: 290px;
94
+ margin: 1em 0 0 1em;
95
  }
96
 
97
  @media (max-width: 1300px) {
637
  font-weight: normal;
638
  }
639
  .cerber-tabs .nav-tab-active {
640
+ /* color: #804040;*/
641
  color: rgb(0, 103, 153);
642
+ font-weight: 500;
643
  }
644
 
645
  /* Preserve line-height for tabs */
669
 
670
  /* Scanner page */
671
 
672
+ body.wp-cerber_page_cerber-integrity {
673
+ overflow-y: scroll; /* workaround for jumping page when thickbox popup is active */
674
+ }
675
+
676
  #crb-scanner {
677
  text-align: center;
678
  }
679
  #crb-scan-display, #crb-scan-details {
680
+ /*width: 97%;*/
681
  overflow: auto;
682
  padding: 20px 10px 10px 10px;
683
  background-color: #f9f9f9;
686
  /*margin-bottom: 10px;*/
687
  }
688
  #crb-scan-details {
689
+ padding: 0;
690
  border: solid #E5E5E5 2px;
691
  min-height: 20vh;
692
  max-height: 50vh;
741
  #crb-browse-files td {
742
  color: #333;
743
  text-align: left;
744
+ padding: 10px;
745
  }
746
 
747
+ #crb-browse-files .crb-scan-container {
748
+ display: none;
749
+ }
750
+ /*
751
+ #crb-browse-files .crb-scan-container td {
752
+ font-size: 120%;
753
+ color: #444;
754
+ padding-top: 1em;
755
+ padding-bottom: 1em;
756
+ }*/
757
+
758
+ #crb-browse-files td.cursor-pointer {
759
  cursor: pointer;
760
  }
761
+ #crb-browse-files td.cursor-pointer:hover {
762
+ text-decoration: underline;
763
+ }
764
+
765
+ #crb-browse-files tr.crb-item-file td:nth-child(2) {
766
+ font-family: Menlo, Consolas, Monaco, monospace;
767
+ /*cursor: pointer;*/
768
+ }
769
 
770
  #crb-browse-files tr.crb-scan-section td {
771
+ padding: 15px 0 15px 10px;
772
  border-top: 1px dashed #aaa;
773
+ font-size: 105%;
774
  }
775
+ #crb-browse-files tr.crb-scan-section td span:first-child {
776
  font-weight: bold;
777
+ color: #333;
778
  /*margin-right: 0.5em;*/
779
  }
780
 
781
+ #crb-browse-files tr.section-crb-plugins td span:first-child:after {
782
+ content: ' plugin';
783
+ }
784
+ #crb-browse-files tr.section-crb-themes td span:first-child:after {
785
+ content: ' theme';
786
+ }
787
+ #crb-browse-files tr.section-crb-wordpress td span:first-child:after {
788
+ content: ' files';
789
+ }
790
+
791
+ #crb-browse-files .crb-scan-section .crb-it-1 {
792
+ background-color: #00ae65cc;
793
+ color: #fff;
794
+ margin-left: 6px;
795
+ display: inline-block;
796
+ line-height: 1em;
797
+ padding: 3px 5px;
798
+ font-size: 92%;
799
+ }
800
+ #crb-browse-files .crb-scan-section .crb-it-5,
801
+ #crb-browse-files .crb-scan-section .crb-it-6,
802
+ #crb-browse-files .crb-scan-section .crb-it-7,
803
+ #crb-browse-files .crb-scan-section .crb-it-8{
804
+ color: #dd1320;
805
+ }
806
+
807
+ #crb-browse-files .risk3 span{
808
+ /*background-color: #c91619;*/
809
+ /* background-color: #dd1320; */
810
+ background-color: #dc2f34;
811
+ color: #fff;
812
+ display: inline-block;
813
+ line-height: 1em;
814
+ padding: 3px 5px;
815
+ font-size: 92%;
816
  }
817
  #crb-browse-files .risk2{
818
  /*color: yellow;*/
819
  }
820
 
821
+ #crb-browse-files .scan-ilabel {
822
+ }
823
+
824
+ #crb-scan-controls {
825
+ width: 100%;
826
+ margin-top: 10px;
827
+ background-color: #f1f1f1;
828
+ }
829
+ #crb-scan-controls td{
830
+ text-align: center;
831
+ width: 50%;
832
+ }
833
+ #crb-scan-controls td:first-child{
834
+ width: 25%;
835
+ text-align: left;
836
+ }
837
+ #crb-scan-controls td:last-child{
838
+ width: 25%;
839
+ text-align: right;
840
+ }
841
  #crb-scan-controls .button {
842
  margin-right: 1em;
843
  }
844
+ #crb-file-controls input,
845
+ #crb-scan-controls a{
846
+ display: none;
847
+ }
848
 
849
  #crb-scan-progress {
850
+ display: none;
851
  padding: 10px 5px 0 5px;
852
  clear: both;
853
  }
854
 
855
  #crb-scan-progress > div {
 
856
  text-align: left;
857
  clear: both;
858
  width: 100%;
862
 
863
  #the-scan-bar {
864
  display: block;
865
+ width: 10px;
866
  height: 5px;
867
  background-color: #00ae65cc;
868
  }
869
 
870
+ #crb-scan-message {
871
+ clear: both;
872
+ color: #A00D5C;
873
+ }
874
+
875
+ #ref-section-name {
876
+ font-weight: bold;
877
+ }
878
+
879
  /* end of Scanner page */
880
 
881
+ .crb-popup-inner {
882
+ margin-top: 1em;
883
+ overflow: auto;
884
+ }
885
+ .crb-popup-inner div {
886
+ margin-bottom: 10px;
887
+ }
888
+ .crb-popup-inner p {
889
+ padding-top: 0;
890
+ margin-top: 0;
891
+ margin-bottom: 1em;
892
+ }
893
+
894
+ .crb-popup-inner div div {
895
+ border-left: solid 2px #dd1320;
896
+ padding-left: 10px;
897
+ margin-bottom: 20px;
898
+ }
899
+ .crb-popup-inner div div p{
900
+ margin-top: 1em;
901
+ }
902
+ .crb-popup-inner div div code {
903
+ line-height: 180%;
904
+ }
905
 
906
  /* Widgets */
907
 
1210
  table#admin-help p{
1211
  margin-top: 0.5em;
1212
  margin-bottom: 1em;
1213
+ line-height: 1.7;
1214
  }
1215
  table#admin-help span{
1216
  vertical-align: middle;
assets/admin.js CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  jQuery(document).ready(function ($) {
2
 
3
  /* WP Comments page */
@@ -14,7 +17,7 @@ jQuery(document).ready(function ($) {
14
  //cerberLoadData('country');
15
  }
16
 
17
- /* Load data with AJAX */
18
 
19
  if ($(".crb-no-country").length) {
20
  cerberLoadData('country');
@@ -104,18 +107,20 @@ jQuery(document).ready(function ($) {
104
 
105
  /* Traffic */
106
 
107
- $('#crb-traffic tr.crb-toggle td.crb-request').click(function () {
 
 
108
  var request_details = $(this).parent().next();
109
  //request_details.slideToggle(100);
110
  request_details.toggle();
111
  //request_details.data('session-id');
112
  });
113
 
114
- $('#crb-traffic tr').mouseenter(function() {
115
  $(this).find('a.crb-traffic-more').show();
116
  });
117
 
118
- $('#crb-traffic tr').mouseleave(function() {
119
  $(this).find('a.crb-traffic-more').hide();
120
  });
121
 
1
+ /**
2
+ * Copyright (C) 2015-18 CERBER TECH INC., https://wpcerber.com
3
+ */
4
  jQuery(document).ready(function ($) {
5
 
6
  /* WP Comments page */
17
  //cerberLoadData('country');
18
  }
19
 
20
+ /* Load IP address data with AJAX */
21
 
22
  if ($(".crb-no-country").length) {
23
  cerberLoadData('country');
107
 
108
  /* Traffic */
109
 
110
+ var crb_traffic = $('#crb-traffic');
111
+
112
+ crb_traffic.find('tr.crb-toggle td.crb-request').click(function () {
113
  var request_details = $(this).parent().next();
114
  //request_details.slideToggle(100);
115
  request_details.toggle();
116
  //request_details.data('session-id');
117
  });
118
 
119
+ crb_traffic.find('tr').mouseenter(function() {
120
  $(this).find('a.crb-traffic-more').show();
121
  });
122
 
123
+ crb_traffic.find('tr').mouseleave(function() {
124
  $(this).find('a.crb-traffic-more').hide();
125
  });
126
 
assets/scanner.js ADDED
@@ -0,0 +1,841 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Copyright (C) 2015-18 CERBER TECH INC., https://wpcerber.com
3
+ */
4
+ jQuery(document).ready(function ($) {
5
+
6
+ window.crb_scan_id = 0;
7
+
8
+ var crb_req_min_delay = 1000; // ms, throttling - making requests to the server not often than
9
+
10
+ var crb_scan_mode = '';
11
+ var crb_user_stop = false;
12
+ var crb_scan_in_progress = false;
13
+ var crb_issues_counter = [0, 0, 0, 0];
14
+ var crb_issues_total = 0;
15
+
16
+ var crb_response;
17
+ var scanner_data;
18
+
19
+ var crb_scan_requests = 0;
20
+ var crb_server_errors = 0;
21
+
22
+ var crb_scan_controls = $('#crb-scan-controls');
23
+ var crb_file_controls = $('#crb-file-controls');
24
+
25
+ var crb_scan_details = $('#crb-scan-details');
26
+ var crb_scan_progress = $('#crb-scan-progress');
27
+ //var crb_scan_bar = crb_scan_progress.find('div');
28
+ var crb_scan_bar = crb_scan_progress.find('#the-scan-bar');
29
+
30
+ var crb_scan_message = $("#crb-scan-message");
31
+ var crb_scan_browser = $("#crb-browse-files");
32
+
33
+ var crb_scan_strings = null;
34
+
35
+ cerber_scan_load_last();
36
+
37
+ cerber_load_strings();
38
+
39
+ crb_scan_controls.find(':button,a').click(function (event) {
40
+ var operation = $(event.target).data('control');
41
+ switch (operation) {
42
+ case 'start_scan':
43
+ cerber_scan_start($(event.target));
44
+ break;
45
+ case 'continue_scan':
46
+ cerber_scan_continue();
47
+ break;
48
+ case 'stop_scan':
49
+ crb_user_stop = true;
50
+ crb_scan_in_progress = false;
51
+ //cerber_scan_controls('stopped');
52
+ //cerber_scan_controls('disabled');
53
+ break;
54
+ case 'delete_file':
55
+ cerber_delete_files();
56
+ break;
57
+ case 'full-paths':
58
+ cerber_toggle_file_name(event.target);
59
+ break;
60
+ }
61
+
62
+ if (crb_scan_in_progress) {
63
+ window.onbeforeunload = function () {
64
+ return 'Scanning in progress';
65
+ }
66
+ }
67
+ else {
68
+ window.onbeforeunload = null;
69
+ }
70
+
71
+ event.preventDefault();
72
+ });
73
+
74
+ function cerber_scan_start(object) {
75
+
76
+ crb_scan_mode = object.data('mode');
77
+ crb_scan_requests = 0;
78
+ crb_user_stop = false;
79
+ crb_issues_counter = [0, 0, 0, 0];
80
+ crb_issues_total = 0;
81
+
82
+ $('#crb-scan-display').find('[data-init]').each(function () {
83
+ $(this).html($(this).data('init'));
84
+ });
85
+ $('#crb-scan-details').find('[data-init]').each(function () {
86
+ $(this).html($(this).data('init'));
87
+ });
88
+
89
+ crb_scan_message.slideDown().html(crb_scan_msg_steps[1]);
90
+ cerber_update_bar(true);
91
+ cerber_scan_controls('scanning');
92
+ crb_scan_browser.find('tr').not('.crb-scan-container').remove();
93
+ cerber_scan_step('start_scan');
94
+ }
95
+
96
+ function cerber_scan_continue() {
97
+ cerber_scan_controls('scanning');
98
+ cerber_scan_step();
99
+ }
100
+
101
+ function cerber_scan_step(operation) {
102
+ if (!operation) {
103
+ operation = 'continue_scan';
104
+ }
105
+
106
+ crb_scan_in_progress = true;
107
+ crb_scan_requests++;
108
+
109
+ cerber_rate_control.setState(0);
110
+ setTimeout(function (state) {
111
+ cerber_rate_control.setState(state);
112
+ }, crb_req_min_delay, 1);
113
+
114
+ $.post(ajaxurl, {
115
+ action: 'cerber_scan_control',
116
+ cerber_scan_do: operation,
117
+ cerber_scan_mode: crb_scan_mode,
118
+ ajax_nonce: crb_ajax_nonce
119
+ },
120
+ function (server_response) {
121
+ cerber_scan_parse(server_response);
122
+ cerber_scan_display(false);
123
+
124
+ if (!crb_user_stop && crb_response.cerber_scan_do !== 'stop') {
125
+ cerber_scan_next_step();
126
+ }
127
+ else {
128
+ cerber_scan_ended();
129
+ }
130
+
131
+ }
132
+ ).fail(function (jqXHR, textStatus, errorThrown) {
133
+ console.error('Server error: ' + jqXHR.status);
134
+ crb_server_errors++;
135
+ if (crb_server_errors < 3) {
136
+ cerber_scan_next_step();
137
+ }
138
+ else {
139
+ cerber_scan_ended();
140
+ alert('Process has been aborted due to server error. Check the browser console for errors.');
141
+ }
142
+ });
143
+ }
144
+
145
+ // Continue to scan with rate control
146
+ function cerber_scan_next_step() {
147
+ if (cerber_rate_control.getState()) {
148
+ cerber_scan_step();
149
+ }
150
+ else {
151
+ setTimeout(cerber_scan_step, crb_req_min_delay);
152
+ }
153
+ }
154
+
155
+ function cerber_scan_ended(){
156
+ window.onbeforeunload = null;
157
+ crb_scan_in_progress = false;
158
+ cerber_scan_controls('stopped');
159
+ crb_scan_message.slideUp('slow');
160
+ cerber_update_bar();
161
+ if (scanner_data.aborted) {
162
+ var msg = 'Scanning is aborted due to server error. ';
163
+ if (scanner_data.errors && scanner_data.errors.length) {
164
+ msg = msg + scanner_data.errors[0];
165
+ }
166
+ alert(msg);
167
+ }
168
+ else if (!crb_user_stop) {
169
+ cerber_popup_show('The scan is finished', '<p style="text-align: center;">The scan is finished. Please review the results.</p>', 350, 180);
170
+ }
171
+ }
172
+
173
+ function cerber_scan_display(no_scroll) {
174
+
175
+ if (!scanner_data.started) {
176
+ return;
177
+ }
178
+
179
+ $("#crb-started").html(scanner_data.started);
180
+ $("#crb-finished").html(scanner_data.finished);
181
+ $("#crb-duration").html(scanner_data.duration);
182
+ $("#crb-performance").html(scanner_data.performance);
183
+
184
+ $("#crb-total-files").html(scanner_data.total.files);
185
+ $("#crb-scanned-files").html(scanner_data.scanned.files);
186
+
187
+ if (!scanner_data.aborted && crb_scan_in_progress) {
188
+ crb_scan_message.html(crb_scan_msg_steps[scanner_data.step]);
189
+ }
190
+
191
+ cerber_update_bar();
192
+
193
+ // Displaying issues
194
+
195
+ var issues = [];
196
+ if (!scanner_data.issues && scanner_data.step_issues) {
197
+ scanner_data.issues = scanner_data.step_issues;
198
+ }
199
+ /*else if (scanner_data.issues) {
200
+ issues = scanner_data.issues;
201
+ }*/
202
+
203
+ $.each(scanner_data.issues, function (section_id) {
204
+
205
+ var the_items = [];
206
+
207
+ if (!this.issues.length) {
208
+ return;
209
+ }
210
+
211
+ var section_name = this.name;
212
+ var setype = this.setype;
213
+
214
+ var section_header_class = 'crb-scan-section';
215
+ if (this.container) {
216
+ section_header_class = section_header_class + ' section-' + this.container;
217
+ }
218
+
219
+ var section_items = [];
220
+ //var section_header = '';
221
+ var issue_type_id, f_name, isize, itime, full_name;
222
+ var risk;
223
+ var rbox;
224
+ var name_classes;
225
+ var version;
226
+
227
+ var section_header = '<tr id="' + section_id + '" class="' + section_header_class + '" data-section-name="' + section_name + '" data-setype="' + setype + '"><td></td><td colspan = 5><span>' + section_name + '</span></td></tr>';
228
+
229
+ $.each(this.issues, function (index, single_issue) {
230
+ issue_type_id = single_issue[0];
231
+ f_name = single_issue[1];
232
+ risk = single_issue[2];
233
+
234
+ isize = '';
235
+ if (single_issue.data.size) {
236
+ isize = single_issue.data.size;
237
+ }
238
+ itime = '';
239
+ if (single_issue.data.time) {
240
+ itime = single_issue.data.time;
241
+ }
242
+ version = '';
243
+ if (single_issue.data.version) {
244
+ version = single_issue.data.version;
245
+ }
246
+ full_name = '';
247
+ name_classes = '';
248
+ if (single_issue.data.name) {
249
+ full_name = single_issue.data.name;
250
+ name_classes += ' cursor-pointer';
251
+ }
252
+
253
+ if (issue_type_id < 10) {
254
+ // Section -------------------------
255
+ var extra = '';
256
+ if (issue_type_id !== 1) {
257
+ extra += ' &mdash; ';
258
+ }
259
+ extra += '<span class="crb-it-' + issue_type_id + ' scan-ilabel">' + crb_scan_msg_issues[issue_type_id] + '</span>';
260
+ if (issue_type_id === 5) {
261
+ extra += ' &mdash; <a href="#" class="crb-issue-link" data-itype="' + issue_type_id + '" data-section-name="' + section_name + ' v. ' + version + '">Resolve issue</a>';
262
+ }
263
+
264
+ section_header = '<tr id="' + section_id + '" class="' + section_header_class + '" data-section-name="' + section_name + '" data-setype="' + setype + '"><td></td><td colspan = 5><span>' + section_name + '</span>' + extra + '</td></tr>';
265
+ }
266
+ else {
267
+ // Single file issue ----------------
268
+ rbox = '';
269
+ if (single_issue.data.fd_allowed) {
270
+ rbox = '<input type="checkbox" name="" data-file_name="' + full_name + '">';
271
+ }
272
+ section_items.push('<tr class="crb-item-file" data-itype="' + issue_type_id + '"><td>' + rbox + '</td><td data-file-name="' + full_name + '" data-short="' + f_name + '" class="' + name_classes + '">' + f_name + '</td><td>' + cerber_get_issue_txt(index, single_issue) + '</td><td class="risk' + risk + ' scan-ilabel"><span>' + crb_scan_msg_risks[risk] + '</span></td><td>' + isize + '</td><td>' + itime + '</td></tr>');
273
+ }
274
+
275
+ crb_issues_counter[risk]++;
276
+ if (issue_type_id > 1) {
277
+ crb_issues_total++;
278
+ }
279
+ });
280
+
281
+ var section = crb_scan_browser.find('#' + section_id);
282
+
283
+ if (section.length) {
284
+ section.after(section_items);
285
+ }
286
+ else {
287
+ section_items.unshift(section_header);
288
+ $.merge(the_items, section_items);
289
+ }
290
+
291
+ if (the_items) {
292
+ var container = null;
293
+ if (this.container) {
294
+ container = crb_scan_browser.find('#' + this.container);
295
+ }
296
+ if (container && container.length) {
297
+ container.after(the_items);
298
+ }
299
+ else {
300
+ crb_scan_browser.append(the_items);
301
+ }
302
+ }
303
+
304
+
305
+ });
306
+
307
+ /*if (the_items) {
308
+ var container = null; alert(this.container);
309
+ if (this.container) {
310
+ container = crb_scan_browser.find('#' + this.container);
311
+ }
312
+
313
+ if (container.length) {
314
+ container.after(the_items);
315
+ }
316
+ else {
317
+ crb_scan_browser.append(the_items);
318
+ }
319
+ }*/
320
+
321
+ $("#crb-critical").html(crb_issues_counter[3]);
322
+ $("#crb-warning").html(crb_issues_total);
323
+
324
+ if (!crb_scan_in_progress) {
325
+ cerber_file_controls();
326
+ }
327
+
328
+ if (!no_scroll) {
329
+ crb_scan_details.animate({scrollTop: crb_scan_details.prop("scrollHeight")}, 500);
330
+ }
331
+ }
332
+
333
+ function cerber_scan_parse(server_response) {
334
+ crb_response = $.parseJSON(server_response);
335
+ scanner_data = crb_response.cerber_scanner;
336
+ window.crb_scan_id = scanner_data.scan_id;
337
+
338
+ if (scanner_data.errors && scanner_data.errors.length) {
339
+ scanner_data.errors.forEach(function (item, index) {
340
+ console.error('WP CERBER SCANNER ERROR: ' + item);
341
+ });
342
+ }
343
+ if (crb_response.console_log && crb_response.console_log.length) {
344
+ crb_response.console_log.forEach(function (item) {
345
+ console.log('WP CERBER: ' + item);
346
+ });
347
+ }
348
+ }
349
+
350
+ function cerber_scan_load_last() {
351
+ $.post(ajaxurl, {
352
+ action: 'cerber_scan_control',
353
+ cerber_scan_do: 'get-last-scan',
354
+ ajax_nonce: crb_ajax_nonce
355
+ },
356
+ function (server_response) {
357
+ cerber_scan_parse(server_response);
358
+ scanner_data.step_issues = '';
359
+ cerber_scan_display(true);
360
+ });
361
+ }
362
+
363
+ function cerber_get_issue_txt(index, issue) {
364
+ var attr = '';
365
+ var ret = crb_scan_msg_issues[issue[0]];
366
+
367
+ if (issue.details.xdata && issue.details.xdata.length) {
368
+ attr += ' data-idx="' + index + '" ';
369
+ }
370
+ if (attr || (issue[0] > 15 && issue[0] < 30)) {
371
+ ret = '<a href="#" ' + attr + '>' + ret + '</a>';
372
+ }
373
+
374
+ return ret;
375
+ }
376
+
377
+ // Enable/disable scan controls
378
+ function cerber_scan_controls(state) {
379
+ var stop = $('#crb-stop-scan');
380
+ cerber_file_controls();
381
+ switch (state) {
382
+ case 'scanning':
383
+ crb_scan_controls.find(':button').hide();
384
+ stop.show();
385
+ break;
386
+ case 'stopped':
387
+ crb_scan_controls.find(':button').show();
388
+ stop.hide();
389
+ if (scanner_data.finished) {
390
+ $('#crb-continue-scan').hide();
391
+ }
392
+ break;
393
+ case 'disabled':
394
+ crb_scan_controls.find(':button').prop( "disabled", true );
395
+ break;
396
+ }
397
+ }
398
+
399
+ // Enable/disable file controls
400
+ function cerber_file_controls() {
401
+ var b = crb_file_controls.find(':button');
402
+ if (crb_scan_browser.find('input[type=checkbox]').length) {
403
+ b.show();
404
+ }
405
+ else {
406
+ b.hide();
407
+ }
408
+
409
+ var a = crb_scan_controls.find('a');
410
+ if (crb_scan_browser.find('.crb-item-file').length) {
411
+ a.show();
412
+ }
413
+ else {
414
+ a.hide();
415
+ }
416
+ }
417
+
418
+ function cerber_update_bar(show) {
419
+ if (!crb_scan_in_progress) {
420
+ if (!show) {
421
+ crb_scan_progress.hide();
422
+ }
423
+ else {
424
+ crb_scan_progress.show();
425
+ }
426
+ crb_scan_bar.width(0);
427
+ return;
428
+ }
429
+
430
+ crb_scan_progress.show();
431
+ crb_scan_progress.width('100%');
432
+
433
+ if (scanner_data.scanned.files > 0) {
434
+ percentage = 30 + (scanner_data.scanned.files / scanner_data.total.files) * 70;
435
+ }
436
+ else {
437
+ if (scanner_data.step < 3) {
438
+ percentage = 10;
439
+ }
440
+ else {
441
+ percentage = 10 + crb_scan_requests * 5;
442
+ }
443
+ }
444
+
445
+ crb_scan_bar.animate({width: percentage + '%'}, 1000);
446
+
447
+ //var bar_width = (percentage*crb_scan_bar.parent().width()/100)+'px';
448
+ //crb_scan_bar.width('100px');
449
+ //crb_scan_bar.find('div').animate({width: bar_width}, 1000);
450
+ ///crb_scan_bar.animate({width: bar_width}, 1000);
451
+
452
+ //crb_scan_bar.find('div').animate({width: percentage + '%'}, 1000);
453
+ //crb_scan_bar.animate({width: percentage + '%'}, 1000);
454
+
455
+ }
456
+
457
+ // Rate limiting helper
458
+ var cerber_rate_control = (function () {
459
+ var state = 0;
460
+ var obj = {};
461
+ obj.setState = function (setnew) {
462
+ state = setnew;
463
+ };
464
+ obj.getState = function() {
465
+ return state;
466
+ };
467
+ return obj;
468
+ }());
469
+
470
+ function cerber_delete_files() {
471
+ var files_to_delete = crb_scan_browser.find('input[type=checkbox]:checked');
472
+ if (files_to_delete.length) {
473
+ if (!confirm('Are you sure you want to delete selected files?')){
474
+ return;
475
+ }
476
+ var formData = new FormData();
477
+ formData.append('action', 'cerber_scan_delete_files');
478
+ formData.append('ajax_nonce', crb_ajax_nonce);
479
+ formData.append('scan_id', window.crb_scan_id);
480
+ $.each(files_to_delete, function () {
481
+ formData.append('files[]', $(this).data('file_name'));
482
+ });
483
+ $.ajax({
484
+ url: ajaxurl,
485
+ type: 'POST',
486
+ data: formData,
487
+ contentType: false,
488
+ processData: false,
489
+ dataType: 'json'
490
+ }).done(function (server_response) {
491
+ var e = '', title = '';
492
+ if (server_response.errors && server_response.errors.length) {
493
+ e = '<div style="color: #c91619;"><b>Errors occurred during deletion</b><p>'+server_response.errors.join('</p><p>')+'</p></div>';
494
+ }
495
+ if (server_response.deleted && server_response.deleted.length) {
496
+ e = e + '<div><b>These files has been deleted</b><p>'+server_response.deleted.join('</p><p>')+'</p></div>';
497
+ }
498
+ if (files_to_delete.length === server_response.number) {
499
+ title = 'All files are moved to the quarantine and isolated';
500
+ }
501
+ else {
502
+ title = 'Deleting files';
503
+ }
504
+ cerber_popup_show(title, e);
505
+
506
+ if (server_response.deleted && server_response.deleted.length) {
507
+ $.each(server_response.deleted, function (index, file_name) {
508
+ crb_scan_browser.find('td[data-file-name="' + file_name + '"]').parent().remove();
509
+ });
510
+ }
511
+
512
+ }).fail(function (jqXHR, textStatus, errorThrown) {
513
+ cerber_popup_show('Something went wrong on the server', jqXHR.responseText);
514
+ });
515
+
516
+ /*to_delete.map(function () {
517
+ return 'files[]=' + $(this).data('file_name');
518
+ }).get().join('&');
519
+ */
520
+ }
521
+ }
522
+
523
+ function cerber_toggle_file_name(control) {
524
+ var items = crb_scan_browser.find('.crb-item-file td[data-file-name]');
525
+ if (!window.cerber_full_toggler) {
526
+ window.cerber_full_toggler = 1;
527
+ }
528
+ else {
529
+ window.cerber_full_toggler = 0;
530
+ }
531
+ if (items.length) {
532
+ $.each(items, function () {
533
+ if ($(this).data('file-name') === '') {
534
+ return;
535
+ }
536
+ if (window.cerber_full_toggler) {
537
+ $(this).html($(this).data('file-name'));
538
+ $(control).text('Hide full paths');
539
+ }
540
+ else {
541
+ $(this).html($(this).data('short'));
542
+ $(control).text('Show full paths');
543
+ }
544
+ });
545
+ }
546
+ }
547
+
548
+ crb_scan_browser.on('click', 'a', function (event) {
549
+ var issue = $(this).data('itype');
550
+ if (issue && issue === 5) {
551
+ $('#ref-section-name').text($(this).data('section-name'));
552
+ crb_enable_ref_form();
553
+ crb_upload_form_ul.children().hide();
554
+ tb_show("Please upload a reference ZIP archive", '#TB_inline?width=420&height=400&inlineId=crb-ref-upload-dialog');
555
+ $('#TB_closeWindowButton').blur();
556
+ }
557
+ else {
558
+ cerber_issue_popup(this);
559
+ }
560
+ event.preventDefault();
561
+ });
562
+
563
+ function cerber_issue_popup(element) {
564
+
565
+ var info = [], w, h;
566
+ //var section = $(element).closest('tr').prevAll('.crb-scan-section:first');
567
+ var section = cerber_get_section(element);
568
+ var section_type = section.data('setype');
569
+ var itype = cerber_get_itype(element);
570
+
571
+ if (itype === 18) {
572
+ var section_name = section.data('section-name');
573
+ cerber_popup_show($(element).text(), cerber_get_issue_explain(section_name));
574
+ return;
575
+ }
576
+
577
+ if (section_type === 20 && itype < 30) {
578
+ info.push('<p>' + 'This file contains executable code and may contain obfuscated malware.' + '</p><p>' + 'If this file is a part of a theme or a plugin, it must be located in the theme or the plugin folder. No exception, no excuses.' + '</p>');
579
+ }
580
+
581
+ // Some data after file inspection?
582
+
583
+ var d = cerber_xdata_info(section.prop('id'), $(element).data('idx'));
584
+ if (d.length) {
585
+ w = window.innerWidth * 0.4;
586
+ h = window.innerHeight * 0.6;
587
+ info.push(d);
588
+ }
589
+
590
+ if (section_type > 20) {
591
+ info.push(cerber_get_issue_explain());
592
+ }
593
+
594
+ cerber_popup_show($(element).text(), info, w, h);
595
+
596
+ }
597
+
598
+ function cerber_xdata_info(section_id, idx) {
599
+
600
+ if (!section_id || typeof idx === 'undefined') {
601
+ return '';
602
+ }
603
+
604
+ if (typeof scanner_data.issues[section_id].issues[idx].details === 'undefined') {
605
+ return '';
606
+ }
607
+
608
+ var xdata = scanner_data.issues[section_id].issues[idx].details.xdata;
609
+ if (!xdata.length) {
610
+ return '';
611
+ }
612
+
613
+ if (!crb_scan_strings) {
614
+ cerber_load_strings();
615
+ return '';
616
+ }
617
+
618
+ var tokens = [], regs = [], info = '', ls = [];
619
+
620
+ $.each(xdata, function (index, e) {
621
+ if (e[0] === 1) {
622
+ tokens.push('<code>Line ' + e[2] + ': <b>' + e[1] + '</b></code><p>' + crb_scan_strings[e[0]][e[1]][1] + '</p>');
623
+ }
624
+ else {
625
+ ls = [];
626
+ $.each(e[2], function (index, s) {
627
+ ls.push('<code>Line ' + s[2] + ': <b>' + s[0] + '</b></code>');
628
+ });
629
+ regs.push(ls.join('</br>') + '<p>' + crb_scan_strings[e[0]][e[1]] + ' (' + e[1] + ')' + '</p>');
630
+ }
631
+ });
632
+
633
+ if (tokens.length) {
634
+ info += '<p><b>Suspicious code instruction detected</b></p><div>' + tokens.join('</div><div>') + '</div>';
635
+ }
636
+ if (regs.length) {
637
+ info += '<p><b>Suspicious code signatures detected</b></p><div>' + regs.join('</div><div>') + '</div>';
638
+ }
639
+
640
+ return info;
641
+ }
642
+
643
+ // Explainer for end-user
644
+ function cerber_get_issue_explain(subject) {
645
+ if (typeof subject === 'undefined' || !subject) {
646
+ subject = 'WordPress';
647
+ }
648
+ var a = 'The scanner recognizes this file as "ownerless" or "not bundled" because it does not belong to any known part of the website and should not be there.';
649
+ var text = 'It may remain after upgrading to a newer version of <b>%s</b>.';
650
+ var b = 'It also may be a piece of unknown obfuscated malware.';
651
+ var d = 'In some rare case it might be a part of a custom-made (bespoke) software.';
652
+ return '<p>' + a + '</p><p>' + text.replace('%s', subject) + ' ' + b + ' ' + d + '</p>';
653
+ }
654
+
655
+ function cerber_get_itype(e) {
656
+ return $(e).closest('tr').data('itype');
657
+ }
658
+
659
+ function cerber_get_section(e) {
660
+ return $(e).closest('tr').prevAll('.crb-scan-section:first');
661
+ }
662
+
663
+
664
+ function cerber_load_strings() {
665
+ $.get(ajaxurl, {
666
+ action: 'cerber_get_strings',
667
+ ajax_nonce: crb_ajax_nonce,
668
+ },
669
+ function (server_response) {
670
+ crb_scan_strings = $.parseJSON(server_response);
671
+ if (!crb_scan_strings.complete) {
672
+ alert('Unable to load strings due to a server error.');
673
+ }
674
+ }).fail(function () {
675
+ alert('Unable to load strings due to a server error.');
676
+ });
677
+ }
678
+
679
+ // Uploader
680
+
681
+ var crb_upload_form = $('#crb-ref-upload-dialog').find('form');
682
+ var crb_upload_form_ul = $(crb_upload_form).find('ul');
683
+
684
+ crb_upload_form.submit(function (event) {
685
+
686
+ var formData = new FormData($(this)[0]);
687
+ formData.append('action', 'cerber_ref_upload');
688
+ formData.append('ajax_nonce', crb_ajax_nonce);
689
+
690
+ crb_upload_form.find('input').prop('disabled', true);
691
+ crb_upload_form.find('input').hide();
692
+ //crb_upload_form_ul.find('li').not(':nth-child(-n+2)').hide();
693
+ crb_upload_form_ul.children().hide();
694
+ crb_upload_form_ul.find('li:nth-child(1)').show();
695
+ //ref_file_name = $(this).find('input[name="refile"]').val();
696
+
697
+ $.ajax({
698
+ url: ajaxurl,
699
+ type: 'POST',
700
+ enctype: 'multipart/form-data',
701
+ data: formData,
702
+ contentType: false,
703
+ processData: false,
704
+ dataType: 'json'
705
+ }).done(crb_ref_step2);
706
+
707
+ crb_upload_form.trigger('reset');
708
+ event.preventDefault();
709
+ });
710
+
711
+ function crb_ref_step2(server_response) {
712
+ if (!server_response.error) {
713
+ crb_upload_form_ul.find('li:nth-child(2)').show();
714
+
715
+ $.post(ajaxurl, {
716
+ action: 'cerber_ref_upload',
717
+ ajax_nonce: crb_ajax_nonce,
718
+ },
719
+ crb_ref_done,
720
+ 'json');
721
+ }
722
+ else {
723
+ crb_ref_done(server_response);
724
+ }
725
+ }
726
+
727
+ function crb_ref_done(server_response) {
728
+ crb_ref_errors(server_response);
729
+ if (!server_response.error) {
730
+ tb_remove();
731
+ }
732
+ crb_enable_ref_form();
733
+ }
734
+
735
+ function crb_ref_errors(response) {
736
+ if (response.error) {
737
+ crb_upload_form_ul.append('<li>Error: ' + response.error + '</li>');
738
+ crb_upload_form_ul.append('<li style="color: red;">Process aborted</li>');
739
+ }
740
+ }
741
+
742
+ function crb_enable_ref_form() {
743
+ crb_upload_form.find('input').prop('disabled', false);
744
+ crb_upload_form.find('input').show();
745
+ crb_upload_form.trigger('reset');
746
+ }
747
+
748
+ crb_upload_form.find('input').change(function () {
749
+ crb_upload_form_ul.children().hide();
750
+ });
751
+
752
+
753
+ // File viewer
754
+
755
+ crb_scan_browser.on('click', 'td', function (event) {
756
+ if (typeof $(this).data('file-name') === "undefined" || $(this).data('file-name') === '') {
757
+ return;
758
+ }
759
+ var file_name = $(this).data('file-name');
760
+
761
+ var view_width = window.innerWidth * 0.8;
762
+ var view_height = window.innerHeight * 0.8;
763
+
764
+ tb_show("File: " + file_name, ajaxurl + '?action=cerber_view_file&ajax_nonce=' + crb_ajax_nonce + '&file=' + file_name + '&scan_id=' + window.crb_scan_id + '&sheight=' + view_height + '&width=' + view_width + '&height=' + view_height + '&TB_iframe=1');
765
+ $('#TB_closeWindowButton').blur();
766
+
767
+ event.preventDefault();
768
+ });
769
+
770
+
771
+
772
+
773
+ // Simple popups based on WP thickbox
774
+
775
+ function cerber_popup_show(title, message, w , h) {
776
+ if (typeof w === 'undefined') {
777
+ w = 420; //600;
778
+ }
779
+ if (typeof h === 'undefined') {
780
+ h = 320; // 350;
781
+ }
782
+
783
+ if (typeof message !== 'string'){
784
+ message = message.filter(function (e) {
785
+ return (e !== 'undefined' && e !== null && e !== '');
786
+ });
787
+ message = '<div>' + message.join('</div><div>') + '</div>';
788
+ }
789
+
790
+ if (message.length > 450) {
791
+ w = window.innerWidth * 0.4;
792
+ h = window.innerHeight * 0.6;
793
+ if (w < 400) w = window.innerWidth * 0.9;
794
+ if (h < 300) h = window.innerHeight * 0.9;
795
+ }
796
+
797
+ var max = h - 70;
798
+
799
+ var button = '<p style="text-align: center; position: absolute; bottom: 20px; left:0; right:0; margin: auto;"><input type="button" value=" OK " class="button button-primary"></p>';
800
+
801
+ var popup = cerber_init_popup('crb-popup-box');
802
+ popup.html('<div class="crb-popup-inner" style="max-height: ' + max + 'px;">' + message + '</div>' + button);
803
+ popup.find('input[type=button]').on('click', function (event) {
804
+ //e.preventDefault();
805
+ cerber_popup_close();
806
+ });
807
+
808
+ tb_show(title, '#TB_inline?width=' + w + '&height=' + h + '&inlineId=crb-popup-box');
809
+ $('#TB_closeWindowButton').blur();
810
+ }
811
+
812
+ /*
813
+ function cerber_dialog_show(title, message, control_id) {
814
+ var button = '<p style="text-align: center; position: absolute; bottom: 20px; left:0; right:0; margin: auto;"><input type="button" id="' + control_id + '" value=" Yes " class="button button-primary"> <input type="button" value=" Cancel " class="button button-primary"></p>';
815
+
816
+ var popup = cerber_init_popup('crb-popup-dialog');
817
+ popup.html('<div style="margin-top: 1em; max-height: 280px; overflow: auto;">' + message + '</div>' + button);
818
+ popup.find('input[type=button]').on('click', function (event) {
819
+ //e.preventDefault();
820
+ cerber_popup_close();
821
+ });
822
+
823
+ tb_show(title, '#TB_inline?width=500&height=150&inlineId=crb-popup-dialog');
824
+ $('#TB_closeWindowButton').blur();
825
+ }*/
826
+
827
+ function cerber_init_popup(id) {
828
+ var body = $("body");
829
+ var popup = body.find('#' + id);
830
+ if (popup.length) {
831
+ return popup;
832
+ }
833
+ body.append('<div id="' + id + '" style="display: none;"></div>');
834
+ return body.find('#' + id);
835
+ }
836
+
837
+ function cerber_popup_close() {
838
+ tb_remove();
839
+ }
840
+
841
+ });
assets/sh/scripts/shBrushPhp.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ ;(function()
18
+ {
19
+ // CommonJS
20
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
+
22
+ function Brush()
23
+ {
24
+ var funcs = 'abs acos acosh addcslashes addslashes ' +
25
+ 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
26
+ 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
27
+ 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
28
+ 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
29
+ 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
30
+ 'array_push array_rand array_reduce array_reverse array_search array_shift '+
31
+ 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
32
+ 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
33
+ 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
34
+ 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
35
+ 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
36
+ 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
37
+ 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
38
+ 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
39
+ 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
40
+ 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
41
+ 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
42
+ 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
43
+ 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
44
+ 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
45
+ 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
46
+ 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
47
+ 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
48
+ 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
49
+ 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
50
+ 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
51
+ 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
52
+ 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
53
+ 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
54
+ 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
55
+ 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
56
+ 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
57
+ 'strtoupper strtr strval substr substr_compare';
58
+
59
+ var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
60
+ 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
61
+ 'function include include_once global goto if implements interface instanceof namespace new ' +
62
+ 'old_function or private protected public return require require_once static switch ' +
63
+ 'throw try use var while xor ';
64
+
65
+ var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
66
+
67
+ this.regexList = [
68
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
69
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
70
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
71
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
72
+ { regex: /\$\w+/g, css: 'variable' }, // variables
73
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
74
+ { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
75
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
76
+ ];
77
+
78
+ this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
79
+ };
80
+
81
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
82
+ Brush.aliases = ['php'];
83
+
84
+ SyntaxHighlighter.brushes.Php = Brush;
85
+
86
+ // CommonJS
87
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
88
+ })();
assets/sh/scripts/shCore.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a<f.L;a++)I(f[a]===e)H a;H-1}M=6(f,e){K a=[],b=M.1B,c=0,d,h;I(M.1R(f)){I(e!==1d)1S 3m("2a\'t 5r 5I 5F 5B 5C 15 5E 5p");H r(f)}I(v)1S 2U("2a\'t W 3l M 59 5m 5g 5x 5i");e=e||"";O(d={2N:11,19:[],2K:6(g){H e.1i(g)>-1},3d:6(g){e+=g}};c<f.L;)I(h=B(f,c,b,d)){a.U(h.3k);c+=h.1C[0].L||1}Y I(h=n.X.W(z[b],f.1a(c))){a.U(h[0]);c+=h[0].L}Y{h=f.3a(c);I(h==="[")b=M.2I;Y I(h==="]")b=M.1B;a.U(h);c++}a=15(a.1K(""),n.Q.W(e,w,""));a.1w={1m:f,19:d.2N?d.19:N};H a};M.3v="1.5.0";M.2I=1;M.1B=2;K C=/\\$(?:(\\d\\d?|[$&`\'])|{([$\\w]+)})/g,w=/[^5h]+|([\\s\\S])(?=[\\s\\S]*\\1)/g,A=/^(?:[?*+]|{\\d+(?:,\\d*)?})\\??/,v=11,u=[],n={X:15.Z.X,1A:15.Z.1A,1C:1r.Z.1C,Q:1r.Z.Q,1e:1r.Z.1e},x=n.X.W(/()??/,"")[1]===1d,D=6(){K f=/^/g;n.1A.W(f,"");H!f.12}(),y=6(){K f=/x/g;n.Q.W("x",f,"");H!f.12}(),E=15.Z.3n!==1d,z={};z[M.2I]=/^(?:\\\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S]))/;z[M.1B]=/^(?:\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\\d*|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S])|\\(\\?[:=!]|[?*+]\\?|{\\d+(?:,\\d*)?}\\??)/;M.1h=6(f,e,a,b){u.U({2q:r(f,"g"+(E?"y":"")),2b:e,3r:a||M.1B,2p:b||N})};M.2n=6(f,e){K a=f+"/"+(e||"");H M.2n[a]||(M.2n[a]=M(f,e))};M.3c=6(f){H r(f,"g")};M.5l=6(f){H f.Q(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,"\\\\$&")};M.5e=6(f,e,a,b){e=r(e,"g"+(b&&E?"y":""));e.12=a=a||0;f=e.X(f);H b?f&&f.P===a?f:N:f};M.3q=6(){M.1h=6(){1S 2U("2a\'t 55 1h 54 3q")}};M.1R=6(f){H 53.Z.1q.W(f)==="[2m 15]"};M.3p=6(f,e,a,b){O(K c=r(e,"g"),d=-1,h;h=c.X(f);){a.W(b,h,++d,f,c);c.12===h.P&&c.12++}I(e.1J)e.12=0};M.57=6(f,e){H 6 a(b,c){K d=e[c].1I?e[c]:{1I:e[c]},h=r(d.1I,"g"),g=[],i;O(i=0;i<b.L;i++)M.3p(b[i],h,6(k){g.U(d.3j?k[d.3j]||"":k[0])});H c===e.L-1||!g.L?g:a(g,c+1)}([f],0)};15.Z.1p=6(f,e){H J.X(e[0])};15.Z.W=6(f,e){H J.X(e)};15.Z.X=6(f){K e=n.X.1p(J,14),a;I(e){I(!x&&e.L>1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;b<e.L;b++)I(a=J.1w.19[b-1])e[a]=e[b];!D&&J.1J&&!e[0].L&&J.12>e.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;d<b.L;d++)I(b[d])14[0][b[d]]=14[d+1]}I(a&&f.1J)f.12=14[14.L-2]+14[0].L;H e.1p(N,14)});Y{c=J+"";c=n.Q.W(c,f,6(){K d=14;H n.Q.W(e,C,6(h,g,i){I(g)5b(g){24"$":H"$";24"&":H d[0];24"`":H d[d.L-1].1a(0,d[d.L-2]);24"\'":H d[d.L-1].1a(d[d.L-2]+d[0].L);5a:i="";g=+g;I(!g)H h;O(;g>d.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P<a.L&&3b.Z.U.1p(b,d.1a(1));h=d[0].L;c=f.12;I(b.L>=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a<d.L&&i==N;a++)i=p(d[a],b,c);H i}6 C(a,b){K c={},d;O(d 2g a)c[d]=a[d];O(d 2g b)c[d]=b[d];H c}6 w(a,b,c,d){6 h(g){g=g||1P.5y;I(!g.1F){g.1F=g.52;g.3N=6(){J.5w=11}}c.W(d||1P,g)}a.3g?a.3g("4U"+b,h):a.4y(b,h,11)}6 A(a,b){K c=e.1Y.2j,d=N;I(c==N){c={};O(K h 2g e.1U){K g=e.1U[h];d=g.4x;I(d!=N){g.1V=h.4w();O(g=0;g<d.L;g++)c[d[g]]=h}}e.1Y.2j=c}d=e.1U[c[a]];d==N&&b!=11&&1P.1X(e.13.1x.1X+(e.13.1x.3E+a));H d}6 v(a,b){O(K c=a.1e("\\n"),d=0;d<c.L;d++)c[d]=b(c[d],d);H c.1K("\\n")}6 u(a,b){I(a==N||a.L==0||a=="\\n")H a;a=a.Q(/</g,"&1y;");a=a.Q(/ {2,}/g,6(c){O(K d="",h=0;h<c.L-1;h++)d+=e.13.1W;H d+" "});I(b!=N)a=v(a,6(c){I(c.L==0)H"";K d="";c=c.Q(/^(&2s;| )+/,6(h){d=h;H""});I(c.L==0)H d;H d+\'<17 1g="\'+b+\'">\'+c+"</17>"});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.P<b.P)H-1;Y I(a.P>b.P)H 1;Y I(a.L<b.L)H-1;Y I(a.L>b.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'<a 2h="\'+c+\'">\'+c+"</a>"+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<a.L;c++)a[c].3s=="20"&&b.U(a[c]);H b}6 f(a){a=a.1F;K b=p(a,".20",R);a=p(a,".3O",R);K c=1E.4i("3t");I(!(!a||!b||p(a,"3t"))){B(b.1c);r(b,"1m");O(K d=a.3G,h=[],g=0;g<d.L;g++)h.U(d[g].4z||d[g].4A);h=h.1K("\\r");c.39(1E.4D(h));a.39(c);c.2C();c.4C();w(c,"4u",6(){c.2G.4E(c);b.1l=b.1l.Q("1m","")})}}I(1j 3F!="1d"&&1j M=="1d")M=3F("M").M;K e={2v:{"1g-27":"","2i-1s":1,"2z-1s-2t":11,1M:N,1t:N,"42-45":R,"43-22":4,1u:R,16:R,"3V-17":R,2l:11,"41-40":R,2k:11,"1z-1k":11},13:{1W:"&2s;",2M:R,46:11,44:11,34:"4n",1x:{21:"4o 1m",2P:"?",1X:"1v\\n\\n",3E:"4r\'t 4t 1D O: ",4g:"4m 4B\'t 51 O 1z-1k 4F: ",37:\'<!4T 1z 4S "-//4V//3H 4W 1.0 4Z//4Y" "1Z://2y.3L.3K/4X/3I/3H/3I-4P.4J"><1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v</1t></3J><3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;"><T 1L="2O-3D:3C;3w-32:1.6z;"><T 1L="25-22:6A-6E;">1v</T><T 1L="25-22:.6C;3w-6B:6R;"><T>3v 3.0.76 (72 73 3x)</T><T><a 2h="1Z://3u.2w/1v" 1F="38" 1L="2f:#3y">1Z://3u.2w/1v</a></T><T>70 17 6U 71.</T><T>6T 6X-3x 6Y 6D.</T></T><T>6t 61 60 J 1k, 5Z <a 2h="6u://2y.62.2w/63-66/65?64=5X-5W&5P=5O" 1L="2f:#3y">5R</a> 5V <2R/>5U 5T 5S!</T></T></3B></1z>\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'<T 1g="16">\',d=e.16.2x,h=d.2X,g=0;g<h.L;g++)c+=(d[h[g]].1H||b)(a,h[g]);c+="</T>";H c},2o:6(a,b,c){H\'<2W><a 2h="#" 1g="6e 6h\'+b+" "+b+\'">\'+c+"</a></2W>"},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h<c.L;h++)d.U(c[h]);c=d}c=c;d=[];I(e.13.2M)c=c.1O(z());I(c.L===0)H d;O(h=0;h<c.L;h++){O(K g=c[h],i=a,k=c[h].1l,j=3W 0,l={},m=1f M("^\\\\[(?<2V>(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g<c.L;g++){b=c[g];K i=b.1F,k=b.1n,j=k.1D,l;I(j!=N){I(k["1z-1k"]=="R"||e.2v["1z-1k"]==R){d=1f e.4l(j);j="4O"}Y I(d=A(j))d=1f d;Y 6H;l=i.3X;I(h.2M){l=l;K m=x(l),s=11;I(m.1i("<![6G[")==0){m=m.4h(9);s=R}K o=m.L;I(m.1i("]]\\>")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;m<j.L;m++)j[m].P+=l}K c=A(a),d,h=1f e.1U.5Y,g=J,i="2F 1H 2Q".1e(" ");I(c!=N){d=1f c;O(K k=0;k<i.L;k++)(6(){K j=i[k];g[j]=6(){H h[j].1p(h,14)}})();d.28==N?1P.1X(e.13.1x.1X+(e.13.1x.4g+a)):h.2J.U({1I:d.28.17,2D:6(j){O(K l=j.17,m=[],s=d.2J,o=j.P+j.18.L,F=d.28,q,G=0;G<s.L;G++){q=y(l,s[G]);b(q,o);m=m.1O(q)}I(F.18!=N&&j.18!=N){q=y(j.18,F.18);b(q,j.P);m=m.1O(q)}I(F.1b!=N&&j.1b!=N){q=y(j.1b,F.1b);b(q,j.P+j[0].5Q(j.1b));m=m.1O(q)}O(j=0;j<m.L;j++)m[j].1V=c.1V;H m}})}};e.4j=6(){};e.4j.Z={V:6(a,b){K c=J.1n[a];c=c==N?b:c;K d={"R":R,"11":11}[c];H d==N?c:d},3Y:6(a){H 1E.4i(a)},4c:6(a,b){K c=[];I(a!=N)O(K d=0;d<a.L;d++)I(1j a[d]=="2m")c=c.1O(y(b,a[d]));H J.4e(c.6b(D))},4e:6(a){O(K b=0;b<a.L;b++)I(a[b]!==N)O(K c=a[b],d=c.P+c.L,h=b+1;h<a.L&&a[b]!==N;h++){K g=a[h];I(g!==N)I(g.P>d)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P<d)a[h]=N}H a},4d:6(a){K b=[],c=2u(J.V("2i-1s"));v(a,6(d,h){b.U(h+c)});H b},3U:6(a){K b=J.V("1M",[]);I(1j b!="2m"&&b.U==N)b=[b];a:{a=a.1q();K c=3W 0;O(c=c=1Q.6c(c||0,0);c<b.L;c++)I(b[c]==a){b=c;1N a}b=-1}H b!=-1},2r:6(a,b,c){a=["1s","6i"+b,"P"+a,"6r"+(b%2==0?1:2).1q()];J.3U(b)&&a.U("67");b==0&&a.U("1N");H\'<T 1g="\'+a.1K(" ")+\'">\'+c+"</T>"},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i<d;i++){K k=b?b[i]:h+i,j;I(k==0)j=e.13.1W;Y{j=g;O(K l=k.1q();l.L<j;)l="0"+l;j=l}a=j;c+=J.2r(i,k,a)}H c},49:6(a,b){a=x(a);K c=a.1e("\\n");J.V("2z-1s-2t");K d=2u(J.V("2i-1s"));a="";O(K h=J.V("1D"),g=0;g<c.L;g++){K i=c[g],k=/^(&2s;|\\s)+/.X(i),j=N,l=b?b[g]:d+g;I(k!=N){j=k[0].1q();i=i.1o(j.L);j=j.Q(" ",e.13.1W)}i=x(i);I(i.L==0)i=e.13.1W;a+=J.2r(g,l,(j!=N?\'<17 1g="\'+h+\' 5N">\'+j+"</17>":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"</4a>":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i<b.L;i++){K k=b[i],j;I(!(k===N||k.L===0)){j=c(k);h+=u(a.1o(d,k.P-d),j+"48")+u(k.1T,j+k.23);d=k.P+k.L+(k.75||0)}}h+=u(a.1o(d),c()+"48");H h},1H:6(a){K b="",c=["20"],d;I(J.V("2k")==R)J.1n.16=J.1n.1u=11;1l="20";J.V("2l")==R&&c.U("47");I((1u=J.V("1u"))==11)c.U("6S");c.U(J.V("1g-27"));c.U(J.V("1D"));a=a.Q(/^[ ]*[\\n]+|[\\n]*[ ]*$/g,"").Q(/\\r/g," ");b=J.V("43-22");I(J.V("42-45")==R)a=n(a,b);Y{O(K h="",g=0;g<b;g++)h+=" ";a=a.Q(/\\t/g,h)}a=a;a:{b=a=a;h=/<2R\\s*\\/?>|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i<b.L&&g>0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i<b.L;i++)b[i]=b[i].1o(g);a=b.1K("\\n")}I(1u)d=J.4d(a);b=J.4c(J.2J,a);b=J.4b(a,b);b=J.49(b,d);I(J.V("41-40"))b=E(b);1j 2H!="1d"&&2H.3S&&2H.3S.1C(/5s/)&&c.U("5t");H b=\'<T 1c="\'+t(J.1c)+\'" 1g="\'+c.1K(" ")+\'">\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"</2d>":"")+\'<2d 1g="17"><T 1g="3O">\'+b+"</T></2d></3P></3T></3Z></T>"},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{}))
assets/sh/styles/shCore.css ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ .syntaxhighlighter a,
18
+ .syntaxhighlighter div,
19
+ .syntaxhighlighter code,
20
+ .syntaxhighlighter table,
21
+ .syntaxhighlighter table td,
22
+ .syntaxhighlighter table tr,
23
+ .syntaxhighlighter table tbody,
24
+ .syntaxhighlighter table thead,
25
+ .syntaxhighlighter table caption,
26
+ .syntaxhighlighter textarea {
27
+ -moz-border-radius: 0 0 0 0 !important;
28
+ -webkit-border-radius: 0 0 0 0 !important;
29
+ background: none !important;
30
+ border: 0 !important;
31
+ bottom: auto !important;
32
+ float: none !important;
33
+ height: auto !important;
34
+ left: auto !important;
35
+ line-height: 1.1em !important;
36
+ margin: 0 !important;
37
+ outline: 0 !important;
38
+ overflow: visible !important;
39
+ padding: 0 !important;
40
+ position: static !important;
41
+ right: auto !important;
42
+ text-align: left !important;
43
+ top: auto !important;
44
+ vertical-align: baseline !important;
45
+ width: auto !important;
46
+ box-sizing: content-box !important;
47
+ font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
48
+ font-weight: normal !important;
49
+ font-style: normal !important;
50
+ font-size: 1em !important;
51
+ min-height: inherit !important;
52
+ min-height: auto !important;
53
+ }
54
+
55
+ .syntaxhighlighter {
56
+ width: 100% !important;
57
+ margin: 1em 0 1em 0 !important;
58
+ position: relative !important;
59
+ overflow: auto !important;
60
+ font-size: 1em !important;
61
+ }
62
+ .syntaxhighlighter.source {
63
+ overflow: hidden !important;
64
+ }
65
+ .syntaxhighlighter .bold {
66
+ font-weight: bold !important;
67
+ }
68
+ .syntaxhighlighter .italic {
69
+ font-style: italic !important;
70
+ }
71
+ .syntaxhighlighter .line {
72
+ white-space: pre !important;
73
+ }
74
+ .syntaxhighlighter table {
75
+ width: 100% !important;
76
+ }
77
+ .syntaxhighlighter table caption {
78
+ text-align: left !important;
79
+ padding: .5em 0 0.5em 1em !important;
80
+ }
81
+ .syntaxhighlighter table td.code {
82
+ width: 100% !important;
83
+ }
84
+ .syntaxhighlighter table td.code .container {
85
+ position: relative !important;
86
+ }
87
+ .syntaxhighlighter table td.code .container textarea {
88
+ box-sizing: border-box !important;
89
+ position: absolute !important;
90
+ left: 0 !important;
91
+ top: 0 !important;
92
+ width: 100% !important;
93
+ height: 100% !important;
94
+ border: none !important;
95
+ background: white !important;
96
+ padding-left: 1em !important;
97
+ overflow: hidden !important;
98
+ white-space: pre !important;
99
+ }
100
+ .syntaxhighlighter table td.gutter .line {
101
+ text-align: right !important;
102
+ padding: 0 0.5em 0 1em !important;
103
+ }
104
+ .syntaxhighlighter table td.code .line {
105
+ padding: 0 1em !important;
106
+ }
107
+ .syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
108
+ padding-left: 0em !important;
109
+ }
110
+ .syntaxhighlighter.show {
111
+ display: block !important;
112
+ }
113
+ .syntaxhighlighter.collapsed table {
114
+ display: none !important;
115
+ }
116
+ .syntaxhighlighter.collapsed .toolbar {
117
+ padding: 0.1em 0.8em 0em 0.8em !important;
118
+ font-size: 1em !important;
119
+ position: static !important;
120
+ width: auto !important;
121
+ height: auto !important;
122
+ }
123
+ .syntaxhighlighter.collapsed .toolbar span {
124
+ display: inline !important;
125
+ margin-right: 1em !important;
126
+ }
127
+ .syntaxhighlighter.collapsed .toolbar span a {
128
+ padding: 0 !important;
129
+ display: none !important;
130
+ }
131
+ .syntaxhighlighter.collapsed .toolbar span a.expandSource {
132
+ display: inline !important;
133
+ }
134
+ .syntaxhighlighter .toolbar {
135
+ position: absolute !important;
136
+ right: 1px !important;
137
+ top: 1px !important;
138
+ width: 11px !important;
139
+ height: 11px !important;
140
+ font-size: 10px !important;
141
+ z-index: 10 !important;
142
+ }
143
+ .syntaxhighlighter .toolbar span.title {
144
+ display: inline !important;
145
+ }
146
+ .syntaxhighlighter .toolbar a {
147
+ display: block !important;
148
+ text-align: center !important;
149
+ text-decoration: none !important;
150
+ padding-top: 1px !important;
151
+ }
152
+ .syntaxhighlighter .toolbar a.expandSource {
153
+ display: none !important;
154
+ }
155
+ .syntaxhighlighter.ie {
156
+ font-size: .9em !important;
157
+ padding: 1px 0 1px 0 !important;
158
+ }
159
+ .syntaxhighlighter.ie .toolbar {
160
+ line-height: 8px !important;
161
+ }
162
+ .syntaxhighlighter.ie .toolbar a {
163
+ padding-top: 0px !important;
164
+ }
165
+ .syntaxhighlighter.printing .line.alt1 .content,
166
+ .syntaxhighlighter.printing .line.alt2 .content,
167
+ .syntaxhighlighter.printing .line.highlighted .number,
168
+ .syntaxhighlighter.printing .line.highlighted.alt1 .content,
169
+ .syntaxhighlighter.printing .line.highlighted.alt2 .content {
170
+ background: none !important;
171
+ }
172
+ .syntaxhighlighter.printing .line .number {
173
+ color: #bbbbbb !important;
174
+ }
175
+ .syntaxhighlighter.printing .line .content {
176
+ color: black !important;
177
+ }
178
+ .syntaxhighlighter.printing .toolbar {
179
+ display: none !important;
180
+ }
181
+ .syntaxhighlighter.printing a {
182
+ text-decoration: none !important;
183
+ }
184
+ .syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
185
+ color: black !important;
186
+ }
187
+ .syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
188
+ color: #008200 !important;
189
+ }
190
+ .syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
191
+ color: blue !important;
192
+ }
193
+ .syntaxhighlighter.printing .keyword {
194
+ color: #006699 !important;
195
+ font-weight: bold !important;
196
+ }
197
+ .syntaxhighlighter.printing .preprocessor {
198
+ color: gray !important;
199
+ }
200
+ .syntaxhighlighter.printing .variable {
201
+ color: #aa7700 !important;
202
+ }
203
+ .syntaxhighlighter.printing .value {
204
+ color: #009900 !important;
205
+ }
206
+ .syntaxhighlighter.printing .functions {
207
+ color: #ff1493 !important;
208
+ }
209
+ .syntaxhighlighter.printing .constants {
210
+ color: #0066cc !important;
211
+ }
212
+ .syntaxhighlighter.printing .script {
213
+ font-weight: bold !important;
214
+ }
215
+ .syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
216
+ color: gray !important;
217
+ }
218
+ .syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
219
+ color: #ff1493 !important;
220
+ }
221
+ .syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
222
+ color: red !important;
223
+ }
224
+ .syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
225
+ color: black !important;
226
+ }
assets/sh/styles/shThemeDefault.css ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ .syntaxhighlighter {
18
+ background-color: white !important;
19
+ }
20
+ .syntaxhighlighter .line.alt1 {
21
+ background-color: white !important;
22
+ }
23
+ .syntaxhighlighter .line.alt2 {
24
+ background-color: white !important;
25
+ }
26
+ .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
27
+ background-color: #e0e0e0 !important;
28
+ }
29
+ .syntaxhighlighter .line.highlighted.number {
30
+ color: black !important;
31
+ }
32
+ .syntaxhighlighter table caption {
33
+ color: black !important;
34
+ }
35
+ .syntaxhighlighter .gutter {
36
+ color: #afafaf !important;
37
+ }
38
+ .syntaxhighlighter .gutter .line {
39
+ border-right: 3px solid #6ce26c !important;
40
+ }
41
+ .syntaxhighlighter .gutter .line.highlighted {
42
+ background-color: #6ce26c !important;
43
+ color: white !important;
44
+ }
45
+ .syntaxhighlighter.printing .line .content {
46
+ border: none !important;
47
+ }
48
+ .syntaxhighlighter.collapsed {
49
+ overflow: visible !important;
50
+ }
51
+ .syntaxhighlighter.collapsed .toolbar {
52
+ color: blue !important;
53
+ background: white !important;
54
+ border: 1px solid #6ce26c !important;
55
+ }
56
+ .syntaxhighlighter.collapsed .toolbar a {
57
+ color: blue !important;
58
+ }
59
+ .syntaxhighlighter.collapsed .toolbar a:hover {
60
+ color: red !important;
61
+ }
62
+ .syntaxhighlighter .toolbar {
63
+ color: white !important;
64
+ background: #6ce26c !important;
65
+ border: none !important;
66
+ }
67
+ .syntaxhighlighter .toolbar a {
68
+ color: white !important;
69
+ }
70
+ .syntaxhighlighter .toolbar a:hover {
71
+ color: black !important;
72
+ }
73
+ .syntaxhighlighter .plain, .syntaxhighlighter .plain a {
74
+ color: black !important;
75
+ }
76
+ .syntaxhighlighter .comments, .syntaxhighlighter .comments a {
77
+ color: #008200 !important;
78
+ }
79
+ .syntaxhighlighter .string, .syntaxhighlighter .string a {
80
+ color: blue !important;
81
+ }
82
+ .syntaxhighlighter .keyword {
83
+ color: #006699 !important;
84
+ }
85
+ .syntaxhighlighter .preprocessor {
86
+ color: gray !important;
87
+ }
88
+ .syntaxhighlighter .variable {
89
+ color: #aa7700 !important;
90
+ }
91
+ .syntaxhighlighter .value {
92
+ color: #009900 !important;
93
+ }
94
+ .syntaxhighlighter .functions {
95
+ color: #ff1493 !important;
96
+ }
97
+ .syntaxhighlighter .constants {
98
+ color: #0066cc !important;
99
+ }
100
+ .syntaxhighlighter .script {
101
+ font-weight: bold !important;
102
+ color: #006699 !important;
103
+ background-color: none !important;
104
+ }
105
+ .syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
106
+ color: gray !important;
107
+ }
108
+ .syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
109
+ color: #ff1493 !important;
110
+ }
111
+ .syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
112
+ color: red !important;
113
+ }
114
+
115
+ .syntaxhighlighter .keyword {
116
+ font-weight: bold !important;
117
+ }
cerber-lab.php CHANGED
@@ -458,7 +458,7 @@ function lab_status(){
458
  $nodes = lab_get_nodes();
459
  if (empty($nodes['nodes'])) return $ret . '<p>No information. No request has been made yet.</p>';
460
 
461
- $ret .= '<table id="lab-status"><tr><th>Node</th><th>Processing time</th><th>Operational status</th><th>Info</th><th>IP address</th><th>Last request</th><th>Protocol used</th></tr>';
462
  foreach ( $nodes['nodes'] as $id => $node ) {
463
  $delay = round(1000 * $node['last'][0]) . ' ms';
464
  $ago = cerber_ago_time($node['last'][3]);
@@ -472,7 +472,13 @@ function lab_status(){
472
  $status = 'Down';
473
  $delay = 'Unknown';
474
  }
475
- $ret .= '<tr class="'.$class.'"><td>'.$id.'</td><td>'.$delay.'</td><td>'.$status.'</td><td>'.$node['last'][2].'</td><td>'.$node['last'][5].'</td><td>'.$ago.'</td><td>'.$node['last'][4].'</td><td>';
 
 
 
 
 
 
476
  }
477
  $ret .= '</table>';
478
 
@@ -916,6 +922,11 @@ function lab_is_cloud_request() {
916
  return $ret;
917
  }
918
 
 
 
 
 
 
919
  $node_id = absint( $_GET['cerber_cloud_nid'] );
920
  if ( ! $node_id ) {
921
  $node_id = absint( $_POST['cerber_cloud_nid'] );
458
  $nodes = lab_get_nodes();
459
  if (empty($nodes['nodes'])) return $ret . '<p>No information. No request has been made yet.</p>';
460
 
461
+ $ret .= '<table id="lab-status"><tr><th>Node</th><th>Processing time</th><th>Operational status</th><th>Info</th><th>IP address</th><th>Location</th><th>Last request</th><th>Protocol</th></tr>';
462
  foreach ( $nodes['nodes'] as $id => $node ) {
463
  $delay = round(1000 * $node['last'][0]) . ' ms';
464
  $ago = cerber_ago_time($node['last'][3]);
472
  $status = 'Down';
473
  $delay = 'Unknown';
474
  }
475
+ if ( $country = lab_get_country( $node['last'][5], false ) ) {
476
+ $country = cerber_country_name( $country );
477
+ }
478
+ else {
479
+ $country = '';
480
+ }
481
+ $ret .= '<tr class="'.$class.'"><td>'.$id.'</td><td>'.$delay.'</td><td>'.$status.'</td><td>'.$node['last'][2].'</td><td>'.$node['last'][5].'</td><td>'.$country.'</td><td>'.$ago.'</td><td>'.$node['last'][4].'</td><td>';
482
  }
483
  $ret .= '</table>';
484
 
922
  return $ret;
923
  }
924
 
925
+ if ( empty( $_GET['cerber_cloud_nid'] ) && empty( $_POST['cerber_cloud_nid'] ) ) {
926
+ $ret = 0;
927
+ return $ret;
928
+ }
929
+
930
  $node_id = absint( $_GET['cerber_cloud_nid'] );
931
  if ( ! $node_id ) {
932
  $node_id = absint( $_POST['cerber_cloud_nid'] );
cerber-load.php CHANGED
@@ -86,7 +86,7 @@ require_once( dirname( __FILE__ ) . '/cerber-lab.php' );
86
  require_once( dirname( __FILE__ ) . '/whois.php' );
87
  require_once( dirname( __FILE__ ) . '/jetflow.php' );
88
  require_once( dirname( __FILE__ ) . '/cerber-news.php' );
89
- //require_once( dirname( __FILE__ ) . '/cerber-scanner.php' );
90
 
91
  if ( defined( 'WP_ADMIN' ) || defined( 'WP_NETWORK_ADMIN' ) ) {
92
  // Load dashboard stuff
@@ -746,11 +746,9 @@ function cerber_init() {
746
  }
747
  }
748
 
749
- //global $wp_cerber;
750
- //$wp_cerber = get_wp_cerber();
751
-
752
  // Redirection control: no default aliases for redirections
753
- if ( crb_get_settings( 'noredirect' ) ) {
 
754
  remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
755
  }
756
 
@@ -1076,7 +1074,8 @@ function cerber_login_failed( $user_login ) {
1076
  // Must the Citadel mode be activated?
1077
  if ( $wp_cerber->getSettings( 'ciperiod' ) && ! cerber_is_citadel() ) {
1078
  $range = time() - $wp_cerber->getSettings( 'ciperiod' ) * 60;
1079
- $lockouts = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE activity IN (7,51,52) AND stamp > ' . $range );
 
1080
  if ( $lockouts >= $wp_cerber->getSettings( 'cilimit' ) ) {
1081
  cerber_enable_citadel();
1082
  }
@@ -1122,7 +1121,8 @@ function cerber_failed_work($ip, $acl, $no_user, $user_login){
1122
  // Must the Citadel mode be activated?
1123
  if ( $wp_cerber->getSettings( 'ciperiod' ) && ! cerber_is_citadel() ) {
1124
  $range = time() - $wp_cerber->getSettings( 'ciperiod' ) * 60;
1125
- $lockouts = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE activity IN (7,51,52) AND stamp > ' . $range );
 
1126
  if ( $lockouts >= $wp_cerber->getSettings( 'cilimit' ) ) {
1127
  cerber_enable_citadel();
1128
  }
@@ -1194,9 +1194,9 @@ function cerber_is_registration_prohibited( $sanitized_user_login ) {
1194
  * @return bool
1195
  */
1196
  function crb_is_reg_limit_reached() {
1197
- global $wpdb, $wp_cerber;
1198
 
1199
- if ( ! $wp_cerber->getSettings( 'reglimit_min' ) || ! $wp_cerber->getSettings( 'reglimit_num' ) ) {
1200
  return false;
1201
  }
1202
 
@@ -1204,11 +1204,12 @@ function crb_is_reg_limit_reached() {
1204
  return false;
1205
  }
1206
 
1207
- $ip = $wp_cerber->getRemoteIp();
1208
- $stamp = absint( time() - 60 * $wp_cerber->getSettings( 'reglimit_min' ) );
1209
- $count = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = "' . $ip . '" AND activity = 2 AND stamp > ' . $stamp );
1210
- if ( $count > $wp_cerber->getSettings( 'reglimit_num' ) ) {
1211
  lab_save_push( $ip, 344, '' );
 
1212
  return true;
1213
  }
1214
 
@@ -1811,12 +1812,11 @@ function cerber_pingback_url( $output, $show ) {
1811
  *
1812
  */
1813
  function cerber_block_rest() {
1814
- global $wp_version;
1815
  // OLD WP
1816
  add_filter( 'json_enabled', '__return_false' );
1817
  add_filter( 'json_jsonp_enabled', '__return_false' );
1818
  // WP 4.4, deprecated since 4.7
1819
- if ( version_compare( $wp_version, '4.7', '<' ) ) {
1820
  add_filter( 'rest_enabled', '__return_false', 9999 );
1821
  }
1822
  // WP 4.7
@@ -1842,13 +1842,13 @@ function cerber_block_rest() {
1842
  * Redirection control: standard admin/login redirections
1843
  *
1844
  */
1845
- add_filter( 'wp_redirect', 'cerber_no_redirect', 10, 2 );
1846
- function cerber_no_redirect( $location, $status ) {
1847
- global $current_user, $wp_cerber;
1848
- if ( (!$current_user || $current_user->ID == 0) && $wp_cerber->getSettings( 'noredirect' ) ) {
1849
  $str = urlencode( '/wp-admin/' );
1850
- $rdr = explode('redirect_to=',$location);
1851
- if ( isset($rdr[1]) && strpos( $rdr[1], $str ) ) {
1852
  cerber_404_page();
1853
  }
1854
  }
@@ -1856,6 +1856,17 @@ function cerber_no_redirect( $location, $status ) {
1856
  return $location;
1857
  }
1858
 
 
 
 
 
 
 
 
 
 
 
 
1859
  /*
1860
  * Stop user enumeration
1861
  *
@@ -1904,7 +1915,6 @@ function cerber_can_msg() {
1904
  */
1905
  add_action( 'auth_cookie_valid', 'cerber_cookie1', 10, 2 );
1906
  function cerber_cookie1( $cookie_elements = null, $user = null ) {
1907
- global $current_user;
1908
  if ( ! $user ) {
1909
  $user = wp_get_current_user();
1910
  }
@@ -2222,10 +2232,12 @@ function cerber_geo_rules( $rule_id = '' ) {
2222
  global $wpdb;
2223
 
2224
  if (is_multisite()) {
2225
- $geo = $wpdb->get_var( 'SELECT meta_value FROM ' . $wpdb->sitemeta . ' WHERE meta_key = "geo_rule_set"' );
 
2226
  }
2227
  else {
2228
- $geo = $wpdb->get_var( 'SELECT option_value FROM ' . $wpdb->options . ' WHERE option_name = "geo_rule_set"' );
 
2229
  }
2230
 
2231
  if ( $geo ) {
@@ -2523,10 +2535,7 @@ function cerber_get_block( $ip = '' ) {
2523
  * @since 3.0
2524
  */
2525
  function cerber_blocked_num() {
2526
- global $wpdb;
2527
- $count = cerber_db_get_var( 'SELECT count(ip) FROM ' . CERBER_BLOCKS_TABLE );
2528
-
2529
- return absint( $count );
2530
  }
2531
 
2532
  /**
@@ -2537,10 +2546,10 @@ function cerber_blocked_num() {
2537
  * @return integer Duration in seconds
2538
  */
2539
  function cerber_calc_duration( $ip ) {
2540
- global $wpdb;
2541
  $range = time() - crb_get_settings( 'aglast' ) * 3600;
2542
  //$lockouts = $wpdb->get_var( $wpdb->prepare( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = %s AND activity IN (10,11) AND stamp > %d', $ip, $range ) );
2543
- $lockouts = $wpdb->get_var( 'SELECT COUNT(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = "' . $ip . '" AND activity IN (10,11) AND stamp > ' . $range );
 
2544
  if ( $lockouts >= crb_get_settings( 'aglocks' ) ) {
2545
  $ret = crb_get_settings( 'agperiod' ) * 3600;
2546
  }
@@ -2725,7 +2734,7 @@ function cerber_acl_add( $ip, $tag, $comment = '') {
2725
  if ( ! cerber_is_ipv4( $ip ) ) {
2726
  $ip = cerber_short_ipv6( $ip );
2727
  }
2728
- if ( $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(ip) FROM ' . CERBER_ACL_TABLE . ' WHERE ip = %s', $ip ) ) ) {
2729
  return false; //__( 'Element is already in list', 'wp-cerber' );
2730
  }
2731
  $range = cerber_any2range( $ip );
@@ -2756,7 +2765,7 @@ function cerber_acl_add( $ip, $tag, $comment = '') {
2756
  $range = $ip['range'];
2757
  $begin = $ip['begin'];
2758
  $end = $ip['end'];
2759
- if ( $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(ip) FROM ' . CERBER_ACL_TABLE . ' WHERE ip_long_begin = %d AND ip_long_end = %d', $begin, $end ) ) ) {
2760
  return false;
2761
  }
2762
 
@@ -2846,7 +2855,7 @@ function cerber_is_acl_permit( $ip = '' ) {
2846
  * @return bool|string
2847
  */
2848
  function cerber_acl_check( $ip = null, $tag = '' ) {
2849
- global $wpdb, $wp_cerber;
2850
  static $cache; // @since 5.26
2851
 
2852
  if ( ! $ip ) {
@@ -2908,18 +2917,28 @@ function cerber_acl_check( $ip = null, $tag = '' ) {
2908
  * @return bool|null|string
2909
  */
2910
  function cerber_acl_checkV6( $ip = null, $tag = '' ) {
2911
- global $wpdb, $wp_cerber;
 
2912
  if ( ! $ip ) {
2913
- $ip = $wp_cerber->getRemoteIp();
 
2914
  }
 
 
 
 
2915
  if ( $tag ) {
2916
- if ( $wpdb->get_var( $wpdb->prepare( 'SELECT count(ip) FROM ' . CERBER_ACL_TABLE . ' WHERE ip = %s AND tag = %s', $ip, $tag ) ) ) {
 
 
 
2917
  return true;
2918
  }
2919
 
2920
  return false;
2921
- } else {
2922
- if ( $ret = $wpdb->get_var( $wpdb->prepare( 'SELECT tag FROM ' . CERBER_ACL_TABLE . ' WHERE ip = %s', $ip ) ) ) {
 
2923
  return $ret;
2924
  }
2925
 
@@ -3690,6 +3709,24 @@ add_action( 'cerber_hourly_2', function () {
3690
  cerber_delete_expired_set();
3691
  }
3692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3693
  set_site_transient( 'crb_hourly_2', date( 'G' ) , 3600 );
3694
  });
3695
 
@@ -4002,7 +4039,6 @@ function cerber_get_last_login( $user_id, $user_email = '' ) {
4002
  }
4003
 
4004
  function cerber_count_log($activity = array(), $period = 1) {
4005
- global $wpdb;
4006
 
4007
  $period = absint( $period );
4008
  if ( ! $period ) {
@@ -4012,7 +4048,7 @@ function cerber_count_log($activity = array(), $period = 1) {
4012
  $stamp = time() - $period * 24 * 3600;
4013
 
4014
  // TODO: replace with SELECT COUNT(DISTINCT session_id)
4015
- $ret = $wpdb->get_var('SELECT COUNT(ip) FROM '. CERBER_LOG_TABLE .' WHERE activity IN ('.implode(',',$activity).') AND stamp > '. $stamp);
4016
  if (!$ret) $ret = 0;
4017
 
4018
  return $ret;
@@ -4060,7 +4096,7 @@ function cerber_subscribe_params() {
4060
  //register_activation_hook( __FILE__, 'cerber_activate' );
4061
  register_activation_hook( cerber_plugin_file(), 'cerber_set_up' );
4062
  function cerber_set_up() {
4063
- global $wp_version;
4064
  $assets_url = cerber_plugin_dir_url() . 'assets';
4065
 
4066
  //cerber_load_lang();
@@ -4070,8 +4106,8 @@ function cerber_set_up() {
4070
  cerber_stop_activating( '<h3>' . sprintf( __( 'The WP Cerber requires PHP %s or higher. You are running', 'wp-cerber' ), CERBER_REQ_PHP ) . ' ' . phpversion() . '</h3>' );
4071
  }
4072
 
4073
- if ( version_compare( CERBER_REQ_WP, $wp_version, '>' ) ) {
4074
- cerber_stop_activating( '<h3>' . sprintf( __( 'The WP Cerber requires WordPress %s or higher. You are running', 'wp-cerber' ), CERBER_REQ_WP ) . ' ' . $wp_version . '</h3>' );
4075
  }
4076
 
4077
  $db_errors = cerber_create_db();
@@ -4167,6 +4203,7 @@ function cerber_upgrade_all() {
4167
  wp_clear_scheduled_hook( 'cerber_hourly' ); // @since 5.8
4168
  cerber_push_the_news( CERBER_VER );
4169
  update_site_option( '_cerber_up', array( 'v' => CERBER_VER, 't' => time() ) );
 
4170
  }
4171
  }
4172
 
@@ -4297,12 +4334,13 @@ function cerber_create_db($recreate = true) {
4297
  ) DEFAULT CHARSET=utf8;
4298
  ';
4299
  }
4300
- /*
4301
  if ( ! cerber_is_table( CERBER_SCAN_TABLE ) ) {
4302
  $sql[] = '
4303
  CREATE TABLE IF NOT EXISTS ' . CERBER_SCAN_TABLE . ' (
4304
  scan_id INT(10) UNSIGNED NOT NULL,
4305
  scan_type INT(10) UNSIGNED NOT NULL DEFAULT 1,
 
4306
  scan_status INT(10) UNSIGNED NOT NULL DEFAULT 0,
4307
  file_name_hash VARCHAR(255) CHARACTER SET ascii NOT NULL DEFAULT "",
4308
  file_name TEXT NOT NULL,
@@ -4315,14 +4353,15 @@ function cerber_create_db($recreate = true) {
4315
  file_perms INT(11) NOT NULL DEFAULT 0,
4316
  file_writable INT(10) UNSIGNED NOT NULL DEFAULT 0,
4317
  file_mtime INT(10) UNSIGNED NOT NULL DEFAULT 0,
 
4318
  PRIMARY KEY (scan_id, file_name_hash)
4319
  ) DEFAULT CHARSET=utf8;
4320
  ';
4321
  }
4322
 
4323
- if ( ! cerber_is_table( CERBER_SETS_TABLE ) ) {
4324
  $sql[] = '
4325
- CREATE TABLE IF NOT EXISTS ' . CERBER_SETS_TABLE . ' (
4326
  the_key VARCHAR(255) CHARACTER SET ascii NOT NULL,
4327
  the_id BIGINT(20) NOT NULL DEFAULT 0,
4328
  the_value LONGTEXT NOT NULL,
@@ -4331,7 +4370,6 @@ function cerber_create_db($recreate = true) {
4331
  ) DEFAULT CHARSET=utf8;
4332
  ';
4333
  }
4334
- */
4335
 
4336
  foreach ( $sql as $query ) {
4337
  if ( ! $wpdb->query( $query ) && $wpdb->last_error ) {
@@ -4796,9 +4834,8 @@ function cerber_traffic_log(){
4796
  // Extra request details
4797
 
4798
  $details = array();
4799
- if ( $ua ) {
4800
- $details[1] = $ua;
4801
- }
4802
  if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
4803
  //$ref = mb_substr( $_SERVER['HTTP_REFERER'], 0, 1048576 ); // 1 Mb for ASCII
4804
  $details[2] = filter_var( $_SERVER['HTTP_REFERER'], FILTER_SANITIZE_URL );
@@ -5119,8 +5156,10 @@ function cerber_beast(){
5119
 
5120
  if ( $uri_script && $script_filename = cerber_script_filename() ) {
5121
  // Scaning for executable scripts?
5122
- //if ( false === strrpos( $script_filename, $uri ) ) {
5123
  if ( ! cerber_script_exists( $uri ) && !cerber_is_login_request() ) {
 
 
 
5124
  $wp_cerber = get_wp_cerber();
5125
  $cerber_status = 19;
5126
  cerber_log( 55 );
86
  require_once( dirname( __FILE__ ) . '/whois.php' );
87
  require_once( dirname( __FILE__ ) . '/jetflow.php' );
88
  require_once( dirname( __FILE__ ) . '/cerber-news.php' );
89
+ require_once( dirname( __FILE__ ) . '/cerber-scanner.php' );
90
 
91
  if ( defined( 'WP_ADMIN' ) || defined( 'WP_NETWORK_ADMIN' ) ) {
92
  // Load dashboard stuff
746
  }
747
  }
748
 
 
 
 
749
  // Redirection control: no default aliases for redirections
750
+ //if ( crb_get_settings( 'noredirect' ) ) {
751
+ if ( cerber_no_redirect() ) {
752
  remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
753
  }
754
 
1074
  // Must the Citadel mode be activated?
1075
  if ( $wp_cerber->getSettings( 'ciperiod' ) && ! cerber_is_citadel() ) {
1076
  $range = time() - $wp_cerber->getSettings( 'ciperiod' ) * 60;
1077
+ //$lockouts = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE activity IN (7,51,52) AND stamp > ' . $range );
1078
+ $lockouts = cerber_db_get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE activity IN (7,51,52) AND stamp > ' . $range );
1079
  if ( $lockouts >= $wp_cerber->getSettings( 'cilimit' ) ) {
1080
  cerber_enable_citadel();
1081
  }
1121
  // Must the Citadel mode be activated?
1122
  if ( $wp_cerber->getSettings( 'ciperiod' ) && ! cerber_is_citadel() ) {
1123
  $range = time() - $wp_cerber->getSettings( 'ciperiod' ) * 60;
1124
+ //$lockouts = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE activity IN (7,51,52) AND stamp > ' . $range );
1125
+ $lockouts = cerber_db_get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE activity IN (7,51,52) AND stamp > ' . $range );
1126
  if ( $lockouts >= $wp_cerber->getSettings( 'cilimit' ) ) {
1127
  cerber_enable_citadel();
1128
  }
1194
  * @return bool
1195
  */
1196
  function crb_is_reg_limit_reached() {
1197
+ global $wp_cerber;
1198
 
1199
+ if ( ! crb_get_settings( 'reglimit_min' ) || ! crb_get_settings( 'reglimit_num' ) ) {
1200
  return false;
1201
  }
1202
 
1204
  return false;
1205
  }
1206
 
1207
+ $ip = cerber_get_remote_ip();
1208
+ $stamp = absint( time() - 60 * crb_get_settings( 'reglimit_min' ) );
1209
+ $count = cerber_db_get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = "' . $ip . '" AND activity = 2 AND stamp > ' . $stamp );
1210
+ if ( $count >= crb_get_settings( 'reglimit_num' ) ) {
1211
  lab_save_push( $ip, 344, '' );
1212
+
1213
  return true;
1214
  }
1215
 
1812
  *
1813
  */
1814
  function cerber_block_rest() {
 
1815
  // OLD WP
1816
  add_filter( 'json_enabled', '__return_false' );
1817
  add_filter( 'json_jsonp_enabled', '__return_false' );
1818
  // WP 4.4, deprecated since 4.7
1819
+ if ( version_compare( cerber_get_wp_version(), '4.7', '<' ) ) {
1820
  add_filter( 'rest_enabled', '__return_false', 9999 );
1821
  }
1822
  // WP 4.7
1842
  * Redirection control: standard admin/login redirections
1843
  *
1844
  */
1845
+ add_filter( 'wp_redirect', 'cerber_no_red', 10, 2 );
1846
+ function cerber_no_red( $location, $status ) {
1847
+ global $current_user;
1848
+ if ( ( ! $current_user || $current_user->ID == 0 ) && cerber_no_redirect() ) {
1849
  $str = urlencode( '/wp-admin/' );
1850
+ $rdr = explode( 'redirect_to=', $location );
1851
+ if ( isset( $rdr[1] ) && strpos( $rdr[1], $str ) ) {
1852
  cerber_404_page();
1853
  }
1854
  }
1856
  return $location;
1857
  }
1858
 
1859
+ /**
1860
+ * @since 7.0
1861
+ */
1862
+ function cerber_no_redirect() {
1863
+ if ( crb_get_settings( 'noredirect' ) && !cerber_check_groove_x()) {
1864
+ return true;
1865
+ }
1866
+
1867
+ return false;
1868
+ }
1869
+
1870
  /*
1871
  * Stop user enumeration
1872
  *
1915
  */
1916
  add_action( 'auth_cookie_valid', 'cerber_cookie1', 10, 2 );
1917
  function cerber_cookie1( $cookie_elements = null, $user = null ) {
 
1918
  if ( ! $user ) {
1919
  $user = wp_get_current_user();
1920
  }
2232
  global $wpdb;
2233
 
2234
  if (is_multisite()) {
2235
+ //$geo = $wpdb->get_var( 'SELECT meta_value FROM ' . $wpdb->sitemeta . ' WHERE meta_key = "geo_rule_set"' );
2236
+ $geo = cerber_db_get_var( 'SELECT meta_value FROM ' . $wpdb->sitemeta . ' WHERE meta_key = "geo_rule_set"' );
2237
  }
2238
  else {
2239
+ //$geo = $wpdb->get_var( 'SELECT option_value FROM ' . $wpdb->options . ' WHERE option_name = "geo_rule_set"' );
2240
+ $geo = cerber_db_get_var( 'SELECT option_value FROM ' . $wpdb->options . ' WHERE option_name = "geo_rule_set"' );
2241
  }
2242
 
2243
  if ( $geo ) {
2535
  * @since 3.0
2536
  */
2537
  function cerber_blocked_num() {
2538
+ return absint( cerber_db_get_var( 'SELECT count(ip) FROM ' . CERBER_BLOCKS_TABLE ) );
 
 
 
2539
  }
2540
 
2541
  /**
2546
  * @return integer Duration in seconds
2547
  */
2548
  function cerber_calc_duration( $ip ) {
 
2549
  $range = time() - crb_get_settings( 'aglast' ) * 3600;
2550
  //$lockouts = $wpdb->get_var( $wpdb->prepare( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = %s AND activity IN (10,11) AND stamp > %d', $ip, $range ) );
2551
+ //$lockouts = $wpdb->get_var( 'SELECT COUNT(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = "' . $ip . '" AND activity IN (10,11) AND stamp > ' . $range );
2552
+ $lockouts = cerber_db_get_var( 'SELECT COUNT(ip) FROM ' . CERBER_LOG_TABLE . ' WHERE ip = "' . $ip . '" AND activity IN (10,11) AND stamp > ' . $range );
2553
  if ( $lockouts >= crb_get_settings( 'aglocks' ) ) {
2554
  $ret = crb_get_settings( 'agperiod' ) * 3600;
2555
  }
2734
  if ( ! cerber_is_ipv4( $ip ) ) {
2735
  $ip = cerber_short_ipv6( $ip );
2736
  }
2737
+ if ( cerber_db_get_var( $wpdb->prepare( 'SELECT COUNT(ip) FROM ' . CERBER_ACL_TABLE . ' WHERE ip = %s', $ip ) ) ) {
2738
  return false; //__( 'Element is already in list', 'wp-cerber' );
2739
  }
2740
  $range = cerber_any2range( $ip );
2765
  $range = $ip['range'];
2766
  $begin = $ip['begin'];
2767
  $end = $ip['end'];
2768
+ if ( cerber_db_get_var( $wpdb->prepare( 'SELECT COUNT(ip) FROM ' . CERBER_ACL_TABLE . ' WHERE ip_long_begin = %d AND ip_long_end = %d', $begin, $end ) ) ) {
2769
  return false;
2770
  }
2771
 
2855
  * @return bool|string
2856
  */
2857
  function cerber_acl_check( $ip = null, $tag = '' ) {
2858
+ global $wp_cerber;
2859
  static $cache; // @since 5.26
2860
 
2861
  if ( ! $ip ) {
2917
  * @return bool|null|string
2918
  */
2919
  function cerber_acl_checkV6( $ip = null, $tag = '' ) {
2920
+ global $wp_cerber;
2921
+
2922
  if ( ! $ip ) {
2923
+ //$ip = $wp_cerber->getRemoteIp();
2924
+ $ip = cerber_get_remote_ip();
2925
  }
2926
+ elseif ( ! cerber_is_ip( $ip ) ) {
2927
+ return false;
2928
+ }
2929
+
2930
  if ( $tag ) {
2931
+ if ( $tag != 'W' && $tag != 'B' ) {
2932
+ return false;
2933
+ }
2934
+ if ( cerber_db_get_var( 'SELECT count(ip) FROM ' . CERBER_ACL_TABLE . ' WHERE ip = "' . $ip . '" AND tag = "' . $tag . '"' ) ) {
2935
  return true;
2936
  }
2937
 
2938
  return false;
2939
+ }
2940
+ else {
2941
+ if ( $ret = cerber_db_get_var( 'SELECT tag FROM ' . CERBER_ACL_TABLE . ' WHERE ip = "' . $ip . '"' ) ) {
2942
  return $ret;
2943
  }
2944
 
3709
  cerber_delete_expired_set();
3710
  }
3711
 
3712
+ // Cleanup quarantine folder
3713
+ if ( $dirs = glob( cerber_get_the_folder() . 'quarantine' . '/*', GLOB_ONLYDIR ) ) {
3714
+ foreach ( $dirs as $dir ) {
3715
+ $d = basename( $dir );
3716
+ if ( is_numeric( $d ) ) {
3717
+ if ( $d < ( time() - DAY_IN_SECONDS * crb_get_settings( 'scan_qcleanup' ) ) ) {
3718
+ $fs = cerber_init_wp_filesystem();
3719
+ if ( ! is_wp_error( $fs ) ) {
3720
+ $fs->delete( $dir, true );
3721
+ }
3722
+ }
3723
+ }
3724
+ }
3725
+ }
3726
+
3727
+ // Keep folder locked
3728
+ cerber_get_the_folder();
3729
+
3730
  set_site_transient( 'crb_hourly_2', date( 'G' ) , 3600 );
3731
  });
3732
 
4039
  }
4040
 
4041
  function cerber_count_log($activity = array(), $period = 1) {
 
4042
 
4043
  $period = absint( $period );
4044
  if ( ! $period ) {
4048
  $stamp = time() - $period * 24 * 3600;
4049
 
4050
  // TODO: replace with SELECT COUNT(DISTINCT session_id)
4051
+ $ret = cerber_db_get_var('SELECT COUNT(ip) FROM '. CERBER_LOG_TABLE .' WHERE activity IN ('.implode(',',$activity).') AND stamp > '. $stamp);
4052
  if (!$ret) $ret = 0;
4053
 
4054
  return $ret;
4096
  //register_activation_hook( __FILE__, 'cerber_activate' );
4097
  register_activation_hook( cerber_plugin_file(), 'cerber_set_up' );
4098
  function cerber_set_up() {
4099
+
4100
  $assets_url = cerber_plugin_dir_url() . 'assets';
4101
 
4102
  //cerber_load_lang();
4106
  cerber_stop_activating( '<h3>' . sprintf( __( 'The WP Cerber requires PHP %s or higher. You are running', 'wp-cerber' ), CERBER_REQ_PHP ) . ' ' . phpversion() . '</h3>' );
4107
  }
4108
 
4109
+ if ( version_compare( CERBER_REQ_WP, cerber_get_wp_version(), '>' ) ) {
4110
+ cerber_stop_activating( '<h3>' . sprintf( __( 'The WP Cerber requires WordPress %s or higher. You are running', 'wp-cerber' ), CERBER_REQ_WP ) . ' ' . cerber_get_wp_version() . '</h3>' );
4111
  }
4112
 
4113
  $db_errors = cerber_create_db();
4203
  wp_clear_scheduled_hook( 'cerber_hourly' ); // @since 5.8
4204
  cerber_push_the_news( CERBER_VER );
4205
  update_site_option( '_cerber_up', array( 'v' => CERBER_VER, 't' => time() ) );
4206
+ cerber_delete_expired_set( true );
4207
  }
4208
  }
4209
 
4334
  ) DEFAULT CHARSET=utf8;
4335
  ';
4336
  }
4337
+
4338
  if ( ! cerber_is_table( CERBER_SCAN_TABLE ) ) {
4339
  $sql[] = '
4340
  CREATE TABLE IF NOT EXISTS ' . CERBER_SCAN_TABLE . ' (
4341
  scan_id INT(10) UNSIGNED NOT NULL,
4342
  scan_type INT(10) UNSIGNED NOT NULL DEFAULT 1,
4343
+ scan_mode INT(10) UNSIGNED NOT NULL DEFAULT 0,
4344
  scan_status INT(10) UNSIGNED NOT NULL DEFAULT 0,
4345
  file_name_hash VARCHAR(255) CHARACTER SET ascii NOT NULL DEFAULT "",
4346
  file_name TEXT NOT NULL,
4353
  file_perms INT(11) NOT NULL DEFAULT 0,
4354
  file_writable INT(10) UNSIGNED NOT NULL DEFAULT 0,
4355
  file_mtime INT(10) UNSIGNED NOT NULL DEFAULT 0,
4356
+ extra TEXT NOT NULL,
4357
  PRIMARY KEY (scan_id, file_name_hash)
4358
  ) DEFAULT CHARSET=utf8;
4359
  ';
4360
  }
4361
 
4362
+ if ( ! cerber_is_table( cerber_get_db_prefix() . CERBER_SETS_TABLE ) ) {
4363
  $sql[] = '
4364
+ CREATE TABLE IF NOT EXISTS ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' (
4365
  the_key VARCHAR(255) CHARACTER SET ascii NOT NULL,
4366
  the_id BIGINT(20) NOT NULL DEFAULT 0,
4367
  the_value LONGTEXT NOT NULL,
4370
  ) DEFAULT CHARSET=utf8;
4371
  ';
4372
  }
 
4373
 
4374
  foreach ( $sql as $query ) {
4375
  if ( ! $wpdb->query( $query ) && $wpdb->last_error ) {
4834
  // Extra request details
4835
 
4836
  $details = array();
4837
+ $details[1] = $ua;
4838
+
 
4839
  if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
4840
  //$ref = mb_substr( $_SERVER['HTTP_REFERER'], 0, 1048576 ); // 1 Mb for ASCII
4841
  $details[2] = filter_var( $_SERVER['HTTP_REFERER'], FILTER_SANITIZE_URL );
5156
 
5157
  if ( $uri_script && $script_filename = cerber_script_filename() ) {
5158
  // Scaning for executable scripts?
 
5159
  if ( ! cerber_script_exists( $uri ) && !cerber_is_login_request() ) {
5160
+ if (crb_get_settings('tiipwhite') && crb_acl_is_white()) {
5161
+ return;
5162
+ }
5163
  $wp_cerber = get_wp_cerber();
5164
  $cerber_status = 19;
5165
  cerber_log( 55 );
cerber-news.php CHANGED
@@ -143,6 +143,9 @@ function cerber_push_the_news( $version ) {
143
  $news['6.7'][] = 'Bug fixed: the Safe antispam mode doesn\'t work correctly on some website configurations. That may leads to false positives and erroneous spam form submission detection.';
144
  $news['6.7'][] = 'Norwegian Bokmål and Dutch language translations have updated. Thanks to Jos Knippen and Eirik Vorland.';
145
 
 
 
 
146
 
147
  if ( ! empty( $news[ $version ] ) ) {
148
  //$text = '<h3>What\'s new in WP Cerber '.$version.'</h3>';
143
  $news['6.7'][] = 'Bug fixed: the Safe antispam mode doesn\'t work correctly on some website configurations. That may leads to false positives and erroneous spam form submission detection.';
144
  $news['6.7'][] = 'Norwegian Bokmål and Dutch language translations have updated. Thanks to Jos Knippen and Eirik Vorland.';
145
 
146
+ $news['7.0'][] = 'We’re proud to announce a new version of the plugin with a new security tool: Cerber Security Scanner. The main purpose of the scanner is to provide a handy diagnostic tool to monitor all files on a website, verify the integrity of WordPress, plugins, themes and to detect and remove malware.';
147
+ $news['7.0'][] = 'A new setting has been added for Traffic Inspector: Use White IP Access List. When enabled it allows any requests from IP addresses in the White IP access list to bypass all Traffic Inspector security rules.';
148
+ $news['7.0'][] = 'Since v 7.0 the redirection from /wp-admin/ to the login page is not blocked if a not logged in user has been logged in once before.';
149
 
150
  if ( ! empty( $news[ $version ] ) ) {
151
  //$text = '<h3>What\'s new in WP Cerber '.$version.'</h3>';
cerber-scanner.php ADDED
@@ -0,0 +1,3731 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Copyright (C) 2015-18 CERBER TECH INC., http://cerber.tech
4
+ Copyright (C) 2015-18 Gregory Markov, https://wpcerber.com
5
+
6
+ Licenced under the GNU GPL.
7
+
8
+ This program is free software; you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation; either version 3 of the License, or
11
+ (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 General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this program; if not, write to the Free Software
20
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+
22
+ */
23
+
24
+ /*
25
+
26
+ *========================================================================*
27
+ | |
28
+ | ATTENTION! Do not change or edit this file! |
29
+ | |
30
+ *========================================================================*
31
+
32
+ */
33
+
34
+ define( 'CERBER_FT_WP', 1 );
35
+ define( 'CERBER_FT_PLUGIN', 2 );
36
+ define( 'CERBER_FT_THEME', 3 );
37
+ define( 'CERBER_FT_ROOT', 4 );
38
+ define( 'CERBER_FT_UPLOAD', 5 );
39
+ define( 'CERBER_FT_LNG', 6 );
40
+ define( 'CERBER_FT_MUP', 7 );
41
+ define( 'CERBER_FT_CNT', 8 );
42
+ define( 'CERBER_FT_CONF', 10 );
43
+ define( 'CERBER_FT_DRIN', 11 );
44
+ define( 'CERBER_FT_OTHER', 12 );
45
+
46
+ define( 'CERBER_MAX_SECONDS', 5 );
47
+
48
+ define( 'CERBER_SCF', 16 );
49
+ define( 'CERBER_PMC', 17 );
50
+ define( 'CERBER_USF', 18 );
51
+ define( 'CERBER_EXC', 20 );
52
+ define( 'CERBER_UXT', 30 );
53
+
54
+ define( 'CERBER_MALWR_DETECTED', 1000 );
55
+
56
+ define( 'CRB_HASH_THEME', 'hash_tm_' );
57
+ define( 'CRB_HASH_PLUGIN', 'hash_pl_' );
58
+ define( 'CRB_LAST_FILE', 'tmp_last_file' );
59
+
60
+ function cerber_integrity_page() {
61
+
62
+ $tab = cerber_get_tab( 'scanner', array( 'scanner', 'scan_settings', 'help' ) );
63
+
64
+ ?>
65
+ <div class="wrap crb-admin">
66
+
67
+ <h2><?php _e( 'Site Integrity', 'wp-cerber' ) ?></h2>
68
+
69
+ <h2 class="nav-tab-wrapper cerber-tabs">
70
+ <?php
71
+
72
+ echo '<a href="' . cerber_admin_link( 'scanner' ) . '" class="nav-tab ' . ( $tab == 'scanner' ? 'nav-tab-active' : '' ) . '"><span class="dashicons dashicons-visibility"></span> ' . __( 'Security Scanner' ) . '</a>';
73
+ echo '<a href="' . cerber_admin_link( 'scan_settings' ) . '" class="nav-tab ' . ( $tab == 'scan_settings' ? 'nav-tab-active' : '' ) . '"><span class="dashicons dashicons-admin-settings"></span> ' . __( 'Settings' ) . '</a>';
74
+ echo '<a href="' . cerber_admin_link( 'help', array( 'page' => cerber_get_admin_page() ) ) . '" class="nav-tab ' . ( $tab == 'help' ? 'nav-tab-active' : '' ) . '"><span class="dashicons dashicons-editor-help"></span> ' . __( 'Help', 'wp-cerber' ) . '</a>';
75
+
76
+ echo lab_indicator();
77
+ ?>
78
+ </h2>
79
+
80
+ <?php
81
+
82
+ cerber_show_aside( $tab );
83
+
84
+ echo '<div class="crb-main">';
85
+
86
+ switch ( $tab ) {
87
+ case 'scan_settings':
88
+ cerber_show_settings_page( 'scanner' );
89
+ break;
90
+ case 'help':
91
+ cerber_show_help();
92
+ break;
93
+ default:
94
+ cerber_show_scanner();
95
+ }
96
+
97
+ echo '</div>';
98
+
99
+ ?>
100
+
101
+ </div>
102
+ <?php
103
+ }
104
+
105
+ function cerber_show_scanner() {
106
+ // http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
107
+
108
+ $msg = '';
109
+ $status = 0;
110
+
111
+ if ( $scan = cerber_get_scan() ) {
112
+ if ( ! $scan['finished'] ) {
113
+ if ( $scan['cloud'] ) {
114
+ $msg = 'Currently an automatic scan in progress. Please wait until it is finished.';
115
+ $status = 1;
116
+ }
117
+ else {
118
+ $msg = sprintf( 'Previous scan started %s has not been completed. Continue scanning?', cerber_date( $scan['started'] ) );
119
+ $status = 2;
120
+ }
121
+ }
122
+ else {
123
+
124
+ }
125
+ }
126
+ else {
127
+ $msg = 'It seems this website has never been scanned. To start scanning click the button below.';
128
+ }
129
+
130
+ $start_quick = '<input data-control="start_scan" data-mode="quick" type="button" value="' . __( 'Start Quick Scan', 'wp-cerber' ) . '" class="button button-primary">';
131
+ $start_full = '<input data-control="start_scan" data-mode="full" type="button" value="' . __( 'Start Full Scan', 'wp-cerber' ) . '" class="button button-primary">';
132
+ $stop = '<input id="crb-stop-scan" style="display: none;" data-control="stop_scan" type="button" value="' . __( 'Stop Scanning', 'wp-cerber' ) . '" class="button button-primary">';
133
+ $continue = '<input id="crb-continue-scan" data-control="continue_scan" type="button" value="' . __( 'Continues Scanning', 'wp-cerber' ) . '" class="button button-primary">';
134
+ $controls = '';
135
+
136
+ switch ( $status ) {
137
+ case 0:
138
+ $controls = $start_quick . $start_full;
139
+ break;
140
+ case 1:
141
+ $controls = '';
142
+ break;
143
+ case 2:
144
+ $controls = $start_quick . $start_full . $continue;
145
+ break;
146
+ }
147
+
148
+ $controls .= $stop;
149
+
150
+
151
+ echo '<div id="crb-scanner">';
152
+
153
+ cerber_scanner_dashboard( $msg );
154
+
155
+ ?>
156
+ <div id="crb-scan-area">
157
+ <form>
158
+ <table id="crb-scan-controls">
159
+ <tr>
160
+ <td id="crb-file-controls"><input data-control="delete_file" type="button"
161
+ class="button button-secondary"
162
+ value="<?php _e( 'Delete', 'wp-cerber' ); ?>"/></td>
163
+ <td>
164
+ <?php echo $controls; ?>
165
+ </td>
166
+ <td><a href="#" data-control="full-paths">Show full paths</a></td>
167
+ </tr>
168
+ </table>
169
+ </form>
170
+ </div>
171
+
172
+ <?php
173
+
174
+ echo '</div>';
175
+ }
176
+
177
+ add_action( 'wp_ajax_cerber_scan_control', 'cerber_manual_scan' );
178
+ function cerber_manual_scan() {
179
+ global $cerber_db_errors;
180
+
181
+ cerber_check_ajax();
182
+
183
+ ob_start(); // Collecting possible junk warnings and notices cause we need clean JSON to be sent
184
+
185
+ $response = array();
186
+ $console_log = array();
187
+ $do = 'stop';
188
+
189
+ if ( cerber_is_http_post() && isset( $_POST['cerber_scan_do'] ) ) {
190
+ $do = preg_replace( '/[^a-z_\-\d]/i', '', $_POST['cerber_scan_do'] );
191
+ $mode = ( isset( $_POST['cerber_scan_mode'] ) ) ? preg_replace( '/[^a-z_\-\d]/i', '', $_POST['cerber_scan_mode'] ) : 'quick';
192
+
193
+ $response = cerber_scanner( $do, $mode );
194
+
195
+ }
196
+ else {
197
+ $console_log[] = 'Unknown HTTP request';
198
+ }
199
+
200
+ if ( ! empty( $response['cerber_scan_do'] ) ) {
201
+ $do = $response['cerber_scan_do'];
202
+ }
203
+
204
+ if ( $cerber_db_errors ) {
205
+ $console_log = array_merge( $console_log, $cerber_db_errors );
206
+ }
207
+
208
+ $console_log[] = 'PHP MEMORY ' . @ini_get( 'memory_limit' );
209
+
210
+ ob_end_clean();
211
+
212
+ echo json_encode( array(
213
+ 'console_log' => $console_log,
214
+ 'cerber_scan_do' => $do,
215
+ 'cerber_scanner' => $response,
216
+ //'scan' => cerber_get_scan(), // debug only
217
+ ) );
218
+
219
+ wp_die();
220
+ }
221
+
222
+ function cerber_scanner( $control, $mode ) {
223
+ global $cerber_db_errors, $cerber_scan_mode;
224
+
225
+ $errors = array();
226
+
227
+ if ( function_exists( 'wp_raise_memory_limit' ) ) {
228
+ wp_raise_memory_limit( 'admin' );
229
+ }
230
+ else {
231
+ $errors[] = 'Unable to raise memory limit';
232
+ }
233
+
234
+ if ( ! $mode ) {
235
+ $mode = 'quick';
236
+ }
237
+
238
+ $cerber_scan_mode = $mode;
239
+ $status = null;
240
+ $response = array();
241
+
242
+ switch ( $control ) {
243
+ case 'start_scan':
244
+ cerber_delete_scan();
245
+ cerber_update_set( CRB_LAST_FILE, '', 0, false );
246
+ cerber_init_scan( $mode );
247
+ cerber_step_scanning();
248
+ break;
249
+ case 'continue_scan':
250
+ if ( $scan = cerber_get_scan() ) {
251
+ $cerber_scan_mode = $scan['mode'];
252
+ cerber_step_scanning();
253
+ }
254
+ else {
255
+ $errors[] = 'No scan in progress';
256
+ }
257
+ break;
258
+ case 'get-last-scan':
259
+ if ($scan = cerber_get_scan()) {
260
+ $filtered = $scan['issues'];
261
+ foreach ( $scan['issues'] as $key => $item ) {
262
+ if ( isset( $item['issues'] ) ) {
263
+ foreach ( $item['issues'] as $id => $issue ) {
264
+ if ( isset( $issue['data']['name'] ) ) {
265
+ if ( ! file_exists( $issue['data']['name'] ) ) {
266
+ unset( $filtered[ $key ]['issues'][ $id ] );
267
+ }
268
+ }
269
+ }
270
+ }
271
+ }
272
+ $response['issues'] = $filtered;
273
+ }
274
+ break;
275
+ }
276
+
277
+ if ($scan = cerber_get_scan()) {
278
+
279
+ $response['scan_id'] = $scan['id'];
280
+
281
+ if ( $scan['finished'] || $scan['aborted'] ) {
282
+ $response['cerber_scan_do'] = 'stop';
283
+ }
284
+ else {
285
+ $response['cerber_scan_do'] = 'continue_scan';
286
+ }
287
+
288
+ $response['aborted'] = $scan['aborted'];
289
+ $response['errors'] = array_merge( $errors, $scan['errors'] );
290
+ $response['total'] = $scan['total'];
291
+ //$response['memory_usage'] = memory_get_usage();
292
+ //$response['memory_limit'] = @ini_get( 'memory_limit' );
293
+
294
+ if ( ! lab_is_cloud_request() ) {
295
+ $response['step_issues'] = $scan['step_issues'];
296
+ $response['scanned'] = $scan['scanned'];
297
+
298
+ $response['started'] = cerber_date( $scan['started'] );
299
+ $response['elapsed'] = time() - $scan['started'];
300
+ $duration = $response['elapsed'];
301
+
302
+ $response['finished'] = '';
303
+ $response['duration'] = '';
304
+
305
+ if ( $scan['finished'] ) {
306
+ $response['finished'] = cerber_date( $scan['finished'] );
307
+ $duration = $scan['finished'] - $scan['started'];
308
+ $response['step'] = '';
309
+ }
310
+ else {
311
+ $response['step'] = $scan['next_step'];
312
+ }
313
+
314
+ if ( $duration < 60 ) {
315
+ $response['duration'] = $duration . ' seconds';
316
+ }
317
+ else {
318
+ $response['duration'] = round( $duration / 60, 2 ) . ' minutes';
319
+ }
320
+
321
+ if ( $duration && ! empty( $scan['scanned']['bytes'] ) ) {
322
+ $response['performance'] = number_format( round( ( $scan['scanned']['bytes'] / $duration ) / 1024, 0 ), 0, '.', ' ' );
323
+ }
324
+ else {
325
+ $response['performance'] = 0;
326
+ }
327
+ $response['performance'] .= ' KB/sec';
328
+
329
+ }
330
+ }
331
+
332
+ if ( $cerber_db_errors ) {
333
+ cerber_watchdog( true );
334
+ }
335
+
336
+ return $response;
337
+ }
338
+
339
+ function cerber_show_last_scan_results() {
340
+ global $wpdb;
341
+
342
+ $rows = $wpdb->get_results( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_status = 1 AND hash_match !=1' );
343
+ if ( ! $rows ) {
344
+ return 0;
345
+ }
346
+ echo '<h3>Last scan results</h3>';
347
+ echo '<pre style="background-color: #fff; text-align: left;">';
348
+ foreach ( $rows as $row ) {
349
+ $mime = wp_check_filetype( $row->file_name );
350
+ echo $row->file_name . ' ' . $mime['mode'] . ' ' . $row->file_hash_repo . "\n";
351
+ }
352
+ echo '</pre>';
353
+ }
354
+
355
+ function cerber_step_scanning() {
356
+ global $cerber_scan_mode;
357
+
358
+ ignore_user_abort( true );
359
+
360
+ cerber_exec_timer();
361
+
362
+ cerber_update_scan( array( 'step_issues' => array() ) );
363
+
364
+ if ( ! $scan = cerber_get_scan() ) {
365
+ return false;
366
+ }
367
+
368
+ if ( $scan['finished'] ) {
369
+ return true;
370
+ }
371
+
372
+ $update = array();
373
+ $update['next_step'] = $scan['next_step'];
374
+ $update['aborted'] = 0;
375
+
376
+
377
+ switch ( $scan['next_step'] ) {
378
+ case 1:
379
+ if ( !$result = cerber_scan_directory( ABSPATH, null, '_crb_save_file_names' ) ) {
380
+ $update['aborted'] = 1;
381
+ break;
382
+ }
383
+ else {
384
+ $update['total']['folders'] = $result[0];
385
+ _crb_save_file_names( array( dirname( ABSPATH ) . DIRECTORY_SEPARATOR . 'wp-config.php' ) );
386
+
387
+ if ( crb_get_settings( 'scan_tmp' ) ) {
388
+ $tmp_dir = @ini_get( 'upload_tmp_dir' );
389
+ if ( is_dir( $tmp_dir ) && $result = cerber_scan_directory( $tmp_dir, null, '_crb_save_file_names' ) ) {
390
+ $update['total']['folders'] += $result[0];
391
+ }
392
+ $another_dir = sys_get_temp_dir();
393
+ if ( $another_dir !== $tmp_dir && @is_dir( $another_dir ) && $result = cerber_scan_directory( $another_dir, null, '_crb_save_file_names' ) ) {
394
+ $update['total']['folders'] += $result[0];
395
+ }
396
+ }
397
+ if ( crb_get_settings( 'scan_sess' ) ) {
398
+ $another_dir = session_save_path();
399
+ if ( is_dir( $another_dir ) && $result = cerber_scan_directory( $another_dir, null, '_crb_save_file_names' ) ) {
400
+ $update['total']['folders'] += $result[0];
401
+ }
402
+ }
403
+
404
+ $update['total']['files'] = cerber_db_get_var( 'SELECT COUNT(scan_id) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] );
405
+ $update['next_step'] ++;
406
+ }
407
+ break;
408
+ case 2:
409
+ //$start = time();
410
+ $x = 0;
411
+ $exceed = false;
412
+ if ( $result = cerber_db_get_results( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] . ' AND file_hash = ""' ) ) {
413
+ foreach ( $result as $row ) {
414
+ if ( ! cerber_update_file_info( $row ) ) {
415
+ cerber_log_scan_error( 'Unable to update file info. Scanning has been aborted.' );
416
+ $update['aborted'] = 1;
417
+ break;
418
+ }
419
+ if ( 0 === ($x % 100) ) {
420
+ //if ( ( time() - $start ) > CERBER_MAX_SECONDS ) {
421
+ if ( cerber_exec_timer() ) {
422
+ $exceed = true;
423
+ break;
424
+ }
425
+ }
426
+ $x++;
427
+ }
428
+ // Some files might be symlinks
429
+ $update['total']['files'] = cerber_db_get_var( 'SELECT COUNT(scan_id) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] );
430
+ $update['total']['parsed'] = cerber_db_get_var( 'SELECT COUNT(scan_id) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] . ' AND file_type !=0' );
431
+ }
432
+ else {
433
+ $update['aborted'] = 1;
434
+ }
435
+ if ( ! $exceed && ! $update['aborted'] ) {
436
+ $update['next_step'] ++;
437
+ }
438
+ break;
439
+ case 3:
440
+ cerber_verify_wp();
441
+ $update['next_step'] ++;
442
+ break;
443
+ case 4:
444
+ $remain = cerber_verify_plugins();
445
+ if ( ! $remain ) {
446
+ $update['next_step'] ++;
447
+ }
448
+ break;
449
+ case 5:
450
+ $remain = cerber_verify_themes();
451
+ if ( ! $remain ) {
452
+ $update['next_step'] ++;
453
+ }
454
+ break;
455
+ case 6:
456
+ $remain = cerber_process_files();
457
+ if ( ! $remain ) {
458
+ $update['next_step'] ++;
459
+ }
460
+ break;
461
+ }
462
+
463
+ if ( $update['next_step'] > 6 ) {
464
+ $update['finished'] = time();
465
+ }
466
+
467
+ if ( $update['aborted'] ) {
468
+ $update['aborted'] = time();
469
+ }
470
+
471
+ $update['scanned']['files'] = cerber_db_get_var( 'SELECT COUNT(scan_id) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] . ' AND scan_status > 0' );
472
+ $update['scanned']['bytes'] = cerber_db_get_var( 'SELECT SUM(file_size) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] . ' AND scan_status > 0' );
473
+
474
+ if ( ! $scan = cerber_get_scan() ) {
475
+ return false;
476
+ }
477
+
478
+ $update['issues'] = cerber_merge_issues( $scan['issues'], $scan['step_issues'] );
479
+
480
+ return cerber_update_scan( $update );
481
+
482
+ }
483
+
484
+ /**
485
+ * Initialize data structure for a new Scan
486
+ *
487
+ * @param string $mode quick|fool
488
+ *
489
+ * @return array|bool
490
+ */
491
+ function cerber_init_scan( $mode = 'quick' ) {
492
+ cerber_delete_scan();
493
+
494
+ if ( ! $mode ) {
495
+ $mode = 'quick';
496
+ }
497
+
498
+ $data = array();
499
+ $data['mode'] = $mode; // Quick | Full
500
+ $data['id'] = time();
501
+ $data['started'] = $data['id'];
502
+ $data['finished'] = 0;
503
+ $data['aborted'] = 0; // If > 0, the scan has been aborted due to unrecoverable errors
504
+ $data['errors'] = array(); // Any software, DB, CURL, I/O and other system errors - for diagnostic/debugging
505
+ $data['scanned'] = array();
506
+ $data['issues'] = array(); // The list of issues found during the scanning (for end user)
507
+ $data['total'] = array(); // Counters
508
+ $data['total']['issues'] = 0;
509
+ $data['integrity'] = array();
510
+ $data['ip'] = cerber_get_remote_ip();
511
+ $data['cloud'] = lab_is_cloud_request();
512
+ $data['step'] = array();
513
+ $data['next_step'] = 1;
514
+
515
+ if ( ! cerber_update_set( 'scan', $data, $data['id'] ) ) {
516
+
517
+ return false;
518
+ }
519
+
520
+ return $data;
521
+ }
522
+
523
+ /**
524
+ * Return ID for the Scan in progress (the latest scan started)
525
+ *
526
+ * @return bool|integer Scan ID false if no scan in progress (no files to scan)
527
+ */
528
+ function cerber_get_scan_id() {
529
+
530
+ $scan = cerber_get_scan();
531
+
532
+ if ( $scan ) {
533
+ $scan_id = absint( $scan['id'] );
534
+ }
535
+ else {
536
+ $scan_id = false;
537
+ }
538
+
539
+ return $scan_id;
540
+ }
541
+
542
+ /**
543
+ * Return Scan data
544
+ *
545
+ * @param integer $scan_id if not specified the last Scan data is returned
546
+ *
547
+ * @return array|bool
548
+ */
549
+ function cerber_get_scan( $scan_id = null ) {
550
+ global $wpdb;
551
+
552
+ // If no ID is specified look for the latest one
553
+ if ( $scan_id === null && $all = $wpdb->get_col( 'SELECT the_id FROM ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' WHERE the_key = "scan"' ) ) {
554
+ $scan_id = max( $all );
555
+ }
556
+
557
+ if ( ! $scan_id ) {
558
+ return false;
559
+ }
560
+
561
+ return cerber_get_set( 'scan', $scan_id );
562
+
563
+ }
564
+
565
+ /**
566
+ * Save issues (for end user reporting) during the scanning
567
+ *
568
+ * @param string $section
569
+ * @param array $issues
570
+ * @param string $container Top level container for the section
571
+ *
572
+ * @return bool
573
+ */
574
+ function cerber_push_issues( $section, $issues = array(), $container = '' ) {
575
+ if ( empty( $issues ) || empty( $section ) ) {
576
+ return false;
577
+ }
578
+
579
+ $list = array();
580
+
581
+ // Add some details
582
+
583
+ $setype = 0;
584
+
585
+ foreach ( $issues as $issue ) {
586
+
587
+ $data = array();
588
+
589
+ if ( isset( $issue['file'] ) ) {
590
+
591
+ $file = $issue['file'];
592
+ $fsize = $file['file_size'];
593
+ $data['size'] = ( $fsize < 1024 ) ? $fsize . ' Bytes' : size_format( $fsize );
594
+ $ftime = $file['file_mtime'];
595
+ $data['time'] = cerber_auto_date( $ftime );
596
+ $data['name'] = $file['file_name'];
597
+ $data['type'] = $file['file_type'];
598
+
599
+ // Is file can be deleted safely
600
+
601
+ $allowed = 0;
602
+ if ( $file['file_type'] != CERBER_FT_CONF ) {
603
+ if ( ! empty( $file['fd_allowed'] ) ) {
604
+ if ( cerber_can_be_deleted( $file['file_name'] ) ) {
605
+ $allowed = 1;
606
+ }
607
+ }
608
+ }
609
+
610
+ $data['fd_allowed'] = $allowed;
611
+
612
+ }
613
+ elseif ( isset( $issue['plugin'] ) ) {
614
+ $data['version'] = $issue['plugin']['Version'];
615
+ $setype = 3;
616
+ }
617
+ elseif ( isset( $issue['theme'] ) ) {
618
+ $data['version'] = $issue['theme']->get('Version');
619
+ $setype = 2;
620
+ }
621
+ elseif ( isset( $issue['wordpress'] ) ) {
622
+ $data['version'] = $issue['wordpress'];
623
+ $setype = 1;
624
+ }
625
+
626
+ $issue_type = $issue[0];
627
+ $details = ( isset( $issue[2] ) ) ? $issue[2] : '';
628
+ $short_name = ( isset( $issue[1] ) ) ? $issue[1] : '';
629
+
630
+ $list[] = array(
631
+ $issue_type, // Type of issue
632
+ $short_name, // Object name
633
+ cerber_calculate_risk( $issue ),
634
+ 'data' => $data,
635
+ 'details' => $details,
636
+ );
637
+ }
638
+
639
+ // Some stuff for better end-user report displaying
640
+
641
+ if ( $section == 'WordPress' ) {
642
+ $container = 'crb-wordpress';
643
+ }
644
+ if ( $section == 'Uploads folder' ) {
645
+ $setype = 20;
646
+ }
647
+ if ( $section == 'Unattended files' ) {
648
+ $container = 'crb-unattended';
649
+ $setype = 21;
650
+ }
651
+
652
+ // TODO: $container Should be refactored
653
+
654
+ if ( ! $container ) {
655
+ //$container = sha1( $section );
656
+ if ( isset( $issues[0]['file'] ) ) {
657
+ switch ( $issues[0]['file']['file_type'] ) {
658
+ case CERBER_FT_WP:
659
+ case CERBER_FT_CONF:
660
+ $container = 'crb-wordpress';
661
+ break;
662
+ case CERBER_FT_PLUGIN:
663
+ $container = 'crb-plugins';
664
+ break;
665
+ case CERBER_FT_THEME:
666
+ $container = 'crb-themes';
667
+ break;
668
+ case CERBER_FT_UPLOAD:
669
+ $container = 'crb-uploads';
670
+ break;
671
+ case CERBER_FT_MUP:
672
+ $container = 'crb-muplugins';
673
+ break;
674
+ case CERBER_FT_DRIN:
675
+ $container = 'crb-dropins';
676
+ break;
677
+ default:
678
+ $container = 'crb-unattended';
679
+ }
680
+ }
681
+ else {
682
+ if ( $section == 'WordPress' ) {
683
+ $container = 'crb-wordpress';
684
+ }
685
+ }
686
+ }
687
+
688
+ if (!$container) {
689
+ $container = 'crb-unattended';
690
+ $setype = 2;
691
+ }
692
+
693
+
694
+ // Save all
695
+
696
+ // TODO: save section issues as a separate row with cerber_update_set()
697
+
698
+ $id = sha1( $section );
699
+
700
+ $scan = cerber_get_scan();
701
+
702
+ $scan['step_issues'] = cerber_merge_issues( $scan['step_issues'], array(
703
+ $id =>
704
+ array(
705
+ 'name' => $section,
706
+ 'container' => $container,
707
+ 'setype' => $setype,
708
+ 'issues' => $list,
709
+ )
710
+ ) );
711
+
712
+ $ret = cerber_update_scan( $scan );
713
+
714
+ if ( ! $ret ) {
715
+ cerber_log_scan_error( 'Unable to save the list of issues!' );
716
+ }
717
+
718
+ return $ret;
719
+ }
720
+
721
+ /**
722
+ * Indicator for end-user
723
+ *
724
+ * @param $issue
725
+ *
726
+ * @return int|mixed
727
+ */
728
+ function cerber_calculate_risk( $issue ) {
729
+ $risk = array( 1 => 0, 10 => 1, 11 => 2, 5 => 3, 6 => 3, 7 => 3, 8 => 3);
730
+
731
+ if ( isset( $risk[ $issue[0] ] ) ) {
732
+ return $risk[ $issue[0] ];
733
+ }
734
+
735
+ $file = $issue['file'];
736
+
737
+ // Small junk files?
738
+ $size_factor = null;
739
+ if ( isset( $file['file_size'] ) ) {
740
+ if ( $file['file_size'] < 10 ) {
741
+ $size_factor = 1;
742
+ }
743
+ elseif ( $file['file_size'] < 30 ) {
744
+ $size_factor = 2;
745
+ }
746
+ }
747
+
748
+ // TODO: convert into a formula with metrics
749
+ switch ( $issue[0] ) {
750
+ case 14:
751
+ if ( $size_factor ) {
752
+ return $size_factor;
753
+ }
754
+ return 2;
755
+ break;
756
+ case CERBER_EXC:
757
+ if ( $size_factor ) {
758
+ return $size_factor;
759
+ }
760
+ if ( $file['file_type'] == CERBER_FT_UPLOAD ) {
761
+ return 3;
762
+ }
763
+ return 2;
764
+ break;
765
+ case 15:
766
+ case CERBER_USF:
767
+ case CERBER_SCF:
768
+ case CERBER_PMC:
769
+ if ( $size_factor ) {
770
+ return $size_factor;
771
+ }
772
+
773
+ if ( ! cerber_detect_exec_extension( $file['file_name'], array( 'js', 'inc' ) ) ) {
774
+ return 2;
775
+ }
776
+
777
+ return 3;
778
+ break;
779
+ }
780
+
781
+ return 1;
782
+ }
783
+
784
+ function cerber_get_risk_desc() {
785
+ return array(
786
+ '',
787
+ 'Low',
788
+ 'Medium',
789
+ 'High',
790
+ );
791
+ }
792
+
793
+ function cerber_get_issue_desc( $id = null ) {
794
+ $issues = array(
795
+ 0 => 'To be scanned',
796
+ 1 => __( 'Verified' ),
797
+ 5 => __( 'Integrity data not found', 'wp-cerber' ),
798
+ 6 => __( 'Unable to check the integrity of the plugin due to a network error', 'wp-cerber' ),
799
+ 7 => __( 'Unable to check the integrity of WordPress files due to a network error', 'wp-cerber' ),
800
+ 8 => __( 'Unable to check the integrity of the theme due to a network error', 'wp-cerber' ),
801
+
802
+ 10 => __( "Local file doesn't exist", 'wp-cerber' ),
803
+ 11 => 'No local hash found',
804
+ 13 => __( 'Unable to process file', 'wp-cerber' ),
805
+ 14 => __( 'Unable to open file', 'wp-cerber' ),
806
+ 15 => __( 'Content has been modified', 'wp-cerber' ),
807
+
808
+ CERBER_SCF => __( 'Suspicious code found', 'wp-cerber' ),
809
+ CERBER_PMC => __( 'Potentially malicious code found', 'wp-cerber' ),
810
+ CERBER_USF => __( 'Unattended suspicious file', 'wp-cerber' ),
811
+ CERBER_EXC => __( 'Executable code found', 'wp-cerber' ),
812
+
813
+ CERBER_UXT => __( 'Unwanted extension', 'wp-cerber' ),
814
+ );
815
+
816
+ if ( $id !== null ) {
817
+ return $issues[ $id ];
818
+ }
819
+
820
+ return $issues;
821
+ }
822
+
823
+
824
+ /**
825
+ * Merge two lists of issues in a correct way
826
+ *
827
+ * @param $issues1
828
+ * @param $issues2
829
+ *
830
+ * @return array
831
+ */
832
+ function cerber_merge_issues( $issues1, $issues2 ) {
833
+ if ( ! $issues1 ) {
834
+ $issues1 = array();
835
+ }
836
+ foreach ( $issues2 as $id => $item ) {
837
+ if ( ! isset( $issues1[ $id ] ) ) {
838
+ //$issues1[ $id ] = array( 'name' => $item['name'], 'issues' => $item['issues'] );
839
+ $issues1[ $id ] = $item;
840
+ }
841
+ else {
842
+ $issues1[ $id ]['issues'] = array_merge( $issues1[ $id ]['issues'], $item['issues'] );
843
+ }
844
+ }
845
+
846
+ return $issues1;
847
+ }
848
+
849
+ /**
850
+ * Update scan data by simply merging values in array
851
+ *
852
+ * @param array $new_data
853
+ *
854
+ * @return bool
855
+ */
856
+ function cerber_update_scan( $new_data ) {
857
+ if ( ! $old_data = cerber_get_scan() ) {
858
+ return false;
859
+ }
860
+
861
+ if ( isset( $new_data['id'] ) ) {
862
+ unset( $new_data['id'] );
863
+ }
864
+ $data = array_merge( $old_data, $new_data );
865
+
866
+ return cerber_update_set( 'scan', $data, $old_data['id'] );
867
+ }
868
+
869
+ /**
870
+ * Update scan data and preserve existing keys in array (scan structure)
871
+ *
872
+ * @param array $new_data
873
+ *
874
+ * @return bool
875
+ */
876
+ function cerber_set_scan( $new_data ) {
877
+ if ( ! $scan_data = cerber_get_scan() ) {
878
+ return false;
879
+ }
880
+
881
+ $data = cerber_array_merge_recurively( $scan_data, $new_data );
882
+
883
+ return cerber_update_scan( $data );
884
+ }
885
+
886
+ /**
887
+ * Delete scan results from DB
888
+ *
889
+ * @return bool
890
+ */
891
+ function cerber_delete_scan( $scan_id = null ) {
892
+ if ( ! $scan_id ) {
893
+ $scan_id = cerber_get_scan_id(); // Last scan
894
+ }
895
+ if ( $scan_id && cerber_delete_set( 'scan', $scan_id ) ) {
896
+ //cerber_db_query( 'DELETE FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan_id );
897
+ cerber_db_query( 'DELETE FROM ' . CERBER_SCAN_TABLE );
898
+ cerber_delete_set( 'tmp_verify_plugins', $scan_id );
899
+
900
+ return true;
901
+ }
902
+
903
+ return false;
904
+ }
905
+
906
+ /**
907
+ * Log system errors for the current scan
908
+ *
909
+ * @param string $msg
910
+ *
911
+ * @return bool
912
+ */
913
+ function cerber_log_scan_error( $msg = '' ) {
914
+
915
+ $scan = cerber_get_scan();
916
+ $scan['errors'][] = $msg;
917
+
918
+ return cerber_update_scan( array( 'errors' => $scan['errors'] ) );
919
+
920
+ }
921
+
922
+ /**
923
+ * Check the integrity of installed plugins
924
+ *
925
+ * @return int The number of plugins to process
926
+ */
927
+ function cerber_verify_plugins() {
928
+ if ( ! $scan_id = cerber_get_scan_id() ) {
929
+ return 0;
930
+ }
931
+
932
+ $key = 'tmp_verify_plugins';
933
+ $done = cerber_get_set( $key, $scan_id );
934
+
935
+ $plugins = get_plugins();
936
+
937
+ if ( $done ) {
938
+ $to_scan = array_diff( array_keys( $plugins ), array_keys( $done ) );
939
+ }
940
+ else {
941
+ $done = array();
942
+ $to_scan = array_keys( $plugins );
943
+ }
944
+
945
+ if ( empty( $to_scan ) ) {
946
+ return 0;
947
+ }
948
+
949
+ //$plugins_dir = mb_substr( cerber_get_plugins_dir(), mb_strlen( ABSPATH ) ) . DIRECTORY_SEPARATOR;
950
+ $plugins_dir = cerber_get_plugins_dir() . DIRECTORY_SEPARATOR;
951
+ $file_count = 0;
952
+ $bytes = 0;
953
+
954
+ $max_files = 100;
955
+
956
+ while ( ! empty( $to_scan ) ) {
957
+ $plugin = array_shift( $to_scan );
958
+ $issues = array();
959
+
960
+ if ( false === strpos( $plugin, '/' ) ) {
961
+ // A single-file plugin with no plugin folder (no hash on wordpress.org)
962
+ $done[ $plugin ] = 1;
963
+
964
+ if ( $plugin == 'hello.php' ) { // It's checked with WP hash
965
+ continue;
966
+ }
967
+
968
+ $plugin_folder = $plugin;
969
+ /*
970
+ $issues[] = array( 5, '', 'plugin' => $plugins[ $plugin ] );
971
+ if ( $issues ) {
972
+ cerber_push_issues( $plugins[ $plugin ]['Name'], $issues, 'crb-plugins' );
973
+ }
974
+ continue;
975
+ */
976
+ }
977
+ else {
978
+ $plugin_folder = dirname( $plugin );
979
+ }
980
+
981
+ $plugin_hash = cerber_get_plugin_hash( $plugin_folder, $plugins[ $plugin ]['Version'] );
982
+
983
+ if ( $plugin_hash && ! is_wp_error( $plugin_hash ) ) {
984
+ foreach ( $plugin_hash->files as $file => $hash ) {
985
+
986
+ if ( ! cerber_is_file_type_scan( $file ) ) {
987
+ continue;
988
+ }
989
+
990
+ $file_name = $plugins_dir . $plugin_folder . DIRECTORY_SEPARATOR . $file;
991
+ $file_name_hash = sha1( $file_name );
992
+ $where = 'scan_id = ' . $scan_id . ' AND file_name_hash = "' . $file_name_hash . '"';
993
+ $local_file = cerber_db_get_row( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE ' . $where );
994
+
995
+ if ( ! $local_file ) {
996
+ $issues[] = array( 10, DIRECTORY_SEPARATOR . $plugin_folder . DIRECTORY_SEPARATOR . $file );
997
+ continue;
998
+ }
999
+
1000
+ $short_name = cerber_get_short_name( $local_file );
1001
+
1002
+ if ( empty( $local_file['file_hash'] ) ) {
1003
+ $issues[] = array( 11, $short_name, 'file' => $local_file );
1004
+ continue;
1005
+ }
1006
+ $hash_match = 0;
1007
+ if ( isset( $hash->sha256 ) ) {
1008
+ $repo_hash = $hash->sha256;
1009
+ if ( is_array( $repo_hash ) ) {
1010
+ $file_hash_repo = 'REPO provides multiple values, none match';
1011
+ foreach ( $repo_hash as $item ) {
1012
+ if ( $local_file['file_hash'] == $item ) {
1013
+ $hash_match = 1;
1014
+ $file_hash_repo = $item;
1015
+ break;
1016
+ }
1017
+ }
1018
+ }
1019
+ else {
1020
+ $file_hash_repo = $repo_hash;
1021
+ if ( $local_file['file_hash'] == $repo_hash ) {
1022
+ $hash_match = 1;
1023
+ }
1024
+ }
1025
+ }
1026
+ else {
1027
+ $file_hash_repo = 'SHA256 hash not found';
1028
+ }
1029
+
1030
+ if ( $hash_match ) {
1031
+ $status = 1;
1032
+ }
1033
+ else {
1034
+ $status = 15;
1035
+ $issues[] = array( $status, $short_name, 'file' => $local_file );
1036
+ }
1037
+
1038
+ cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET file_hash_repo = "' . $file_hash_repo . '", hash_match = ' . $hash_match . ', scan_status = ' . $status . ' WHERE ' . $where );
1039
+
1040
+ $file_count ++;
1041
+ $bytes += absint( $local_file['file_size'] );
1042
+
1043
+ }
1044
+ $verified = 1;
1045
+ }
1046
+ else {
1047
+ $verified = cerber_verify_plugin( $plugin_folder, $plugins[ $plugin ] );
1048
+ }
1049
+
1050
+ if ( ! $verified ) {
1051
+ $verified = 0;
1052
+ $status = 5;
1053
+ }
1054
+ else {
1055
+ $verified = 1;
1056
+ $status = 1;
1057
+ }
1058
+ $issues[] = array( $status, '', 'plugin' => $plugins[ $plugin ] );
1059
+
1060
+ if ( $issues ) {
1061
+ cerber_push_issues( $plugins[ $plugin ]['Name'], $issues, 'crb-plugins' );
1062
+ }
1063
+
1064
+ cerber_set_scan( array( 'integrity' => array( 'plugins' => array( $plugin => $verified ) ) ) );
1065
+
1066
+ $done[ $plugin ] = 1;
1067
+
1068
+ if ( $file_count > $max_files || cerber_exec_timer() ) {
1069
+ break;
1070
+ }
1071
+
1072
+ }
1073
+
1074
+ cerber_update_set( $key, $done, $scan_id );
1075
+
1076
+ return count( $to_scan );
1077
+ }
1078
+
1079
+ /**
1080
+ * Checking the integrity of a plugin if there is no hash on wordpress.org
1081
+ *
1082
+ * @param string $plugin_folder Just folder, no full path, no slashes
1083
+ * @param array $plugin_data
1084
+ *
1085
+ * @return bool If true the plugin was verified by using an alternative source of hash
1086
+ */
1087
+ function cerber_verify_plugin( $plugin_folder, $plugin_data ) {
1088
+ $ret = false;
1089
+ $hash = null;
1090
+
1091
+ // Is there local hash?
1092
+
1093
+ $hash = cerber_get_local_hash( CRB_HASH_PLUGIN . sha1( $plugin_data['Name'] . $plugin_folder ), $plugin_data['Version'] );
1094
+
1095
+ // Possibly remote hash?
1096
+
1097
+ if ( ! $hash ) {
1098
+
1099
+ $hash_url = null;
1100
+
1101
+ if ( $plugin_folder == 'wp-cerber' ) {
1102
+ $hash_url = 'https://my.wpcerber.com/downloads/checksums/' . $plugin_data['Version'] . '.json';
1103
+ }
1104
+
1105
+ if ( $hash_url ) {
1106
+ $response = cerber_obtain_hash( $hash_url );
1107
+ if ( ! $response['error'] ) {
1108
+ $hash = get_object_vars( $response['server_data'] );
1109
+ }
1110
+ else {
1111
+ if ( ! empty( $response['curl_error'] ) ) {
1112
+ $msg = 'CURL ' . $response['curl_error'];
1113
+ }
1114
+ elseif ( ! empty( $response['json_error'] ) ) {
1115
+ $msg = 'JSON ' . $response['json_error'];
1116
+ }
1117
+ else {
1118
+ $msg = 'Unknown network error';
1119
+ }
1120
+ //$ret = new WP_Error( 'net_issue', $msg );
1121
+ cerber_log_scan_error( $msg );
1122
+ }
1123
+
1124
+ }
1125
+ }
1126
+
1127
+ if ( $hash ) {
1128
+ //$local_prefix = cerber_get_plugins_dir() . DIRECTORY_SEPARATOR . $plugin_folder . DIRECTORY_SEPARATOR;
1129
+ $local_prefix = cerber_get_plugins_dir() . DIRECTORY_SEPARATOR;
1130
+ if ( ! strpos( $plugin_folder, '.' ) ) { // Not a single file plugin
1131
+ $local_prefix .= $plugin_folder . DIRECTORY_SEPARATOR;
1132
+ }
1133
+ $issues = cerber_verify_files( $hash, 'file_hash', $local_prefix );
1134
+ cerber_push_issues( $plugin_data['Name'], $issues, 'crb-plugins' );
1135
+ $ret = true;
1136
+ }
1137
+
1138
+ return $ret;
1139
+ }
1140
+
1141
+ /**
1142
+ * Verifying the integrity of the WordPress
1143
+ *
1144
+ * @return int
1145
+ */
1146
+ function cerber_verify_wp() {
1147
+ $wp_version = cerber_get_wp_version();
1148
+
1149
+ $ret = 0;
1150
+ $wp_hash = cerber_get_wp_hash();
1151
+ if ( ! is_wp_error( $wp_hash ) ) {
1152
+ $data = get_object_vars( $wp_hash->checksums );
1153
+
1154
+ // In case the default name 'plugins' of the plugins folder has been changed
1155
+ $wp_plugins_dir = basename( cerber_get_plugins_dir() );
1156
+ if ( $wp_plugins_dir != 'plugins' ) {
1157
+ $new_data = array();
1158
+ foreach ( $data as $key => $item ) {
1159
+ if ( 0 === strpos( $key, 'wp-content/plugins/' ) ) {
1160
+ $new_data[ 'wp-content/' . $wp_plugins_dir . '/' . substr( $key, 19 ) ] = $item;
1161
+ }
1162
+ else {
1163
+ $new_data[ $key ] = $item;
1164
+ }
1165
+ }
1166
+ $data = $new_data;
1167
+ }
1168
+
1169
+ // In case the default name 'wp-content' of the CONTENT folder has been changed
1170
+ //$wp_content_dir = mb_substr( dirname( cerber_get_plugins_dir() ), mb_strlen( ABSPATH ) );
1171
+ $wp_content_dir = basename( dirname( cerber_get_plugins_dir() ) );
1172
+ if ( $wp_content_dir != 'wp-content' ) {
1173
+ $new_data = array();
1174
+ foreach ( $data as $key => $item ) {
1175
+ if ( 0 === strpos( $key, 'wp-content/' ) ) {
1176
+ $new_data[ $wp_content_dir . '/' . substr( $key, 11 ) ] = $item;
1177
+ }
1178
+ else {
1179
+ $new_data[ $key ] = $item;
1180
+ }
1181
+ }
1182
+ $data = $new_data;
1183
+ }
1184
+
1185
+ $verified = 1;
1186
+ cerber_push_issues( 'WordPress', array( array( 1, 'wordpress' => $wp_version ) ) );
1187
+ $issues = cerber_verify_files( $data, 'file_md5', ABSPATH, array(CERBER_FT_PLUGIN, CERBER_FT_THEME), CERBER_FT_WP, '_crb_not_existing' );
1188
+ cerber_push_issues( 'WordPress', $issues );
1189
+ }
1190
+ else {
1191
+ cerber_push_issues( 'WordPress', array( array( 7, 'wordpress' => $wp_version ) ) );
1192
+ $verified = 0;
1193
+ }
1194
+
1195
+ cerber_set_scan( array( 'integrity' => array( 'wordpress' => $verified ) ) );
1196
+
1197
+ return $ret;
1198
+ }
1199
+
1200
+ // Themes and plugin will be checked separately, not as a part of WP
1201
+ function _crb_not_existing( $file_name ) {
1202
+ static $themes_prefix, $plugins_prefix;
1203
+
1204
+ if ( $themes_prefix == null ) {
1205
+ $themes_prefix = basename( dirname( cerber_get_plugins_dir() ) ) . '/themes/';
1206
+ }
1207
+ if ( 0 === strpos( $file_name, $themes_prefix ) ) {
1208
+ return false;
1209
+ }
1210
+
1211
+ if ( $plugins_prefix == null ) {
1212
+ $plugins_prefix = basename( dirname( cerber_get_plugins_dir() ) ) . '/' . basename( cerber_get_plugins_dir() ) . '/';
1213
+ }
1214
+ if ( 0 === strpos( $file_name, $plugins_prefix ) ) {
1215
+ return false;
1216
+ }
1217
+
1218
+ return true;
1219
+ }
1220
+
1221
+ /**
1222
+ * Verifying the integrity of the themes
1223
+ *
1224
+ * @return int
1225
+ */
1226
+ function cerber_verify_themes() {
1227
+
1228
+ $themes = wp_get_themes();
1229
+
1230
+ foreach ( $themes as $theme_folder => $theme ) {
1231
+ $issues = array();
1232
+ $hash = cerber_get_theme_hash( $theme_folder, $theme );
1233
+
1234
+ if ( $hash && ! is_wp_error( $hash ) ) {
1235
+ $local_prefix = cerber_get_themes_dir() . DIRECTORY_SEPARATOR . $theme_folder . DIRECTORY_SEPARATOR;
1236
+ $issues = cerber_verify_files( $hash, 'file_hash', $local_prefix, null, CERBER_FT_THEME );
1237
+ //cerber_push_issues( $theme->get( 'Name' ), $issues );
1238
+ $verified = 1;
1239
+ $status = 1;
1240
+ }
1241
+ else {
1242
+ if ( is_wp_error( $hash ) ) {
1243
+ cerber_log_scan_error( $hash->get_error_message() );
1244
+ }
1245
+ $verified = 0;
1246
+ $status = 5;
1247
+ }
1248
+
1249
+ $issues[] = array( $status, $theme_folder, 'theme' => $theme );
1250
+
1251
+ cerber_set_scan( array( 'integrity' => array( 'themes' => array( $theme_folder => $verified ) ) ) );
1252
+
1253
+ if ( $issues ) {
1254
+ cerber_push_issues( $theme->get( 'Name' ), $issues, 'crb-themes' );
1255
+ }
1256
+ }
1257
+
1258
+ //$scan_id = cerber_get_scan_id();
1259
+ //cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET scan_status = 5 WHERE scan_id = ' . $scan_id . ' AND file_type = ' . CERBER_FT_THEME );
1260
+
1261
+ return 0;
1262
+ }
1263
+
1264
+ /**
1265
+ * Inspecting unattended files (remained after integrity checking) for traces of malware
1266
+ *
1267
+ * @return int
1268
+ */
1269
+ function cerber_process_files() {
1270
+
1271
+ if ( ! $scan = cerber_get_scan() ) {
1272
+ return 0;
1273
+ }
1274
+
1275
+ // -------- Plugins data
1276
+
1277
+ $plugins = array();
1278
+ foreach ( get_plugins() as $key => $item ) {
1279
+ if ( $pos = strpos( $key, DIRECTORY_SEPARATOR ) ) {
1280
+ $new_key = substr( $key, 0, strpos( $key, DIRECTORY_SEPARATOR ) );
1281
+ }
1282
+ else {
1283
+ $new_key = $key;
1284
+ }
1285
+
1286
+ $plugins[ $new_key ] = $item;
1287
+ if ( ! empty( $scan['integrity']['plugins'][ $key ] ) ) {
1288
+ $plugins[ $new_key ]['integrity'] = true;
1289
+ }
1290
+ }
1291
+
1292
+ // ---------------------------------------------------------------------------
1293
+
1294
+ // -------- Themes data
1295
+
1296
+ $themes = wp_get_themes();
1297
+
1298
+ // ---------------------------------------------------------------------------
1299
+
1300
+ $can_be_deleted = array( CERBER_FT_UPLOAD, CERBER_FT_CNT, CERBER_FT_OTHER, CERBER_FT_LNG );
1301
+
1302
+ $issues = array();
1303
+ $remain = 0;
1304
+
1305
+ // Prevent hanging
1306
+ if ( $f = cerber_get_set( CRB_LAST_FILE, 0, false ) ) {
1307
+ cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET scan_status = 13 WHERE scan_id = ' . $scan['id'] . ' AND file_name_hash = "' . sha1( $f ) . '"' );
1308
+ cerber_update_set( CRB_LAST_FILE, '', 0, false );
1309
+ $m = cerber_get_issue_desc( 13 ) . ' ' . $f . ' size: ' . @filesize( $f ) . ' bytes';
1310
+ cerber_log_scan_error( $m );
1311
+ }
1312
+
1313
+ if ( $files = cerber_db_get_results( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan['id'] . ' AND scan_status NOT IN (1,14,15)' ) ) {
1314
+
1315
+ if ( $unwanted = crb_get_settings( 'scan_uext' ) ) {
1316
+ $unwanted = array_map( function ( $ext ) {
1317
+ return strtolower( trim( $ext, '. ' ) );
1318
+ }, $unwanted );
1319
+ }
1320
+
1321
+ $x = 0;
1322
+
1323
+ foreach ( $files as $file ) {
1324
+
1325
+ if ( cerber_is_htaccess( $file['file_name'] ) ) { // || $file['file_size'] == 0
1326
+ cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET scan_status = 1 WHERE scan_id = ' . $scan['id'] . ' AND file_name_hash = "' . $file['file_name_hash'] . '"' );
1327
+ continue;
1328
+ }
1329
+
1330
+ $integrity_verified = false;
1331
+ $severity_limit = 6;
1332
+ $status = CERBER_USF;
1333
+ $section = '';
1334
+ $do_not_del = false;
1335
+
1336
+ switch ( $file['file_type'] ) {
1337
+ case CERBER_FT_WP:
1338
+ $section = 'WordPress';
1339
+ $do_not_del = true;
1340
+ if ( ! empty( $scan['integrity']['wordpress'] ) ) {
1341
+ $integrity_verified = true;
1342
+ }
1343
+ break;
1344
+ case CERBER_FT_PLUGIN:
1345
+ $f = cerber_get_file_folder( $file['file_name'], cerber_get_plugins_dir() );
1346
+ if ( isset( $plugins[ $f ] ) ) {
1347
+ $section = $plugins[ $f ]['Name'];
1348
+ $do_not_del = true;
1349
+ if ( ! empty( $plugins[ $f ]['integrity'] ) ) {
1350
+ $integrity_verified = true;
1351
+ }
1352
+ }
1353
+ else {
1354
+ $severity_limit = 1;
1355
+ }
1356
+ break;
1357
+ case CERBER_FT_THEME:
1358
+ $f = cerber_get_file_folder( $file['file_name'], cerber_get_themes_dir() );
1359
+ if ( isset( $themes[ $f ] ) ) {
1360
+ $section = $themes[ $f ]->get( 'Name' ); // WP_Theme object
1361
+ $do_not_del = true;
1362
+ if ( ! empty( $scan['integrity']['themes'][ $f ] ) ) {
1363
+ $integrity_verified = true;
1364
+ }
1365
+ $severity_limit = 5;
1366
+ }
1367
+ else {
1368
+ $severity_limit = 1;
1369
+ }
1370
+ //$status = 1;
1371
+ break;
1372
+ case CERBER_FT_ROOT:
1373
+ if ( cerber_is_htaccess( $file['file_name']) ) {
1374
+ $section = 'WordPress';
1375
+ }
1376
+ if ( ! empty( $scan['integrity']['wordpress'] ) ) {
1377
+ $integrity_verified = true;
1378
+ }
1379
+ $do_not_del = true;
1380
+ $severity_limit = 1;
1381
+ break;
1382
+ case CERBER_FT_CONF:
1383
+ $section = 'WordPress';
1384
+ $do_not_del = true;
1385
+ $severity_limit = 2;
1386
+ break;
1387
+ case CERBER_FT_UPLOAD:
1388
+ $section = 'Uploads folder';
1389
+ $severity_limit = 1;
1390
+ break;
1391
+ case CERBER_FT_MUP:
1392
+ $section = 'Must-use plugins';
1393
+ $do_not_del = true;
1394
+ break;
1395
+ case CERBER_FT_OTHER:
1396
+ $severity_limit = 1;
1397
+ break;
1398
+ case CERBER_FT_DRIN:
1399
+ $section = 'Drop-ins';
1400
+ break;
1401
+ default:
1402
+ $severity_limit = 2;
1403
+ break;
1404
+
1405
+ }
1406
+
1407
+ // Now we're ready to perform inspection
1408
+
1409
+ if ( ! $integrity_verified ) {
1410
+
1411
+ $result = cerber_inspect_file( $file['file_name'] );
1412
+
1413
+ if ( ! is_wp_error( $result ) ) {
1414
+ $status = 1;
1415
+ if ( $result['severity'] == CERBER_MALWR_DETECTED ) {
1416
+ $status = CERBER_PMC;
1417
+ }
1418
+ /*
1419
+ elseif ( $result['severity'] == $severity_limit ) {
1420
+ $status = CERBER_USF;
1421
+ }*/
1422
+ elseif ( $result['severity'] >= $severity_limit ) {
1423
+ if ( $result['severity'] == 1 ) {
1424
+ $status = CERBER_EXC;
1425
+ }
1426
+ else {
1427
+ $status = CERBER_SCF;
1428
+ }
1429
+ }
1430
+ }
1431
+ else {
1432
+ $status = 14;
1433
+ }
1434
+
1435
+ }
1436
+ else {
1437
+ $result = array();
1438
+ }
1439
+
1440
+ // An exception for wp-config.php
1441
+ if ( $status == CERBER_USF && $file['file_type'] == CERBER_FT_CONF ) {
1442
+ $status = 1;
1443
+ }
1444
+
1445
+ // Unwanted extensions
1446
+ if ( $status == 1 && $unwanted ) {
1447
+ $f = strtolower( basename( $file['file_name'] ) );
1448
+ $e = explode( '.', $f );
1449
+ array_shift( $e );
1450
+ if ( $e && array_intersect( $unwanted, $e ) ) {
1451
+ $status = CERBER_UXT;
1452
+ }
1453
+ }
1454
+
1455
+ // There is an issue with file
1456
+ if ( $status > 1 ) {
1457
+
1458
+ if ( ! $section ) {
1459
+ $section = 'Unattended files';
1460
+
1461
+ $len = 0;
1462
+ if ( 0 === strpos( $file['file_name'], rtrim( ABSPATH, '/\\' ) ) ) {
1463
+ $len = mb_strlen( ABSPATH ) - 1;
1464
+ }
1465
+ if ( $len ) {
1466
+ $short_name = mb_substr( $file['file_name'], $len );
1467
+ }
1468
+ else {
1469
+ $short_name = $file['file_name'];
1470
+ }
1471
+ }
1472
+ else {
1473
+ $short_name = cerber_get_short_name( $file );
1474
+ }
1475
+
1476
+ // Is file can be deleted?
1477
+
1478
+ if ( $status >= CERBER_SCF ) {
1479
+ if ( $integrity_verified ) {
1480
+ $file['fd_allowed'] = 1;
1481
+ }
1482
+ elseif ( ! $do_not_del || in_array( $file['file_type'], $can_be_deleted ) ) {
1483
+ $file['fd_allowed'] = 1;
1484
+ }
1485
+ }
1486
+
1487
+ //$short_name = cerber_get_short_name( $file );
1488
+ $issues[ $section ][] = array( $status, $short_name, $result, 'file' => $file );
1489
+
1490
+ }
1491
+
1492
+ cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET scan_status = ' . $status . ' WHERE scan_id = ' . $scan['id'] . ' AND file_name_hash = "' . $file['file_name_hash'] . '"' );
1493
+
1494
+ if ( 0 === ($x % 100) ) {
1495
+ if ( cerber_exec_timer() ) {
1496
+ $remain = 1;
1497
+ break;
1498
+ }
1499
+ }
1500
+ $x++;
1501
+ }
1502
+ }
1503
+
1504
+ if ( $issues ) {
1505
+ foreach ( $issues as $section => $list ) {
1506
+ cerber_push_issues( $section, $list );
1507
+ }
1508
+ }
1509
+
1510
+ return $remain;
1511
+ }
1512
+
1513
+ /**
1514
+ * Scan a file for suspicious and malicious code
1515
+ *
1516
+ * @param string $file_name
1517
+ *
1518
+ * @return array|bool|WP_Error
1519
+ */
1520
+ function cerber_inspect_file( $file_name = '' ) {
1521
+ global $cerber_scan_mode, $wp_cerber;
1522
+
1523
+ if ( !@is_file( $file_name ) ) {
1524
+ return false;
1525
+ }
1526
+
1527
+ if ( ! cerber_check_extension( $file_name, array( 'php', 'inc', 'phtm', 'phtml', 'phps', 'php2', 'php3', 'php4', 'php5', 'php6', 'php7' ) ) ) {
1528
+ $php = false;
1529
+
1530
+ if ( $cerber_scan_mode == 'full' ) {
1531
+ // Try to find an PHP open tag in the content
1532
+ if ( $f = @fopen( $file_name, 'r' ) ) {
1533
+ $str = fread( $f, 10000 );
1534
+ if ( false !== strrpos( $str, '<?php' ) ) {
1535
+ $php = true;
1536
+ }
1537
+ fclose( $f );
1538
+ }
1539
+ else {
1540
+ cerber_log_scan_error( cerber_scan_msg( 0, $file_name ) );
1541
+ }
1542
+ }
1543
+
1544
+ if ( ! $php ) {
1545
+ return array( 'severity' => 0 );
1546
+ }
1547
+ }
1548
+
1549
+ cerber_update_set( CRB_LAST_FILE, $file_name, 0, false );
1550
+ $result = cerber_inspect_php( $file_name );
1551
+ cerber_update_set( CRB_LAST_FILE, '', 0, false );
1552
+
1553
+ if ( is_wp_error( $result ) ) {
1554
+ cerber_log_scan_error( $result->get_error_message() );
1555
+ }
1556
+
1557
+ return $result;
1558
+ }
1559
+
1560
+ /**
1561
+ * Scan a file for suspicious and malicious PHP code
1562
+ *
1563
+ * @param string $file_name
1564
+ *
1565
+ * @return array|bool|WP_Error
1566
+ */
1567
+ function cerber_inspect_php( $file_name = '' ) {
1568
+ if ( ! $content = @file_get_contents( $file_name ) ) {
1569
+ return new WP_Error( 'cerber-file', cerber_scan_msg( 0, $file_name ) );
1570
+ }
1571
+
1572
+ $important = array( T_STRING, T_EVAL );
1573
+
1574
+ $tokens = token_get_all( $content );
1575
+ unset( $content );
1576
+ if ( ! $tokens ) {
1577
+ return array( 'severity' => 0 ); // weird
1578
+ }
1579
+
1580
+ $code_found = 0; // Any PHP code in the file = 1
1581
+ $severity = array();
1582
+ $xdata = array();
1583
+ $pos = array();
1584
+ $open = null;
1585
+ $list = cerber_get_unsafe();
1586
+
1587
+ foreach ( $tokens as $token ) {
1588
+ if ( ! is_array( $token ) ) {
1589
+ continue;
1590
+ }
1591
+ if ( in_array( $token[0], $important ) ) {
1592
+ $code_found = 1;
1593
+ if ( isset( $list[ $token[1] ] ) ) {
1594
+ $xdata[] = array( 1, $token[1], $token[2], $token[0] );
1595
+ $severity[] = $list[ $token[1] ][0];
1596
+ }
1597
+ }
1598
+ if ( $token[0] == T_OPEN_TAG ) {
1599
+ $open = $token[2] - 1;
1600
+ }
1601
+ if ( $open && ( $token[0] == T_CLOSE_TAG ) ) {
1602
+ $pos[] = array( $open, $token[2] - 1 );
1603
+ $open = null;
1604
+ }
1605
+ }
1606
+ if ( $open !== null ) { // No closing tag till the end of the file
1607
+ $pos[] = array( $open, null );
1608
+ }
1609
+
1610
+ if ( empty( $pos ) ) {
1611
+ return false;
1612
+ }
1613
+ if ( ! $lines = @file( $file_name ) ) {
1614
+ return new WP_Error( 'cerber-file', cerber_scan_msg( 0, $file_name ) );
1615
+ }
1616
+
1617
+ $code = array();
1618
+ $last = count( $pos ) - 1;
1619
+
1620
+ foreach ( $pos as $k => $p ) {
1621
+ if ( $last == $k ) {
1622
+ $length = null;
1623
+ }
1624
+ else {
1625
+ $length = $p[1] - $p[0] + 1;
1626
+ }
1627
+ $code = $code + array_slice( $lines, $p[0], $length, true );
1628
+ }
1629
+
1630
+ //unset( $lines );
1631
+ $code = implode( "\n", $code );
1632
+ $code = cerber_remove_comments( $code );
1633
+ $code = preg_replace( "/[\n\s]+/", '', $code );
1634
+
1635
+ if ( ! $code ) {
1636
+ return false;
1637
+ }
1638
+
1639
+ // Check for malicious code patterns
1640
+
1641
+ foreach ( cerber_get_patterns() as $pa ) {
1642
+ if ($pa[1] == 2) { // 2 = REGEX
1643
+ $matches = array();
1644
+ if ( preg_match_all( '/' . $pa[2] . '/i', $code, $matches, PREG_OFFSET_CAPTURE ) ) {
1645
+
1646
+ if ( ! empty( $pa['not_func'] ) && function_exists( $pa['not_func'] ) ) {
1647
+ foreach ( $matches[0] as $key => $match ) {
1648
+ if ( call_user_func( $pa['not_func'], $match[0] ) ) {
1649
+ unset( $matches[0][ $key ] );
1650
+ }
1651
+ }
1652
+ }
1653
+
1654
+ if ( ! empty( $pa['func'] ) && function_exists( $pa['func'] ) ) {
1655
+ foreach ( $matches[0] as $key => $match ) {
1656
+ if ( ! call_user_func( $pa['func'], $match[0] ) ) {
1657
+ unset( $matches[0][ $key ] );
1658
+ }
1659
+ }
1660
+ }
1661
+
1662
+ if ( ! empty( $matches[0] ) ) {
1663
+ $xdata[] = array( 2, $pa[0], array_values( $matches[0] ) );
1664
+ $severity[] = $pa[3];
1665
+ }
1666
+ }
1667
+ }
1668
+ else {
1669
+ if ( false !== stripos( $code, $pa[2] ) ) {
1670
+ $xdata[] = array( 2, $pa[0], array( array( $pa[2] ) ) );
1671
+ $severity[] = $pa[3];
1672
+ }
1673
+ }
1674
+ }
1675
+
1676
+ // Try to find line numbers for matches
1677
+ if ( $xdata ) {
1678
+ foreach ( $xdata as $x => $d ) {
1679
+ if ( $d[0] != 2 || ! isset( $d[2] ) ) {
1680
+ continue;
1681
+ }
1682
+ foreach ( $d[2] as $y => $m ) {
1683
+ foreach ( $lines as $i => $line ) {
1684
+ if ( false !== strrpos( $line, $m[0] ) ) {
1685
+ $xdata[ $x ][2][ $y ][2] = $i + 1;
1686
+ break;
1687
+ }
1688
+ }
1689
+ if ( ! isset( $xdata[ $x ][2][ $y ][2] ) ) {
1690
+ $xdata[ $x ][2][ $y ][2] = '?';
1691
+ }
1692
+ }
1693
+ }
1694
+ }
1695
+
1696
+ unset( $lines );
1697
+
1698
+ // An attempt to interpret the results
1699
+
1700
+ $max = 0;
1701
+
1702
+ if ( $severity ) {
1703
+ $malwr_found = false;
1704
+ $malwr_combinations = array( array( 10, 7 ), array( 9, 7 ) );
1705
+ foreach ( $malwr_combinations as $malwr ) {
1706
+ if ( $int = array_intersect( $malwr, $severity ) ) {
1707
+ if ( count( $malwr ) == count( $int ) ) {
1708
+ $malwr_found = true;
1709
+ }
1710
+ }
1711
+ }
1712
+
1713
+ $max = ( $malwr_found ) ? CERBER_MALWR_DETECTED : max( $severity );
1714
+ }
1715
+
1716
+ if ( $code_found && ! $max ) {
1717
+ $max = $code_found;
1718
+ }
1719
+
1720
+ return array( 'severity' => $max, 'xdata' => $xdata );
1721
+
1722
+ }
1723
+
1724
+ /**
1725
+ * Unsafe code tokens
1726
+ *
1727
+ * @return array
1728
+ */
1729
+ function cerber_get_unsafe(){
1730
+ return array(
1731
+ 'system' => array( 10, 'May be used to get/change vital system information or to run arbitrary server software.' ),
1732
+ 'shell_exec' => array(10, 'Executes arbitrary command via shell and returns the complete output as a string.'),
1733
+ 'exec' => array(10, 'Executes arbitrary programs on the web server.'),
1734
+ 'assert' => array(10, 'Allows arbitrary code execution.'),
1735
+ 'passthru' => array(10,'Executes arbitrary programs on the web server and displays raw output.'),
1736
+ 'pcntl_exec' => array(10, 'Executes arbitrary programs on the web server in the current process space.'),
1737
+ 'proc_open' => array(10, 'Executes an arbitrary command on the web server and open file pointers for input/output.'),
1738
+ 'popen' => array(10, 'Opens a process (execute an arbitrary command) file pointer on the web server.'),
1739
+ 'dl' => array(10, 'Loads a PHP extension on the web server at runtime.'),
1740
+ 'eval' => array( 9, 'May be used to execute malicious code on the web server. Pairing with base64_decode function indicates malicious code.' ),
1741
+ 'str_rot13' => array(9, 'Perform the rot13 transform on a string. May be used to obfuscate malware.'),
1742
+ 'base64_decode' => array(7, 'May be used to obfuscate and hinder detection of malicious code. Pairing with eval function indicates malicious code.'),
1743
+ 'socket_create' => array(6, 'Creates a network connection with any remote host. May be used to load malicious code from any web server with no restrictions.'),
1744
+
1745
+ 'hexdec' => array(5, 'Hexadecimal to decimal. May be used to obfuscate malware.'),
1746
+ 'dechex' => array(5, 'Decimal to hexadecimal. May be used to obfuscate malware.'),
1747
+
1748
+ 'chmod' => array(5, 'Changes file access mode.'),
1749
+ 'chown' => array(5, 'Changes file owner.'),
1750
+ 'chgrp' => array(5, 'Changes file group.'),
1751
+ 'symlink' => array(5, 'Creates a symbolic link to the existing file.'),
1752
+ 'unlink' => array(5, 'Deletes a file.'),
1753
+
1754
+ 'gzinflate' => array(4, 'Inflate a deflated string. May be used to obfuscate malware.'),
1755
+ 'gzdeflate' => array(4, 'Deflate a string. May be used to obfuscate malware.'),
1756
+
1757
+ 'curl_exec' => array(4, 'Load external data from any web server. May be used to load malicious code from any web server with no restrictions.'),
1758
+ 'file_get_contents' => array(4, 'Read the entire file into a string. May be used to load malicious code from any web server with no restrictions.'),
1759
+
1760
+ 'wp_remote_request' => array(3, 'Load data from any web server. May be used to load malicious code from an external source.'),
1761
+ 'wp_remote_get' => array(3, 'Load external data from any web server. May be used to load malicious code from an external source.'),
1762
+ 'wp_remote_post' => array(3, 'Upload or download data from/to any web server. May be used to load malicious code from an external source.'),
1763
+ 'wp_safe_remote_post' => array(3, 'Upload or download data from/to any web server. May be used to load malicious code from an external source.'),
1764
+ 'wp_remote_head' => array(3, 'Load data from any web server. May be used to load malicious code from an external source.'),
1765
+
1766
+ 'create_function' => array(2, 'Create an anonymous (lambda-style) function. Deprecated. A native anonymous function must be used instead.'),
1767
+ 'call_user_func' => array(2, 'Call any function given by the first parameter. May be used to run malicious code or hinder code inspection.'),
1768
+ 'call_user_func_array' => array(2, 'Call any function with an array of parameters. May be used to run malicious code or hinder code inspection.'),
1769
+ );
1770
+ }
1771
+
1772
+ /**
1773
+ * Unsafe code patterns/signatures
1774
+ *
1775
+ * @return array
1776
+ */
1777
+ function cerber_get_patterns() {
1778
+ $list = array(
1779
+ array( 'VARF', 2, '\$[a-z0-9\_]+?\((?!\))', 11, 'A variable function call. Usually is used to hinder malware detection.' ), // pattern with function parameter(s): $example(something)
1780
+ array( 'IPV4', 2, '(?:[0-9]{1,3}\.){3}[0-9]{1,3}', 6, 'An external IPv4 address. Can cause data leakage.', 'func' => '_is_ip_external' ),
1781
+ array( 'IPV6', 2, '(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}', 6, 'An external IPv6 address. Can cause data leakage.', 'func' => '_is_ip_external' ),
1782
+ array( 'BCTK', 2, '`[a-z]+`', 10, 'Execute arbitrary command on the web server' ),
1783
+ array( 'PIDT', 3, 'php://input', 6, 'Get data or commands from the Internet. Should be used in trusted or verified software only' ),
1784
+ array( 'NGET', 3, '$_GET', 3, 'Get data or commands from the Internet. Should be used in trusted or verified software only' ),
1785
+ array( 'NPST', 3, '$_POST', 3, 'Get data or commands from the Internet. Should be used in trusted or verified software only' ),
1786
+ array( 'NREQ', 3, '$_REQUEST', 3, 'Get data or commands from the Internet. Should be used in trusted or verified software only' ),
1787
+
1788
+ // Should be in a separate data set for non-php files
1789
+ //array( 'SHL1', 3, '#!/bin/sh', 6, 'Executable shell script' ),
1790
+ );
1791
+ if ( $custom = crb_get_settings( 'scan_cpt' ) ) {
1792
+ foreach ( $custom as $i => $p ) {
1793
+ if ( substr( $p, 0, 1 ) == '{' && substr( $p, - 1 ) == '}' ) {
1794
+ $p = substr( $p, 1, - 1 );
1795
+ $t = 2;
1796
+ }
1797
+ else {
1798
+ $t = 3;
1799
+ }
1800
+ $list[] = array( 'CUS' . $i, $t, $p, 4, __( 'Custom signature found', 'w-cerber' ) );
1801
+ }
1802
+ }
1803
+
1804
+ return $list;
1805
+ }
1806
+
1807
+ function _is_ip_external( $ip ) {
1808
+ if ( is_ip_private( $ip ) ) {
1809
+ return false;
1810
+ }
1811
+ if ( defined( 'DB_HOST' ) && DB_HOST === $ip ) {
1812
+ return false;
1813
+ }
1814
+
1815
+ return true;
1816
+ }
1817
+
1818
+ add_action( 'wp_ajax_cerber_get_strings', function () {
1819
+ cerber_check_ajax();
1820
+ $data = array();
1821
+ $data[1] = cerber_get_unsafe();
1822
+ $list = array();
1823
+ foreach ( cerber_get_patterns() as $p ) {
1824
+ $list[ $p[0] ] = $p[4];
1825
+ }
1826
+ $data[2] = $list;
1827
+ $data['complete'] = 1;
1828
+ echo json_encode( $data );
1829
+
1830
+ wp_die();
1831
+ } );
1832
+
1833
+ /**
1834
+ * Verify a set of file using hash data provided as array of $file_name => $hash
1835
+ *
1836
+ * @param array $hash_data Hash
1837
+ * @param string $field Name of DB table field with local hash
1838
+ * @param string $local_prefix Local filename prefix
1839
+ * @param int $set_type If set, the file type will be set to this value
1840
+ * @param callable $func If a local file doesn't exist it will be saved as an issue if return true
1841
+ *
1842
+ * @return array List of issues found
1843
+ */
1844
+ function cerber_verify_files( $hash_data, $field = 'file_hash', $local_prefix = '', $type_not_in = array(), $set_type = null, $func = null ) {
1845
+ if ( ! $scan = cerber_get_scan() ) {
1846
+ return 0;
1847
+ }
1848
+
1849
+ $set_type = absint( $set_type );
1850
+ $issues = array();
1851
+ $file_count = 0;
1852
+
1853
+ if ( !$func || !function_exists( $func ) ) {
1854
+ $func = null;
1855
+ }
1856
+
1857
+ foreach ( $hash_data as $file_name => $hash ) {
1858
+
1859
+ if ( ! cerber_is_file_type_scan( $file_name ) ) {
1860
+ continue;
1861
+ }
1862
+
1863
+ $file_name_hash = sha1( $local_prefix . $file_name );
1864
+ $where = 'scan_id = ' . $scan['id'] . ' AND file_name_hash = "' . $file_name_hash . '"';
1865
+ /*
1866
+ if ($type_not_in){
1867
+ $type_not_in = array_filter( array_map( 'absint', $type_not_in ) );
1868
+ $where .= ' AND file_type NOT IN (' . implode( ',', $type_not_in ) . ')';
1869
+ }*/
1870
+
1871
+ $local_file = cerber_db_get_row( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE ' . $where );
1872
+
1873
+ if ( ! $local_file ) {
1874
+ if ( $func ) {
1875
+ if ( ! call_user_func( $func, $file_name ) ) {
1876
+ continue;
1877
+ }
1878
+ }
1879
+ $issues[] = array( 10, '/' . ltrim( $file_name, '/' ) );
1880
+ continue;
1881
+ }
1882
+
1883
+ if ( ! empty( $type_not_in ) && in_array( $local_file['file_type'], $type_not_in ) ) {
1884
+ continue;
1885
+ }
1886
+
1887
+ $short_name = cerber_get_short_name( $local_file );
1888
+
1889
+ if ( empty( $local_file[ $field ] ) ) {
1890
+ $issues[] = array( 11, $short_name, 'file' => $local_file );
1891
+ continue;
1892
+ }
1893
+ $hash_match = ( $local_file[ $field ] === $hash ) ? 1 : 0;
1894
+
1895
+ if ( $hash_match ) {
1896
+ $status = 1;
1897
+ }
1898
+ else {
1899
+ $status = 15;
1900
+ $issues[] = array( $status, $short_name, 'file' => $local_file );
1901
+ }
1902
+
1903
+ $file_type = ( ! empty( $set_type ) ) ? $set_type : $local_file['file_type'];
1904
+
1905
+ cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET file_type = ' . $file_type . ', file_hash_repo = "' . $hash . '", hash_match = ' . $hash_match . ', scan_status = ' . $status . ' WHERE ' . $where );
1906
+
1907
+ $file_count ++;
1908
+
1909
+ }
1910
+
1911
+ return $issues;
1912
+ }
1913
+
1914
+ /**
1915
+ * Retrieve hash for a given plugin from wordpress.org
1916
+ *
1917
+ * @param $plugin string Plugin folder
1918
+ * @param $ver string Plugin version
1919
+ * @param $nocache bool If true, do not use data from the local cache (refresh one)
1920
+ *
1921
+ * @return WP_Error|array|mixed
1922
+ */
1923
+ function cerber_get_plugin_hash( $plugin, $ver, $nocache = false ) {
1924
+
1925
+ if ( !$plugin = preg_replace( '/[^a-z\-\d]/i', '', $plugin ) ) {
1926
+ return false;
1927
+ }
1928
+
1929
+ $response = cerber_obtain_hash( 'https://downloads.wordpress.org/plugin-checksums/' . $plugin . '/' . $ver . '.json', $nocache );
1930
+
1931
+ if ( ! $response['error'] ) {
1932
+ return $response['server_data'];
1933
+ }
1934
+
1935
+ if ( $response['http_code'] == 404 ) {
1936
+ $ret = new WP_Error( 'no_remote_hash', 'The plugin is not found on wordpress.org' );
1937
+ }
1938
+ else {
1939
+ if ( ! empty( $response['curl_error'] ) ) {
1940
+ $msg = 'CURL ' . $response['curl_error'];
1941
+ }
1942
+ elseif ( ! empty( $response['json_error'] ) ) {
1943
+ $msg = 'JSON ' . $response['json_error'];
1944
+ }
1945
+ else {
1946
+ $msg = 'Unknown network error';
1947
+ }
1948
+ $ret = new WP_Error( 'net_issue', $msg );
1949
+ cerber_log_scan_error( $msg );
1950
+ }
1951
+
1952
+
1953
+ return $ret;
1954
+
1955
+ }
1956
+
1957
+ /**
1958
+ * @param $theme_folder
1959
+ * @param $theme object WP_Theme
1960
+ *
1961
+ * @return bool|WP_Error|array false if no local hash or theme is not publicly hosted on on the wordpress.org
1962
+ */
1963
+ function cerber_get_theme_hash( $theme_folder, $theme ) {
1964
+
1965
+ if ( $hash = cerber_get_local_hash( CRB_HASH_THEME . sha1( $theme->get( 'Name' ) . $theme_folder ), $theme->get('Version') ) ) {
1966
+ return $hash;
1967
+ }
1968
+
1969
+ // Try to load a reference ZIP archive from wordpress.org
1970
+
1971
+ $tmp_folder = cerber_get_tmp_file_folder();
1972
+ if ( is_wp_error( $tmp_folder ) ) {
1973
+ return $tmp_folder;
1974
+ }
1975
+
1976
+ $tmp_zip_file = $tmp_folder . $theme_folder . '.' . $theme->get( 'Version' ) . '.zip';
1977
+
1978
+ if ( ! $fp = fopen( $tmp_zip_file, 'w' ) ) {
1979
+ return new WP_Error( 'cerber-file', 'Unable to create temporary file ' . $tmp_zip_file );
1980
+ }
1981
+
1982
+ $curl = @curl_init();
1983
+ if ( ! $curl ) {
1984
+ return new WP_Error( 'cerber-curl', 'CURL library is disabled or not installed on this web server.');
1985
+ }
1986
+
1987
+ $url = 'https://downloads.wordpress.org/theme/' . $theme_folder . '.' . $theme->get( 'Version' ) . '.zip';
1988
+
1989
+ curl_setopt_array( $curl, array(
1990
+ CURLOPT_URL => $url,
1991
+ CURLOPT_POST => false,
1992
+ CURLOPT_USERAGENT => 'Cerber Security Plugin',
1993
+ CURLOPT_FILE => $fp,
1994
+ CURLOPT_FAILONERROR => true,
1995
+ CURLOPT_CONNECTTIMEOUT => 5,
1996
+ CURLOPT_TIMEOUT => 25, // including CURLOPT_CONNECTTIMEOUT
1997
+ CURLOPT_DNS_CACHE_TIMEOUT => 3 * 3600,
1998
+ CURLOPT_SSL_VERIFYHOST => 2,
1999
+ CURLOPT_SSL_VERIFYPEER => true,
2000
+ CURLOPT_CAINFO => ABSPATH . WPINC . '/certificates/ca-bundle.crt',
2001
+ ) );
2002
+
2003
+ if ( ! curl_exec( $curl ) ) {
2004
+ $code = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
2005
+ curl_close( $curl );
2006
+ fclose( $fp );
2007
+ unlink( $tmp_zip_file );
2008
+
2009
+ if ( 404 == $code ) {
2010
+ return false; // Nothing serious, should not be logged
2011
+ }
2012
+
2013
+ return new WP_Error( 'cerber-curl', 'Unable to download: ' . $url );
2014
+ }
2015
+
2016
+ curl_close( $curl );
2017
+ fclose( $fp );
2018
+
2019
+ $result = cerber_need_for_hash( $tmp_zip_file, true, time() + DAY_IN_SECONDS );
2020
+ if ( is_wp_error( $result ) ) {
2021
+ return $result;
2022
+ }
2023
+
2024
+ if ( $hash = cerber_get_local_hash( CRB_HASH_THEME . sha1( $theme->get( 'Name' ) . $theme_folder ), $theme->get('Version') ) ) {
2025
+ return $hash;
2026
+ }
2027
+
2028
+ return false;
2029
+ }
2030
+
2031
+ /**
2032
+ * Retrieve MD5 hash from wordpress.org
2033
+ * See also: get_core_checksums();
2034
+ *
2035
+ * @param bool $nocache if true, do not use the local cache
2036
+ *
2037
+ * @return array|object|WP_Error
2038
+ */
2039
+ function cerber_get_wp_hash( $nocache = false ) {
2040
+
2041
+ $wp_version = cerber_get_wp_version();
2042
+
2043
+ $locale = get_locale();
2044
+
2045
+ $response = cerber_obtain_hash( 'https://api.wordpress.org/core/checksums/1.0/?version=' . $wp_version . '&locale=' . $locale, $nocache );
2046
+
2047
+ if ( ! $response['error'] ) {
2048
+ $ret = $response['server_data'];
2049
+ }
2050
+ else {
2051
+ if ( ! empty( $response['curl_error'] ) ) {
2052
+ $msg = 'CURL ' . $response['curl_error'];
2053
+ }
2054
+ elseif ( ! empty( $response['json_error'] ) ) {
2055
+ $msg = 'JSON ' . $response['json_error'];
2056
+ }
2057
+ else {
2058
+ $msg = 'Unknown network error';
2059
+ }
2060
+ $ret = new WP_Error( 'net_issue', $msg );
2061
+ cerber_log_scan_error( $msg );
2062
+ }
2063
+
2064
+ return $ret;
2065
+
2066
+ }
2067
+
2068
+ /**
2069
+ * Download hash from the given URL. Network level.
2070
+ *
2071
+ * @param $url
2072
+ * @param bool $nocache If true, do not use data from the local cache (refresh one)
2073
+ *
2074
+ * @return array|bool
2075
+ */
2076
+ function cerber_obtain_hash( $url, $nocache = false ) {
2077
+
2078
+ $key = 'tmp_hashcache_' . sha1( $url );
2079
+
2080
+ if ( ! $nocache && $cache = cerber_get_set( $key ) ) {
2081
+ return $cache;
2082
+ }
2083
+
2084
+ $ret = array( 'error' => 1 );
2085
+
2086
+ $curl = @curl_init();
2087
+ if ( ! $curl ) {
2088
+ $ret['curl_error'] = 'CURL library is disabled or not installed on this web server.';
2089
+ return $ret;
2090
+ }
2091
+
2092
+ curl_setopt_array( $curl, array(
2093
+ CURLOPT_URL => $url,
2094
+ CURLOPT_POST => false,
2095
+ CURLOPT_USERAGENT => 'Cerber Security Plugin',
2096
+ CURLOPT_RETURNTRANSFER => true,
2097
+ CURLOPT_CONNECTTIMEOUT => 5,
2098
+ CURLOPT_TIMEOUT => 10, // including CURLOPT_CONNECTTIMEOUT
2099
+ CURLOPT_DNS_CACHE_TIMEOUT => 3 * 3600,
2100
+ CURLOPT_SSL_VERIFYHOST => 2,
2101
+ CURLOPT_SSL_VERIFYPEER => true,
2102
+ CURLOPT_CAINFO => ABSPATH . WPINC . '/certificates/ca-bundle.crt',
2103
+ ) );
2104
+
2105
+ $result = curl_exec( $curl );
2106
+
2107
+ $ret['curl_status'] = curl_getinfo( $curl );
2108
+ $http_code = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
2109
+ $ret['http_code'] = $http_code;
2110
+
2111
+ if ( $result ) {
2112
+ if ( 200 === $http_code ) {
2113
+ $ret['server_data'] = json_decode( $result );
2114
+ if ( JSON_ERROR_NONE != json_last_error() ) {
2115
+ $ret['server_data'] = '';
2116
+ $ret['json_error'] = json_last_error();
2117
+ $ret['error'] = json_last_error();
2118
+ }
2119
+ else {
2120
+ $ret['error'] = 0;
2121
+ cerber_update_set( $key, $ret, 0, true, time() + DAY_IN_SECONDS );
2122
+ }
2123
+ }
2124
+ elseif ( 404 === $http_code ) {
2125
+ $ret['curl_error'] = 'Remote server return 404 URL not found';
2126
+ $ret['error'] = $ret['curl_error'];
2127
+ // There is no information about the plugin or this version of the plugin
2128
+ }
2129
+ else {
2130
+ if ( ! $err = curl_error( $curl ) ) {
2131
+ $err = 'Unknown CURL (network) error with code ' . $http_code;
2132
+ }
2133
+ $ret['curl_error'] = $err;
2134
+ $ret['error'] = $err;
2135
+ }
2136
+ }
2137
+ else {
2138
+ if ( ! $err = curl_error( $curl ) ) {
2139
+ $err = 'Unknown CURL (network) error with code ' . $http_code;
2140
+ }
2141
+ $ret['curl_error'] = $err;
2142
+ $ret['error'] = $err;
2143
+ //curl_errno($curl);
2144
+ }
2145
+
2146
+ if ( ! empty( $ret['curl_error'] ) ) {
2147
+ $ret['curl_error'] = 'ERR# ' . curl_errno( $curl ) . ' ' . $ret['curl_error'] . ' for URL: ' . $url;
2148
+ }
2149
+
2150
+ curl_close( $curl );
2151
+
2152
+ return $ret;
2153
+ }
2154
+
2155
+ function cerber_detect_file( $file_name ) {
2156
+ static $upload_dir = null;
2157
+ static $plugin_dir = null;
2158
+ static $theme_dir = null;
2159
+ static $content_dir = null;
2160
+ static $len = null;
2161
+
2162
+ if ( $len === null ) {
2163
+ $len = strlen( ABSPATH );
2164
+ }
2165
+ if ( $content_dir === null ) {
2166
+ //$content_dir = mb_substr( dirname( cerber_get_plugins_dir() ), $len );
2167
+ $content_dir = dirname( cerber_get_plugins_dir() );
2168
+ }
2169
+ if ( $upload_dir === null ) {
2170
+ // TODO: implement this for multisite
2171
+ //$wp_upload_dir = wp_upload_dir();
2172
+ //$upload_dir = mb_substr( $wp_upload_dir['path'], $len );
2173
+ //$upload_dir = $wp_upload_dir['path'];
2174
+ $upload_dir = cerber_get_upload_dir();
2175
+ }
2176
+ if ( $plugin_dir === null ) {
2177
+ //$plugin_dir = mb_substr( cerber_get_plugins_dir(), $len );
2178
+ $plugin_dir = cerber_get_plugins_dir();
2179
+ }
2180
+ if ( $theme_dir === null ) {
2181
+ //$theme_dir = get_theme_root();
2182
+ //$theme_dir = $content_dir . DIRECTORY_SEPARATOR . 'themes';
2183
+ $theme_dir = cerber_get_themes_dir();
2184
+ }
2185
+
2186
+ // Check in a particular order for a better performance
2187
+
2188
+ if ( 0 === strpos( $file_name, ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR ) ) {
2189
+ return CERBER_FT_WP; // WP
2190
+ }
2191
+ if ( 0 === strpos( $file_name, ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR ) ) {
2192
+ return CERBER_FT_WP; // WP
2193
+ }
2194
+
2195
+ if ( 0 === strpos( $file_name, $plugin_dir . DIRECTORY_SEPARATOR ) ) {
2196
+ return CERBER_FT_PLUGIN; // Plugin
2197
+ }
2198
+
2199
+ if ( 0 === strpos( $file_name, $theme_dir . DIRECTORY_SEPARATOR ) ) {
2200
+ return CERBER_FT_THEME; // Theme
2201
+ }
2202
+
2203
+ if ( 0 === strpos( $file_name, $upload_dir . DIRECTORY_SEPARATOR ) ) {
2204
+ return CERBER_FT_UPLOAD; // Upload folder
2205
+ }
2206
+
2207
+ if ( 0 === strpos( $file_name, $content_dir . DIRECTORY_SEPARATOR ) ) {
2208
+ if ( 0 === strpos( $file_name, $content_dir . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR ) ) {
2209
+ return CERBER_FT_LNG; // Translations
2210
+ }
2211
+ if ( 0 === strpos( $file_name, $content_dir . DIRECTORY_SEPARATOR . 'mu-plugins' . DIRECTORY_SEPARATOR ) ) {
2212
+ return CERBER_FT_MUP; // A file in MU plugins folder
2213
+ }
2214
+ if ( $file_name === $content_dir . DIRECTORY_SEPARATOR . 'index.php' ) {
2215
+ return CERBER_FT_WP; // WP
2216
+ }
2217
+
2218
+ if ( cerber_is_dropin( $file_name ) ) {
2219
+ return CERBER_FT_DRIN;
2220
+ }
2221
+
2222
+ return CERBER_FT_CNT; // WP Content
2223
+ }
2224
+
2225
+ if ( strrpos( $file_name, DIRECTORY_SEPARATOR ) === ( $len - 1 ) ) {
2226
+ //if ( strrchr( $file_name, DIRECTORY_SEPARATOR ) === DIRECTORY_SEPARATOR . 'wp-config.php' ) {
2227
+ if ( basename( $file_name ) == 'wp-config.php' ) {
2228
+ return CERBER_FT_CONF;
2229
+ }
2230
+
2231
+ return CERBER_FT_ROOT; // File in the root folder
2232
+ }
2233
+
2234
+ if ( basename( $file_name ) == 'wp-config.php' ) {
2235
+ if ( ! file_exists( ABSPATH . '/wp-config.php' ) ) {
2236
+ return CERBER_FT_CONF;
2237
+ }
2238
+ }
2239
+
2240
+ return CERBER_FT_OTHER; // Some subfolder in the root folder
2241
+
2242
+ }
2243
+
2244
+ function cerber_is_htaccess( $file_name ) {
2245
+ if ( strrchr( $file_name, DIRECTORY_SEPARATOR ) === DIRECTORY_SEPARATOR . '.htaccess' ) {
2246
+ return true;
2247
+ }
2248
+
2249
+ return false;
2250
+ }
2251
+
2252
+ function cerber_is_dropin( $file_name ) {
2253
+ $dropins = _get_dropins();
2254
+ if ( isset( $dropins[ basename( $file_name ) ] ) ) {
2255
+ return true;
2256
+ }
2257
+
2258
+ return false;
2259
+ }
2260
+
2261
+ /**
2262
+ * Return theme or plugin main folder
2263
+ *
2264
+ * @param $file_name
2265
+ * @param $path
2266
+ *
2267
+ * @return string
2268
+ */
2269
+ function cerber_get_file_folder( $file_name, $path ) {
2270
+ $p_start = mb_strlen( $path ) + 1;
2271
+ $folder = mb_substr( $file_name, $p_start );
2272
+ if ( $pos = mb_strpos( $folder, DIRECTORY_SEPARATOR ) ) {
2273
+ $folder = mb_substr( $folder, 0, $pos );
2274
+ }
2275
+
2276
+ return $folder;
2277
+ }
2278
+
2279
+ /**
2280
+ * Prepare and save file data to the DB
2281
+ *
2282
+ * @param array $file A row from the cerber_files table
2283
+ *
2284
+ * @return bool
2285
+ */
2286
+ function cerber_update_file_info( $file ) {
2287
+ static $md5;
2288
+ static $hash;
2289
+
2290
+ if ( $md5 === null ) {
2291
+ $md5 = array( CERBER_FT_WP, CERBER_FT_PLUGIN, CERBER_FT_THEME, CERBER_FT_ROOT );
2292
+ }
2293
+
2294
+ if ( $hash === null ) {
2295
+ $hash = array( CERBER_FT_PLUGIN, CERBER_FT_THEME );
2296
+ }
2297
+
2298
+ $type = cerber_detect_file( $file['file_name'] );
2299
+ $file_name = $file['file_name'];
2300
+
2301
+ // A symbolic link in the content folder? Transform it to a real file name
2302
+ if ( $type == CERBER_FT_CNT && is_link( $file['file_name'] ) ) {
2303
+ $file_name = @readlink( $file['file_name'] );
2304
+ if ( is_dir( $file_name ) ) {
2305
+ $delete_it = true;
2306
+ }
2307
+ else {
2308
+ $delete_it = cerber_db_get_row( 'SELECT COUNT(scan_id) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $file['scan_id'] . ' AND file_name = "' . $file_name . '"' );
2309
+ }
2310
+ if ( $delete_it ) {
2311
+ return cerber_db_query( 'DELETE FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $file['scan_id'] . ' AND file_name_hash = "' . $file['file_name_hash'] . '"' );
2312
+ }
2313
+ }
2314
+
2315
+ $file_hash = '';
2316
+ $file_md5 = '';
2317
+
2318
+ if ( is_readable( $file_name ) ) {
2319
+ if ( in_array( $type, $md5 ) ) {
2320
+ if ( ! $file_md5 = @md5_file( $file_name ) ) {
2321
+ $file_md5 = '';
2322
+ }
2323
+ }
2324
+ if ( in_array( $type, $hash ) ) {
2325
+ if ( ! $file_hash = @hash_file( 'sha256', $file_name ) ) {
2326
+ $file_hash = '';
2327
+ }
2328
+ }
2329
+ }
2330
+ else {
2331
+ cerber_log_scan_error( cerber_scan_msg( 0, $file_name ) );
2332
+ }
2333
+
2334
+ $size = filesize( $file_name );
2335
+ $size = ( is_numeric( $size ) ) ? $size : 0;
2336
+
2337
+ $perms = fileperms( $file_name );
2338
+ $perms = ( is_numeric( $perms ) ) ? $perms : 0;
2339
+
2340
+ $mtime = filemtime( $file_name );
2341
+ $mtime = ( is_numeric( $mtime ) ) ? $mtime : 0;
2342
+
2343
+ $is_writable = ( is_writable( $file_name ) ) ? 1 : 0;
2344
+
2345
+ if ( ! cerber_db_query( 'UPDATE ' . CERBER_SCAN_TABLE . ' SET file_name = "' . $file_name . '", file_hash = "' . $file_hash . '", file_md5 = "' . $file_md5 . '", file_size = ' . $size . ', file_type = ' . $type . ', file_perms = ' . $perms . ', file_writable = ' . $is_writable . ', file_mtime = ' . $mtime .
2346
+ ' WHERE scan_id = ' . $file['scan_id'] . ' AND file_name_hash = "' . $file['file_name_hash'] . '"' ) ) {
2347
+ return false;
2348
+ }
2349
+
2350
+ return true;
2351
+ }
2352
+
2353
+
2354
+ /**
2355
+ * Recursively creates a list of files in a given folder with a given filename pattern
2356
+ *
2357
+ * @param string $root The starting folder with trailing slash
2358
+ * @param string $pattern Pattern for filenames to include
2359
+ * @param callable $function The function to save the list of files that are passed as an array
2360
+ *
2361
+ * @return array The total number of folders and files
2362
+ */
2363
+ function cerber_scan_directory( $root, $pattern = null, $function ) {
2364
+ static $history = array();
2365
+ static $exclude = null;
2366
+
2367
+ // Prevent infinite recursion
2368
+ if ( isset( $history[ $root ] ) ) {
2369
+ return array( 0, 0 );
2370
+ }
2371
+ $history[ $root ] = 1;
2372
+
2373
+ // Must be excluded
2374
+ if ( $exclude === null ) {
2375
+ $exclude = crb_get_settings( 'scan_exclude' );
2376
+ if ( ! $exclude ) {
2377
+ $exclude = array();
2378
+ }
2379
+ $d = cerber_get_the_folder();
2380
+ if ( is_dir( $d ) ) {
2381
+ $exclude[] = $d;
2382
+ }
2383
+ $exclude = array_map( function ( $item ) {
2384
+ return rtrim( $item, '/\\' );
2385
+ }, $exclude );
2386
+ }
2387
+
2388
+ if ( ! $pattern ) {
2389
+ $pattern = '{*,.*}';
2390
+ }
2391
+
2392
+ $dir_counter = 1;
2393
+ $file_counter = 0;
2394
+ $root = rtrim( $root, '/\\' ) . DIRECTORY_SEPARATOR;
2395
+ $list = array();
2396
+
2397
+ if ( $files = glob( $root . $pattern, GLOB_BRACE ) ) {
2398
+ foreach ( $files as $file_name ) {
2399
+ if ( @is_dir( $file_name ) ) {
2400
+ continue;
2401
+ }
2402
+ $file_counter ++;
2403
+ $file_name = str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $file_name );
2404
+ $list[] = $file_name;
2405
+ if ( count( $list ) > 200 ) { // packet size, can affect the DB performance if $function saves file names to the DB
2406
+ call_user_func( $function, $list );
2407
+ $list = array();
2408
+ }
2409
+ }
2410
+ if ( ! empty( $list ) ) {
2411
+ call_user_func( $function, $list );
2412
+ }
2413
+ }
2414
+ elseif ( $files === false ) {
2415
+ cerber_log_scan_error( 'PHP glob got error while accessing ' . $root . $pattern );
2416
+ }
2417
+
2418
+ if ( $dirs = glob( $root . '*', GLOB_ONLYDIR ) ) {
2419
+ foreach ( $dirs as $dir ) {
2420
+ if ( in_array( $dir, $exclude ) ) {
2421
+ continue;
2422
+ }
2423
+ list ( $dc, $fc ) = cerber_scan_directory( $dir, $pattern, $function );
2424
+ $dir_counter += $dc;
2425
+ $file_counter += $fc;
2426
+ }
2427
+ }
2428
+ elseif ( $files === false ) {
2429
+ cerber_log_scan_error( 'PHP glob got error while accessing ' . $root . '*' );
2430
+ }
2431
+
2432
+ return array( $dir_counter, $file_counter );
2433
+ }
2434
+
2435
+ /**
2436
+ * Packet saving of file names
2437
+ *
2438
+ * @param array $list
2439
+ *
2440
+ * @return bool|mysqli_result
2441
+ */
2442
+ function _crb_save_file_names( $list ) {
2443
+ global $cerber_scan_mode;
2444
+ static $scan_id;
2445
+
2446
+ $list = array_filter( $list );
2447
+ if ( empty( $list ) ) {
2448
+ return true;
2449
+ }
2450
+
2451
+ if ( ! isset( $scan_id ) ) {
2452
+ $scan_id = cerber_get_scan_id();
2453
+ if ( ! $scan_id ) {
2454
+ return false;
2455
+ }
2456
+ }
2457
+
2458
+ if ( $cerber_scan_mode == 'full' ) {
2459
+ $scan_mode = 1;
2460
+ }
2461
+ else {
2462
+ $scan_mode = 0;
2463
+ }
2464
+
2465
+ $sql = '';
2466
+
2467
+ foreach ( $list as $filename ) {
2468
+ if ( ! @is_file( $filename ) || ! cerber_is_file_type_scan( $filename ) ) {
2469
+ continue;
2470
+ }
2471
+ $sha1 = sha1( $filename );
2472
+ if ( cerber_db_get_var( 'SELECT COUNT(scan_id) FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan_id . ' AND file_name_hash = "' . $sha1 . '"' ) ) {
2473
+ continue;
2474
+ }
2475
+ $filename = cerber_real_escape( $filename );
2476
+
2477
+ $sql .= '(' . $scan_id . ',' . $scan_mode . ',"' . $sha1 . '","' . $filename . '"),';
2478
+ }
2479
+
2480
+ if ( ! $sql ) {
2481
+ return true;
2482
+ }
2483
+
2484
+ $sql = rtrim( $sql, ',' );
2485
+
2486
+ $ret = cerber_db_query( 'INSERT INTO ' . CERBER_SCAN_TABLE . ' (scan_id, scan_mode, file_name_hash, file_name) VALUES ' . $sql );
2487
+ if ( ! $ret ) {
2488
+ cerber_log_scan_error( 'DB Error occurred while saving filenames' );
2489
+ }
2490
+
2491
+ return $ret;
2492
+ }
2493
+
2494
+ /**
2495
+ * Return true if a given file must be checked (scanned)
2496
+ *
2497
+ * @param $filename
2498
+ *
2499
+ * @return bool
2500
+ */
2501
+ function cerber_is_file_type_scan( $filename ) {
2502
+ global $cerber_scan_mode;
2503
+ static $code = array( 'php', 'inc' );
2504
+
2505
+ if ( $cerber_scan_mode == 'full' ) {
2506
+ return true;
2507
+ }
2508
+ else {
2509
+
2510
+ if ( cerber_check_extension( $filename, $code ) ) {
2511
+ return true;
2512
+ }
2513
+
2514
+ $pos = strrpos( $filename, DIRECTORY_SEPARATOR );
2515
+ if ( $pos ) {
2516
+ $filename = substr( $filename, $pos + 1 );
2517
+ }
2518
+
2519
+ if ( $filename == '.htaccess' ) {
2520
+ return true;
2521
+ }
2522
+
2523
+ return false;
2524
+
2525
+ }
2526
+
2527
+ return false;
2528
+ }
2529
+
2530
+ /**
2531
+ * Check if a filename has an extension from a given list
2532
+ *
2533
+ * @param $filename
2534
+ * @param array $ext_list
2535
+ *
2536
+ * @return bool
2537
+ */
2538
+ function cerber_check_extension( $filename, $ext_list = array() ) {
2539
+ if ( ! is_array( $ext_list ) || empty( $ext_list ) ) {
2540
+ return false;
2541
+ }
2542
+
2543
+ //$d = cerber_detect_exec_extension();
2544
+
2545
+ $pos = mb_strrpos( $filename, DIRECTORY_SEPARATOR );
2546
+ if ( $pos ) {
2547
+ $filename = mb_substr( $filename, $pos + 1 );
2548
+ }
2549
+
2550
+ $pos = mb_strpos( $filename, '.' );
2551
+ if (!$pos) {
2552
+ return false;
2553
+ }
2554
+
2555
+ $ext = mb_substr( $filename, $pos + 1 );
2556
+ $ext = strtolower( $ext );
2557
+
2558
+ // A normal, single extension
2559
+
2560
+ if ( in_array( $ext, $ext_list ) ) {
2561
+ return true;
2562
+ }
2563
+
2564
+ // No more additional extensions
2565
+
2566
+ if ( substr_count( $ext, '.' ) == 0 ) {
2567
+ return false;
2568
+ }
2569
+
2570
+ // Multiple "extensions"
2571
+
2572
+ $last = substr( $ext, strrpos( $ext, '.' ) + 1 );
2573
+ if ( in_array( $last, $ext_list ) ) {
2574
+ return true;
2575
+ }
2576
+ $first = substr( $ext, 0, strpos( $ext, '.' ) - 1);
2577
+ if ( in_array( $first, $ext_list ) ) {
2578
+ return true;
2579
+ }
2580
+
2581
+ return false;
2582
+
2583
+ }
2584
+
2585
+ /**
2586
+ * Retrieve a value from the key-value storage
2587
+ *
2588
+ * @param string $key
2589
+ * @param integer $id
2590
+ * @param bool $unserialize
2591
+ *
2592
+ * @return bool|array
2593
+ */
2594
+ function cerber_get_set( $key, $id = null, $unserialize = true ) {
2595
+ $key = preg_replace( '/[^a-z_\-\d]/i', '', $key );
2596
+
2597
+ $and = '';
2598
+ if ( $id !== null ) {
2599
+ $and = ' AND the_id = ' . absint( $id );
2600
+ }
2601
+
2602
+ $ret = false;
2603
+
2604
+ if ( $row = cerber_db_get_row( 'SELECT * FROM ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' WHERE the_key = "' . $key . '" ' . $and ) ) {
2605
+ if ( $row['expires'] > 0 && $row['expires'] < time() ) {
2606
+ return false;
2607
+ }
2608
+ if ( $unserialize ) {
2609
+ $ret = unserialize( $row['the_value'] );
2610
+ }
2611
+ else {
2612
+ $ret = $row['the_value'];
2613
+ }
2614
+ }
2615
+
2616
+ return $ret;
2617
+ }
2618
+
2619
+ /**
2620
+ * Update/insert value to the key-value storage
2621
+ *
2622
+ * @param string $key
2623
+ * @param $value
2624
+ * @param integer $id
2625
+ * @param bool $serialize
2626
+ * @param integer $expires Unix timestamp (UTC) when this element will be deleted
2627
+ *
2628
+ * @return bool
2629
+ */
2630
+ function cerber_update_set( $key, $value, $id = null, $serialize = true, $expires = null ) {
2631
+
2632
+ $key = preg_replace( '/[^a-z_\-\d]/i', '', $key );
2633
+
2634
+ if ( $id !== null ) {
2635
+ $id = absint( $id );
2636
+ }
2637
+ else {
2638
+ $id = 0;
2639
+ }
2640
+
2641
+ if ( $serialize ) {
2642
+ $value = serialize( $value );
2643
+ }
2644
+ $value = cerber_real_escape( $value );
2645
+
2646
+ if ( $expires !== null ) {
2647
+ $expires = absint( $expires );
2648
+ }
2649
+ else {
2650
+ $expires = 0;
2651
+ }
2652
+
2653
+ if ( false !== cerber_get_set( $key, $id, false ) ) {
2654
+ $sql = 'UPDATE ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' SET the_value = "' . $value . '", expires = ' . $expires . ' WHERE the_key = "' . $key . '" AND the_id = ' . $id;
2655
+ }
2656
+ else {
2657
+ $sql = 'INSERT INTO ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' (the_key, the_id, the_value, expires) VALUES ("' . $key . '",' . $id . ',"' . $value . '",' . $expires . ')';
2658
+ }
2659
+
2660
+ if ( cerber_db_query( $sql ) ) {
2661
+ return true;
2662
+ }
2663
+ else {
2664
+ return false;
2665
+ }
2666
+ }
2667
+
2668
+ /**
2669
+ * Delete value from the storage
2670
+ *
2671
+ * @param string $key
2672
+ * @param integer $id
2673
+ *
2674
+ * @return bool
2675
+ */
2676
+ function cerber_delete_set( $key, $id = null) {
2677
+
2678
+ $key = preg_replace( '/[^a-z_\-\d]/i', '', $key );
2679
+
2680
+ $and = '';
2681
+ if ( $id !== null ) {
2682
+ $and = ' AND the_id = ' . absint( $id );
2683
+ }
2684
+
2685
+ if ( cerber_db_query( 'DELETE FROM ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' WHERE the_key = "' . $key . '"' . $and ) ) {
2686
+ return true;
2687
+ }
2688
+ else {
2689
+ return false;
2690
+ }
2691
+ }
2692
+
2693
+ /**
2694
+ * Clean up all expired sets. Usually by cron.
2695
+ * @param bool $all if true, deletes all sets that has expiration
2696
+ *
2697
+ * @return bool
2698
+ */
2699
+ function cerber_delete_expired_set( $all = false ) {
2700
+ if ( ! $all ) {
2701
+ $where = 'AND expires < ' . time();
2702
+ }
2703
+ else {
2704
+ $where = '';
2705
+ }
2706
+ if ( cerber_db_query( 'DELETE FROM ' . cerber_get_db_prefix() . CERBER_SETS_TABLE . ' WHERE expires > 0 ' . $where ) ) {
2707
+ return true;
2708
+ }
2709
+ else {
2710
+ return false;
2711
+ }
2712
+ }
2713
+
2714
+ function cerber_step_desc(){
2715
+ static $steps = array(
2716
+ '',
2717
+ 'Scanning folders for files',
2718
+ 'Parsing the list of files',
2719
+ 'Verifying the integrity of WordPress',
2720
+ 'Verifying the integrity of the plugins',
2721
+ 'Verifying the integrity of the themes',
2722
+ 'Searching for malicious code'
2723
+ );
2724
+
2725
+ return $steps;
2726
+ }
2727
+
2728
+ /**
2729
+ * Overwrites values and preserve array hierarchy (keys)
2730
+ *
2731
+ * @param array $a1
2732
+ * @param array $a2
2733
+ *
2734
+ * @return mixed
2735
+ */
2736
+ function cerber_array_merge_recurively( $a1, $a2 ) {
2737
+ foreach ( $a2 as $key => $value ) {
2738
+ if ( isset( $a1[ $key ] ) && is_array( $a1[ $key ] ) && is_array( $value ) ) {
2739
+ $a1[ $key ] = cerber_array_merge_recurively( $a1[ $key ], $value );
2740
+ }
2741
+ else {
2742
+ $a1[ $key ] = $value;
2743
+ }
2744
+ }
2745
+
2746
+ return $a1;
2747
+ }
2748
+
2749
+ function cerber_get_short_name( $file_row ) {
2750
+ if ( ! $file_row ) {
2751
+ return '';
2752
+ }
2753
+ $len = null;
2754
+ switch ( $file_row['file_type'] ) {
2755
+ case CERBER_FT_PLUGIN:
2756
+ $len = mb_strlen( cerber_get_plugins_dir() );
2757
+ break;
2758
+ case CERBER_FT_THEME:
2759
+ $len = mb_strlen( cerber_get_themes_dir() );
2760
+ break;
2761
+ case CERBER_FT_UPLOAD:
2762
+ $len = mb_strlen( dirname( cerber_get_upload_dir() ) );
2763
+ break;
2764
+ default:
2765
+ if ( 0 === strpos( $file_row['file_name'], rtrim( ABSPATH, '/\\' ) ) ) {
2766
+ $len = mb_strlen( ABSPATH ) - 1;
2767
+ }
2768
+ }
2769
+
2770
+ if ( $len ) {
2771
+ return mb_substr( $file_row['file_name'], $len );
2772
+ }
2773
+
2774
+ return $file_row['file_name'];
2775
+ }
2776
+
2777
+ function cerber_scanner_dashboard( $msg = '' ) {
2778
+ ?>
2779
+ <div id="crb-scan-display">
2780
+ <div id="crb-scan-info" class="scan-tile">
2781
+ <table>
2782
+ <tr><td>Started</td><td id="crb-started" data-init="-">-</td></tr>
2783
+ <tr><td>Finished</td><td id="crb-finished" data-init="-">-</td></tr>
2784
+ <tr><td>Duration</td><td id="crb-duration" data-init="-">-</td></tr>
2785
+ <tr><td>Performance</td><td id="crb-performance" data-init="-">-</td></tr>
2786
+ </table>
2787
+ </div>
2788
+ <div class="scan-tile">
2789
+ <div><p id="crb-total-files" data-init="-">0</p>
2790
+ <p><?php _e( 'Files to scan', 'wp-cerber' ); ?></p></div>
2791
+ </div>
2792
+ <div class="scan-tile">
2793
+ <div><p><span id="crb-scanned-files" data-init="-">0</span><span id="crb-scanned-percentage" data-init=""></span></p>
2794
+ <p>Scanned</p></div>
2795
+ </div>
2796
+ <div class="scan-tile">
2797
+ <div><p id="crb-critical" data-init="-">0</p>
2798
+ <p><?php _e( 'Critical issues', 'wp-cerber' ); ?></p></div>
2799
+ </div>
2800
+ <div class="scan-tile">
2801
+ <div><p id="crb-warning" data-init="-">0</p>
2802
+ <p><?php _e( 'Issues total', 'wp-cerber' ); ?></p></div>
2803
+ </div>
2804
+ <div id="crb-scan-progress">
2805
+ <div>
2806
+ <div id="the-scan-bar"></div>
2807
+ </div>
2808
+ </div>
2809
+
2810
+ <p id="crb-scan-message"><?php echo $msg; ?></p>
2811
+
2812
+ </div>
2813
+ <div id="crb-scan-details">
2814
+ <table class="crb-table" id="crb-browse-files">
2815
+ <?php
2816
+ $rows = array();
2817
+ $rows[] = '<tr class="crb-scan-container" id="crb-wordpress" style=""><td colspan="6">WordPress</td></tr>';
2818
+ $rows[] = '<tr class="crb-scan-container" id="crb-muplugins" style=""><td colspan="6">Must use plugins</td></tr>';
2819
+ $rows[] = '<tr class="crb-scan-container" id="crb-dropins" style=""><td colspan="6">Drop-ins</td></tr>';
2820
+ $rows[] = '<tr class="crb-scan-container" id="crb-plugins" style=""><td colspan="6">Plugins</td></tr>';
2821
+
2822
+ /*
2823
+ $plugins = get_plugins();
2824
+ foreach ( $plugins as $plugin ) {
2825
+ $rows[] = '<tr class="crb-scan-section" id="' . sha1( $plugin['Name'] ) . '" style="display:none;"></tr>';
2826
+ }
2827
+ */
2828
+ $rows[] = '<tr class="crb-scan-container" id="crb-themes" style=""><td colspan="6">Themes</td></tr>';
2829
+
2830
+ /*$themes = wp_get_themes();
2831
+ foreach ( $themes as $theme_folder => $theme ) {
2832
+ $rows[] = '<tr class="crb-scan-section" id="' . sha1( $theme->get( 'Name' ) ) . '" style="display:none;"></tr>';
2833
+ }*/
2834
+
2835
+ $rows[] = '<tr class="crb-scan-container" id="crb-uploads" style=""><td colspan="6">Uploads folder</td></tr>';
2836
+ $rows[] = '<tr class="crb-scan-container" id="crb-unattended" style=""><td colspan="6">Unattended files</td></tr>';
2837
+ echo implode("\n",$rows);
2838
+ ?>
2839
+ </table>
2840
+ </div>
2841
+
2842
+ <?php
2843
+
2844
+ cerber_ref_upload_form();
2845
+ }
2846
+
2847
+ /**
2848
+ * Finalizes current AJAX request and sends data to the client
2849
+ *
2850
+ * @param $data array
2851
+ */
2852
+ function cerber_end_ajax( $data = array() ) {
2853
+ global $cerber_db_errors;
2854
+
2855
+ if ( ! $data ) {
2856
+ $data = array();
2857
+ }
2858
+ $data['cerber_db_errors'] = $cerber_db_errors;
2859
+ if (!$cerber_db_errors) $data['OK'] = 'OK!';
2860
+ echo json_encode( $data );
2861
+
2862
+ wp_die();
2863
+ }
2864
+
2865
+
2866
+
2867
+ // ======================================================================================================
2868
+
2869
+
2870
+
2871
+ function cerber_ref_upload_form() {
2872
+ ?>
2873
+ <div id="crb-ref-upload-dialog" style="display: none;">
2874
+ <p>We have not found any integrity data to verify <span id="ref-section-name"></span>.</p>
2875
+ <p>You need to upload a ZIP
2876
+ archive from which you've installed it. This enables the security scanner to verify the integrity of the
2877
+ code and detect malware.</p>
2878
+ <form enctype="multipart/form-data">
2879
+ <input type="file" name="refile" id="refile" required="required" accept=".zip">
2880
+ <input type="submit" name="submit" value="Upload file" class="button button-primary">
2881
+ <ul style="list-style: none;">
2882
+ <li style="display:none;" class="crb-status-msg">Uploading the file, please wait&#8230;</li>
2883
+ <li style="display:none;" class="crb-status-msg">Processing the file, please wait&#8230;</li>
2884
+ </ul>
2885
+ </form>
2886
+ </div>
2887
+
2888
+ <?php
2889
+ }
2890
+
2891
+ /**
2892
+ * Upload a reference ZIP archive for a theme or a plugin
2893
+ *
2894
+ */
2895
+ add_action( 'wp_ajax_cerber_ref_upload', function () {
2896
+
2897
+ cerber_check_ajax();
2898
+
2899
+ //ob_start(); // Collecting possible junk warnings and notices cause we need clean JSON to be sent
2900
+
2901
+ $error = '';
2902
+
2903
+ $folder = cerber_get_tmp_file_folder();
2904
+ if ( is_wp_error( $folder ) ) {
2905
+ cerber_end_ajax( array( 'error' => $folder->get_error_message() ) );
2906
+ }
2907
+
2908
+ if ( isset( $_FILES['refile'] ) ) {
2909
+
2910
+ // Step 1, saving file
2911
+
2912
+ if ( ! is_uploaded_file( $_FILES['refile']['tmp_name'] ) ) {
2913
+ $error = 'Unable to read uploaded file';
2914
+ }
2915
+
2916
+ if ( ! cerber_check_extension( $_FILES['refile']['name'], array( 'zip' ) ) ) {
2917
+ $error = 'Incorrect file format';
2918
+ }
2919
+
2920
+ if ( cerber_detect_exec_extension( $_FILES['refile']['name'] ) ) {
2921
+ $error = 'Incorrect file format';
2922
+ }
2923
+
2924
+ if ( false !== strpos( $_FILES['refile']['name'], '/' ) ) {
2925
+ $error = 'Incorrect filename';
2926
+ }
2927
+
2928
+ if ( $error ) {
2929
+ cerber_end_ajax( array( 'error' => $error ) );
2930
+ }
2931
+
2932
+ if ( false === @move_uploaded_file( $_FILES['refile']['tmp_name'], $folder . $_FILES['refile']['name'] ) ) {
2933
+ cerber_end_ajax( array( 'error' => 'Unable to copy file to ' . $folder ) );
2934
+ }
2935
+
2936
+ }
2937
+ else {
2938
+
2939
+ // Step 2, creating hash
2940
+
2941
+ $result = cerber_need_for_hash();
2942
+ if ( is_wp_error( $result ) ) {
2943
+ cerber_end_ajax( array( 'error' => $result->get_error_message() ) );
2944
+ }
2945
+ }
2946
+
2947
+ cerber_end_ajax();
2948
+
2949
+ } );
2950
+
2951
+ // Process a manually installed/upgraded plugin/theme, part 1
2952
+ add_filter( 'wp_insert_attachment_data', function ( $data, $postarr ) {
2953
+ global $crb_new_zip_file;
2954
+ if ( $postarr['context'] == 'upgrader' && $postarr['post_status'] == 'private' && isset( $postarr['file'] ) ) {
2955
+ $crb_new_zip_file = $postarr['file'];
2956
+ }
2957
+
2958
+ return $data;
2959
+ }, 10, 2 );
2960
+
2961
+ // Process a manually installed/upgraded plugin/theme, part 2
2962
+ add_action( 'upgrader_process_complete', function ( $object, $extra ) {
2963
+ global $crb_new_zip_file;
2964
+ if ( empty( $crb_new_zip_file ) ) {
2965
+ return;
2966
+ }
2967
+ switch ( $extra['type'] ) {
2968
+ case 'plugin':
2969
+ case 'theme':
2970
+ if ( file_exists( $crb_new_zip_file ) ) {
2971
+ $tmp = cerber_get_tmp_file_folder();
2972
+ if ( ! is_wp_error( $tmp ) ) {
2973
+ $target_zip = $tmp . basename( $crb_new_zip_file );
2974
+ if ( copy( $crb_new_zip_file, $target_zip ) ) {
2975
+ wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'cerber_scheduled_hash', array( $target_zip ) );
2976
+ cerber_need_for_hash( $target_zip );
2977
+ }
2978
+ else {
2979
+ // Error
2980
+ }
2981
+ }
2982
+ else {
2983
+ // Error
2984
+ }
2985
+ }
2986
+ break;
2987
+ }
2988
+
2989
+ }, 10, 2 );
2990
+
2991
+ // Process a manually installed/upgraded plugin/theme, part 3
2992
+ add_action( 'cerber_scheduled_hash', 'cerber_scheduled_hash' );
2993
+ function cerber_scheduled_hash( $zip_file = '' ) {
2994
+ $result = cerber_need_for_hash( $zip_file );
2995
+ if ( is_wp_error( $result ) ) {
2996
+ //cerber_log( $result->get_error_message() );
2997
+ }
2998
+ }
2999
+
3000
+ /**
3001
+ * Generate hash for an uploaded theme/plugin ZIP archive or for a specified ZIP file.
3002
+ * Hash will not be created if a theme/plugin is not installed on the website.
3003
+ *
3004
+ * @param string $zip_file Be used if set
3005
+ * @param bool $delete If true the source ZIP will be deleted
3006
+ * @param int $expires Timestamp when hash will expire, 0 = never
3007
+ *
3008
+ * @return bool|WP_Error
3009
+ */
3010
+ function cerber_need_for_hash( $zip_file = '', $delete = true, $expires = 0 ) {
3011
+ $folder = cerber_get_tmp_file_folder();
3012
+ $zip_folder = $folder . 'zip' . DIRECTORY_SEPARATOR;
3013
+
3014
+ if ( ! $zip_file ) {
3015
+ if ( ! $files = glob( $folder . '*.zip' ) ) {
3016
+ return false;
3017
+ }
3018
+ }
3019
+ else {
3020
+ if ( ! is_array( $zip_file ) ) {
3021
+ $files = array( $zip_file );
3022
+ }
3023
+ else {
3024
+ $files = $zip_file;
3025
+ }
3026
+ }
3027
+
3028
+ $fs = cerber_init_wp_filesystem();
3029
+
3030
+ foreach ( $files as $zip_file ) {
3031
+
3032
+ if ( ! file_exists( $zip_file ) ) {
3033
+ continue;
3034
+ }
3035
+
3036
+ if ( file_exists( $zip_folder ) && ! $fs->delete( $zip_folder, true ) ) {
3037
+ return new WP_Error( 'cerber-zip', 'Unable to clean up temporary zip folder ' . $zip_folder );
3038
+ }
3039
+
3040
+ $result = cerber_unzip( $zip_file, $zip_folder );
3041
+
3042
+ if ( $delete ) {
3043
+ unlink( $zip_file );
3044
+ }
3045
+
3046
+ if ( is_wp_error( $result ) ) {
3047
+ return new WP_Error( 'cerber-zip', 'Unable to unzip file ' . $zip_file . ' ' . $result->get_error_message() );
3048
+ }
3049
+
3050
+ if ( ! $obj = cerber_detect_object( $zip_folder ) ) {
3051
+ return new WP_Error( 'cerber-file', 'File ' . basename( $zip_file ) . ' can not be used. Proper program code not found or version mismatch. Please upload another file.' );
3052
+ }
3053
+
3054
+ $dir = $obj['src'] . DIRECTORY_SEPARATOR;
3055
+ $len = mb_strlen( $dir );
3056
+
3057
+ global $the_file_list;
3058
+ $the_file_list = array();
3059
+
3060
+ cerber_scan_directory( $dir, null, function ($list){
3061
+ global $the_file_list;
3062
+ $the_file_list = array_merge( $the_file_list, $list );
3063
+ } );
3064
+
3065
+ if ( empty( $the_file_list ) ) {
3066
+ return new WP_Error( 'cerber-dir', 'No files found in ' . $zip_file );
3067
+ }
3068
+
3069
+ $hash = array();
3070
+
3071
+ foreach ( $the_file_list as $file_name ) {
3072
+ $hash[ mb_substr( $file_name, $len ) ] = hash_file( 'sha256', $file_name );
3073
+ }
3074
+
3075
+ if ( !$obj['single'] ) {
3076
+ $b = $obj['src'];
3077
+ }
3078
+ else {
3079
+ $b = $obj['file'];
3080
+ }
3081
+
3082
+ //$key = $obj['type'] . sha1( $obj['name'] . basename( $obj['src'] ) );
3083
+ $key = $obj['type'] . sha1( $obj['name'] . basename( $b ) );
3084
+
3085
+ if ( ! cerber_update_set( $key, array(
3086
+ 'name' => $obj['name'],
3087
+ 'ver' => $obj['ver'],
3088
+ 'hash' => $hash,
3089
+ 'time' => time()
3090
+ ), 0, true, $expires )
3091
+ ) {
3092
+ return new WP_Error( 'cerber-zip', 'Database error occurred while saving hash' );
3093
+ }
3094
+ }
3095
+
3096
+ $fs->delete( $zip_folder, true );
3097
+ unset($the_file_list);
3098
+
3099
+ return true;
3100
+ }
3101
+
3102
+ /**
3103
+ * Retrieve local hash for plugin or theme
3104
+ *
3105
+ * @param $key
3106
+ * @param $version
3107
+ *
3108
+ * @return bool|mixed
3109
+ */
3110
+ function cerber_get_local_hash( $key, $version ) {
3111
+ if ( $local_hash = cerber_get_set( $key ) ) {
3112
+ if ( $local_hash['ver'] == $version ) {
3113
+ return $local_hash['hash'];
3114
+ }
3115
+ }
3116
+
3117
+ return false;
3118
+ }
3119
+
3120
+ /**
3121
+ * @return string|WP_Error Full path to the folder with trailing slash
3122
+ */
3123
+ function cerber_get_tmp_file_folder() {
3124
+ $folder = cerber_get_the_folder();
3125
+ if ( is_wp_error( $folder ) ) {
3126
+ return $folder;
3127
+ }
3128
+
3129
+ $folder = $folder . 'tmp' . DIRECTORY_SEPARATOR;
3130
+
3131
+ if ( ! is_dir( $folder ) ) {
3132
+ if ( ! mkdir( $folder, 0755, true ) ) {
3133
+ // TODO: try to set permissions for the parent folder
3134
+ return new WP_Error( 'cerber-dir', 'Unable to create the tmp directory ' . $folder );
3135
+ }
3136
+ }
3137
+
3138
+ return $folder;
3139
+ }
3140
+
3141
+ /**
3142
+ * Return Cerber's folder. If there is no folder it will be created.
3143
+ *
3144
+ * @return string|WP_Error Full path to the folder with trailing slash
3145
+ */
3146
+ function cerber_get_the_folder() {
3147
+ static $ret;
3148
+
3149
+ if ( $ret !== null ) {
3150
+ return $ret;
3151
+ }
3152
+
3153
+ $opt = cerber_get_set( '_cerber_mnemosyne' );
3154
+ $u = wp_upload_dir();
3155
+
3156
+ if ( $opt && isset( $opt[4] ) && isset( $opt[ $opt[4] ] ) ) {
3157
+ $key = preg_replace( '/[^a-z0-9]/i', '', $opt[ $opt[4] ] );
3158
+ if ( $key ) {
3159
+ $folder = $u['basedir'] . DIRECTORY_SEPARATOR . 'wp-cerber-' . $key . DIRECTORY_SEPARATOR;
3160
+ if ( is_dir( $folder ) ) {
3161
+ if ( ! wp_is_writable( $folder ) ) {
3162
+ if ( ! chmod( $folder, 0755 ) ) {
3163
+ return new WP_Error( 'cerber-dir', __( 'The directory is not writable', 'wp-cerber' ) . ' ' . $folder );
3164
+ }
3165
+ }
3166
+ cerber_lock_the_folder( $folder );
3167
+
3168
+ $ret = $folder;
3169
+ return $ret;
3170
+ }
3171
+ }
3172
+ }
3173
+
3174
+ // Let's create the folder
3175
+
3176
+ $key = substr( str_shuffle( '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' ), 0, rand( 16, 20 ) );
3177
+ $folder = $u['basedir'] . DIRECTORY_SEPARATOR . 'wp-cerber-' . $key . DIRECTORY_SEPARATOR;
3178
+
3179
+ if ( ! mkdir( $folder, 0755, true ) ) {
3180
+ // TODO: try to set permissions for the parent folder
3181
+ return new WP_Error( 'cerber-dir', __( 'Unable to create WP CERBER directory', 'wp-cerber' ) . ' ' . $folder );
3182
+ }
3183
+
3184
+ if ( ! cerber_lock_the_folder( $folder ) ) {
3185
+ return new WP_Error( 'cerber-dir', 'Unable to lock the directory ' . $folder );
3186
+ }
3187
+
3188
+ $k = substr( str_shuffle( '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' ), 0, rand( 16, 20 ) );
3189
+ $i = rand( 5, 10 );
3190
+ if ( ! cerber_update_set( '_cerber_mnemosyne', array( rand( 0, 3 ) => $k, 4 => $i, $i => $key ) ) ) {
3191
+ return new WP_Error( 'cerber-dir', 'Unable to save option' );
3192
+ }
3193
+
3194
+ $ret = $folder;
3195
+ return $ret;
3196
+ }
3197
+
3198
+ /**
3199
+ * Make a folder not accessible from the web
3200
+ *
3201
+ * @param $folder string
3202
+ *
3203
+ * @return bool
3204
+ */
3205
+ function cerber_lock_the_folder( $folder ) {
3206
+ if ( $f = fopen( $folder . '.htaccess', 'w' ) ) {
3207
+ if ( fwrite( $f, 'deny from all' ) ) {
3208
+ fclose( $f );
3209
+
3210
+ return true;
3211
+ }
3212
+ }
3213
+
3214
+ return false;
3215
+ }
3216
+
3217
+ function cerber_unzip( $file_name, $folder ) {
3218
+ cerber_init_wp_filesystem();
3219
+
3220
+ return unzip_file( $file_name, $folder );
3221
+
3222
+ }
3223
+
3224
+ /**
3225
+ * @return WP_Error|WP_Filesystem_Direct
3226
+ */
3227
+ function cerber_init_wp_filesystem() {
3228
+ global $wp_filesystem;
3229
+
3230
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
3231
+
3232
+ add_filter( 'filesystem_method', '__ret_direct' );
3233
+ if ( ! WP_Filesystem() ) {
3234
+ return new WP_Error( 'cerber-file', 'Unable to init WP_Filesystem' );
3235
+ }
3236
+ remove_filter( 'filesystem_method', '__ret_direct' );
3237
+
3238
+ return $wp_filesystem;
3239
+ }
3240
+
3241
+ function __ret_direct() {
3242
+ return 'direct';
3243
+ }
3244
+
3245
+ function cerber_detect_object( $folder = '' ) {
3246
+
3247
+ // Look for a theme
3248
+
3249
+ $the_folder = false;
3250
+
3251
+ $dirs = glob( $folder . '*', GLOB_ONLYDIR );
3252
+ if ( $dirs ) {
3253
+ $the_folder = $dirs[0]; // we expect only one subfolder
3254
+ if ( ! file_exists( $the_folder ) ) {
3255
+ $the_folder = false;
3256
+ }
3257
+ }
3258
+
3259
+ if ( $result = cerber_check_theme_data( $the_folder ) ) {
3260
+ return array(
3261
+ 'type' => CRB_HASH_THEME,
3262
+ 'name' => $result->get( 'Name' ),
3263
+ 'ver' => $result->get( 'Version' ),
3264
+ 'src' => $the_folder,
3265
+ 'single' => false,
3266
+ );
3267
+ }
3268
+
3269
+ // Look for a plugin
3270
+
3271
+ $files = glob( $folder . '*.php' ); // single file plugin
3272
+ if ( ! $files && $the_folder ) { // plugin with folder
3273
+ $files = glob( $the_folder . DIRECTORY_SEPARATOR . '*.php' );
3274
+ $single = false;
3275
+ }
3276
+ else {
3277
+ $single = true;
3278
+ }
3279
+
3280
+ if ( ! $files ) {
3281
+ return false;
3282
+ }
3283
+
3284
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
3285
+ foreach ( $files as $file_name ) {
3286
+ $plugin_data = get_plugin_data( $file_name );
3287
+ if ( ! empty ( $plugin_data['Name'] ) && ! empty ( $plugin_data['Version'] ) ) {
3288
+ foreach ( get_plugins() as $key => $plugin ) {
3289
+ if ( $plugin['Name'] == $plugin_data['Name'] && $plugin['Version'] == $plugin_data['Version'] ) {
3290
+
3291
+ return array(
3292
+ 'type' => CRB_HASH_PLUGIN,
3293
+ 'name' => $plugin_data['Name'],
3294
+ 'ver' => $plugin_data['Version'],
3295
+ 'data' => $plugin_data,
3296
+ 'src' => dirname( $file_name ),
3297
+ 'single' => $single,
3298
+ 'file' => $file_name
3299
+ );
3300
+ }
3301
+ }
3302
+
3303
+ }
3304
+ }
3305
+
3306
+
3307
+ return false;
3308
+ }
3309
+
3310
+ /**
3311
+ * @param string $folder A folder with theme files
3312
+ *
3313
+ * @return bool|WP_Theme
3314
+ */
3315
+ function cerber_check_theme_data( $folder ) {
3316
+
3317
+ $style = $folder . DIRECTORY_SEPARATOR . 'style.css';
3318
+ if ( ! file_exists( $style ) ) {
3319
+ return false;
3320
+ }
3321
+
3322
+ // See class-wp-theme.php
3323
+ static $theme_headers = array(
3324
+ 'Name' => 'Theme Name',
3325
+ 'ThemeURI' => 'Theme URI',
3326
+ 'Description' => 'Description',
3327
+ 'Author' => 'Author',
3328
+ 'AuthorURI' => 'Author URI',
3329
+ 'Version' => 'Version',
3330
+ 'Template' => 'Template',
3331
+ 'Status' => 'Status',
3332
+ 'Tags' => 'Tags',
3333
+ 'TextDomain' => 'Text Domain',
3334
+ 'DomainPath' => 'Domain Path',
3335
+ );
3336
+ $theme_folder = basename( $folder );
3337
+ $headers = get_file_data( $style, $theme_headers, 'theme' );
3338
+ // $headers['Version'] means just theme, $headers['Template'] means child theme
3339
+ if ( ! empty ( $headers['Name'] ) && ( ! empty ( $headers['Version'] ) || ! empty ( $headers['Template'] ) ) ) {
3340
+ $themes = wp_get_themes();
3341
+ foreach ( $themes as $the_folder => $theme ) {
3342
+ if ( $the_folder != $theme_folder ) {
3343
+ continue;
3344
+ }
3345
+ if ( $headers['Name'] == $theme->get( 'Name' ) ) {
3346
+ if ( ! empty ( $headers['Version'] ) && ( $headers['Version'] == $theme->get( 'Version' ) ) ) {
3347
+ return $theme;
3348
+ }
3349
+ if ( ! empty ( $headers['Template'] ) && ( $headers['Template'] == $theme->get( 'Template' ) ) ) {
3350
+ return $theme;
3351
+ }
3352
+ }
3353
+ }
3354
+ }
3355
+
3356
+ return false;
3357
+ }
3358
+
3359
+ /**
3360
+ * File viewer, server side AJAX
3361
+ *
3362
+ */
3363
+ add_action( 'wp_ajax_cerber_view_file', function () {
3364
+ global $cerber_db_errors;
3365
+
3366
+ cerber_check_ajax();
3367
+
3368
+ $file_name = $_GET['file'];
3369
+ if ( ! @is_file( $file_name ) ) {
3370
+ wp_die( 'I/O Error' );
3371
+ }
3372
+
3373
+ $file_size = filesize( $file_name );
3374
+
3375
+ if ( $file_size > 8000000 ) {
3376
+ wp_die( 'Error: This file is too large to display.' );
3377
+ }
3378
+
3379
+ if ( $file_size <= 0 ) {
3380
+ wp_die( 'The file is empty.' );
3381
+ }
3382
+
3383
+ $scan_id = absint( $_GET['scan_id'] );
3384
+
3385
+ $the_file = cerber_db_get_row( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan_id . ' AND file_name = "' . $file_name . '"' );
3386
+
3387
+ if ( ! $the_file ) {
3388
+ wp_die( 'Access error.' );
3389
+ }
3390
+
3391
+ if ( ! $source = file_get_contents( $file_name ) ) {
3392
+ wp_die( 'Error: Unable to load file.' );
3393
+ }
3394
+
3395
+ $source = htmlspecialchars( $source, ENT_SUBSTITUTE );
3396
+
3397
+ if ( ! $source ) {
3398
+ $source = 'Unable to display the content of the file. This file contains non-printable characters.';
3399
+ }
3400
+
3401
+ if ( cerber_detect_exec_extension( $file_name ) || cerber_check_extension( $file_name, array( 'js', 'css', 'inc' ) ) ) {
3402
+ $paint = true;
3403
+ }
3404
+ else {
3405
+ $paint = false;
3406
+ }
3407
+
3408
+ $overlay = '';
3409
+ if ( $paint ) {
3410
+ $overlay = '<div id="crb-overlay">Loading, please wait...</div>';
3411
+ }
3412
+
3413
+ $sh_url = plugin_dir_url( __FILE__ ) . 'assets/sh/';
3414
+ $sheight = absint( $_GET['sheight'] ) - 100; // highlighter is un-responsible, so we need tell him the real height
3415
+ $c_height = absint( $_GET['sheight'] );
3416
+
3417
+ ?>
3418
+ <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
3419
+ <head>
3420
+ <script type="text/javascript" src="<?php echo $sh_url ?>scripts/shCore.js"></script>
3421
+ <script type="text/javascript" src="<?php echo $sh_url; ?>scripts/shBrushPhp.js"></script>
3422
+ <link href="<?php echo $sh_url; ?>styles/shCore.css" rel="stylesheet" type="text/css" />
3423
+ <link href="<?php echo $sh_url; ?>styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
3424
+ <style type="text/css" media="all">
3425
+ body {
3426
+ overflow: hidden;
3427
+ font-family: 'Roboto', sans-serif;
3428
+ font-size: 14px;
3429
+ }
3430
+
3431
+ #crb-overlay {
3432
+ display: flex;
3433
+ justify-content: center;
3434
+ align-items: center;
3435
+ text-align: center;
3436
+ background-color: #fff;
3437
+ position: fixed;
3438
+ width: 100%;
3439
+ height: 100%
3440
+ z-index: 2;
3441
+ top: 0;
3442
+ left: 0;
3443
+ right: 0;
3444
+ bottom: 0;
3445
+ }
3446
+
3447
+ #crb-issue {
3448
+ border-left: 3px solid crimson;
3449
+ background-color: #eee;
3450
+ padding: 1em;
3451
+ overflow: auto;
3452
+ }
3453
+
3454
+ #crb-file-content {
3455
+ <?php
3456
+ if (!$paint) {
3457
+ echo '
3458
+ max-height: '.$sheight .'px;
3459
+ overflow: auto;
3460
+ padding: 15px;
3461
+ ';
3462
+ }
3463
+ else {
3464
+ echo 'overflow: hidden;';
3465
+ }
3466
+ ?>
3467
+ }
3468
+
3469
+ .syntaxhighlighter {
3470
+ max-height: <?php echo $sheight; ?>px;
3471
+ }
3472
+
3473
+ .syntaxhighlighter code {
3474
+ font-family: Menlo, Consolas, Monaco, monospace !important;
3475
+ font-size: 13px !important;
3476
+ }
3477
+
3478
+ .syntaxhighlighter .gutter .line{
3479
+ border-right: 3px solid #c7c7c7 !important;
3480
+ }
3481
+
3482
+ </style>
3483
+ </head>
3484
+
3485
+ <body>
3486
+
3487
+ <?php
3488
+
3489
+ echo $overlay;
3490
+
3491
+ echo '<pre id="crb-file-content" class="brush: php; toolbar: false;">' . $source . '</pre>';
3492
+
3493
+ if ( $the_file ) {
3494
+ echo '<div id="crb-issue">Issue: ' . cerber_get_issue_desc( $the_file['scan_status'] ) . '</div>';
3495
+ }
3496
+
3497
+ if ( $paint ) :
3498
+ ?>
3499
+
3500
+ <script type="text/javascript">
3501
+ SyntaxHighlighter.defaults["highlight"];
3502
+ SyntaxHighlighter.all();
3503
+ function crb_waitUntilRender() {
3504
+ var overlay = document.getElementById("crb-overlay").style.visibility = "hidden";
3505
+ }
3506
+ var intervalID = setInterval(crb_waitUntilRender, 200);
3507
+
3508
+
3509
+ </script>
3510
+
3511
+ <?php
3512
+
3513
+ endif;
3514
+
3515
+ ?>
3516
+
3517
+ </body>
3518
+ </html>
3519
+
3520
+ <?php
3521
+
3522
+ wp_die();
3523
+ } );
3524
+
3525
+
3526
+ /**
3527
+ * Deleting files, server side AJAX
3528
+ *
3529
+ */
3530
+ add_action( 'wp_ajax_cerber_scan_delete_files', function () {
3531
+ global $cerber_db_errors;
3532
+
3533
+ cerber_check_ajax();
3534
+
3535
+ if ( empty( $_POST['files'] ) || empty( $_POST['scan_id'] ) ) {
3536
+ wp_die( 'Error!' );
3537
+ }
3538
+
3539
+ $scan_id = absint( $_POST['scan_id'] );
3540
+
3541
+ if ( ! cerber_get_scan( $scan_id ) ) {
3542
+ wp_die( 'Error!' );
3543
+ }
3544
+
3545
+ $list = array();
3546
+ $i = 0;
3547
+ $errors = array();
3548
+
3549
+ foreach ( $_POST['files'] as $file_name ) {
3550
+
3551
+ if ( ! is_file( $file_name ) ) {
3552
+ continue;
3553
+ }
3554
+
3555
+ $the_file = cerber_db_get_row( 'SELECT * FROM ' . CERBER_SCAN_TABLE . ' WHERE scan_id = ' . $scan_id . ' AND file_name = "' . $file_name . '"' );
3556
+ if ( ! $the_file ) {
3557
+ continue;
3558
+ }
3559
+
3560
+ $result = cerber_quarantine_move( $file_name, $scan_id );
3561
+ if ( is_wp_error( $result ) ) {
3562
+ $errors[] = $result->get_error_message();
3563
+ }
3564
+ elseif ( ! $result ) {
3565
+ $errors[] = 'Not possible';
3566
+ }
3567
+ else {
3568
+ $i ++;
3569
+ $list[] = $file_name;
3570
+ }
3571
+
3572
+ }
3573
+
3574
+ cerber_end_ajax( array( 'errors' => $errors, 'number' => $i, 'deleted' => $list ) );
3575
+
3576
+ });
3577
+ /**
3578
+ * Move files to the quarantine folder
3579
+ *
3580
+ * @param string $file_name
3581
+ * @param integer $scan_id
3582
+ *
3583
+ * @return bool|WP_Error
3584
+ */
3585
+ function cerber_quarantine_move( $file_name, $scan_id ) {
3586
+ static $folder;
3587
+
3588
+ $scan_id = absint( $scan_id );
3589
+ if ( ! is_file( $file_name ) || ! $scan_id ) {
3590
+ return false;
3591
+ }
3592
+ if ( ! cerber_can_be_deleted( $file_name, true ) ) {
3593
+ return new WP_Error( 'cerber-del', "This file can't be deleted: ". $file_name );
3594
+ }
3595
+
3596
+ if ( $folder === null ) {
3597
+ $folder = cerber_get_the_folder();
3598
+ }
3599
+ if ( is_wp_error( $folder ) ) {
3600
+ return $folder;
3601
+ }
3602
+
3603
+ $quarantine = $folder . 'quarantine' . DIRECTORY_SEPARATOR . $scan_id . DIRECTORY_SEPARATOR;
3604
+
3605
+ if ( ! is_dir( $quarantine ) ) {
3606
+ if ( ! mkdir( $quarantine, 0755, true ) ) {
3607
+ // TODO: try to set permissions for the parent folder
3608
+ return new WP_Error( 'cerber-dir', 'Unable to create the quarantine directory ' . $quarantine );
3609
+ }
3610
+ }
3611
+ else {
3612
+ if ( ! chmod( $quarantine, 0755 ) ) {
3613
+ return new WP_Error( 'cerber-dir', 'Unable to set folder permissions for ' . $quarantine );
3614
+ }
3615
+ }
3616
+
3617
+ cerber_lock_the_folder( $quarantine );
3618
+
3619
+ // Preserve original paths for deleted files in a restore file
3620
+ $restore = $quarantine . '.restore';
3621
+ if ( ! file_exists( $restore ) ) {
3622
+ if ( ! $f = fopen( $restore, 'w' ) ) {
3623
+ return new WP_Error( 'cerber-quar', 'Unable to create a restore file.' );
3624
+ }
3625
+ fwrite( $f, 'Information for restoring deleted files.' . PHP_EOL
3626
+ . 'Deletion date | Deleted file => Original file to copy to restore.' . PHP_EOL
3627
+ . '-----------------------------------------------------------------'
3628
+ . PHP_EOL . PHP_EOL );
3629
+ }
3630
+ else {
3631
+ if ( ! $f = fopen( $restore, 'a' ) ) {
3632
+ return new WP_Error( 'cerber-quar', 'Unable to write to the restore file.');
3633
+ }
3634
+ }
3635
+
3636
+ // Avoid file name collisions
3637
+ $new_name = $quarantine . basename( $file_name );
3638
+ if ( file_exists( $new_name ) ) {
3639
+ $i = 2;
3640
+ while ( file_exists( $new_name ) ) {
3641
+ $new_name = $quarantine . basename( $file_name ) . '.' . $i;
3642
+ $i ++;
3643
+ }
3644
+ }
3645
+
3646
+ if ( ! @rename( $file_name, $new_name ) ) {
3647
+ return new WP_Error( 'cerber-quar', 'Unable to move file ' . $file_name . '. Check the file folder permissions.' );
3648
+ }
3649
+
3650
+ // Save restoring info
3651
+ fwrite( $f, PHP_EOL . cerber_date( time() ) . ' | ' . basename( $new_name ) . ' => ' . $file_name );
3652
+ fclose( $f );
3653
+
3654
+ return true;
3655
+ }
3656
+
3657
+ /**
3658
+ * Some files can't be deleted...
3659
+ *
3660
+ * @param $file_name
3661
+ * @param bool $check_inclusion
3662
+ *
3663
+ * @return bool
3664
+ */
3665
+ function cerber_can_be_deleted( $file_name, $check_inclusion = false ) {
3666
+ static $abspath;
3667
+
3668
+ if ( ! file_exists( $file_name ) || ! is_file( $file_name ) || is_link( $file_name ) ) {
3669
+ return false;
3670
+ }
3671
+ //if ( basename( $file_name ) == '.htaccess' ) {
3672
+ if ( cerber_is_htaccess( $file_name ) || cerber_is_dropin( $file_name ) ) {
3673
+ return false;
3674
+ }
3675
+
3676
+ if ( $check_inclusion && in_array( $file_name, get_included_files() ) ) {
3677
+ return false;
3678
+ }
3679
+
3680
+ if ( basename( $file_name ) == 'wp-config.php' ) {
3681
+ // All stuff can contain different directory separators, make them the same
3682
+ if ( ! $abspath ) {
3683
+ $abspath = str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, ABSPATH );
3684
+ }
3685
+ $file_name = str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $file_name );
3686
+
3687
+ if ( $file_name == ABSPATH . 'wp-config.php' ) {
3688
+ return false;
3689
+ }
3690
+ if ( ! file_exists( ABSPATH . 'wp-config.php' ) && $file_name == dirname( ABSPATH ) . DIRECTORY_SEPARATOR . 'wp-config.php' ) {
3691
+ return false;
3692
+ }
3693
+ }
3694
+
3695
+ return true;
3696
+ }
3697
+
3698
+ /**
3699
+ * Is time for current step is over?
3700
+ *
3701
+ * @param int $limit
3702
+ *
3703
+ * @return bool True if the time of execution of the current step is over
3704
+ */
3705
+ function cerber_exec_timer( $limit = CERBER_MAX_SECONDS) {
3706
+ static $start;
3707
+ if ( $start === null ) {
3708
+ $start = time();
3709
+ }
3710
+
3711
+ if ( ( time() - $start ) > $limit ) {
3712
+ return true;
3713
+ }
3714
+
3715
+ return false;
3716
+ }
3717
+
3718
+ function cerber_scan_msg( $id, $txt = '' ) {
3719
+ $m = array( __( 'Unable to open file', 'wp-cerber' ) );
3720
+
3721
+ $ret = '???';
3722
+ if ( isset( $m[ $id ] ) ) {
3723
+ $ret = $m[ $id ];
3724
+ }
3725
+ if ( $txt ) {
3726
+ //sprintf()
3727
+ $ret .= ' ' . $txt;
3728
+ }
3729
+
3730
+ return $ret;
3731
+ }
cerber-tools.php CHANGED
@@ -352,15 +352,16 @@ function cerber_recaptcha_page() {
352
  }
353
 
354
  function cerber_show_wp_diag(){
355
- global $wp_version, $wpdb;
356
 
357
  $ret = array();
358
 
359
  $ret[] = cerber_make_plain_table( array(
360
- array('WordPress version', $wp_version),
361
- array('Options DB table', $wpdb->prefix.'options'),
362
- array('Server platform', PHP_OS),
363
- ) );
 
364
 
365
  $uploads = wp_upload_dir();
366
 
@@ -373,6 +374,8 @@ function cerber_show_wp_diag(){
373
  array( 'Plugins folder', cerber_get_plugins_dir() ),
374
  array( 'Must use plugin folder (WPMU_PLUGIN_DIR) ', WPMU_PLUGIN_DIR ),
375
  array( 'Folder for temporary files', ini_get( 'upload_tmp_dir' ) ),
 
 
376
  );
377
 
378
  foreach ( $folders as &$folder ) {
@@ -382,14 +385,28 @@ function cerber_show_wp_diag(){
382
  if ( wp_is_writable( $folder[1] ) ) {
383
  $folder[2] = 'Writable';
384
  }
 
 
 
385
  $folder[3] = cerber_get_chmod($folder[1]);
386
  }
387
  else {
388
  $folder[2] = 'Not found';
389
  }
390
  }
 
 
 
 
 
 
 
 
 
 
 
391
 
392
- $ret[] = '<p>Folders</p>'.cerber_make_plain_table( $folders );
393
 
394
  $pls = array();
395
  $list = get_option('active_plugins');
352
  }
353
 
354
  function cerber_show_wp_diag(){
355
+ global $wpdb;
356
 
357
  $ret = array();
358
 
359
  $ret[] = cerber_make_plain_table( array(
360
+ array( 'WordPress version', cerber_get_wp_version() ),
361
+ array( 'Options DB table', $wpdb->prefix . 'options' ),
362
+ array( 'Server platform', PHP_OS ),
363
+ array( 'Memory limit', @ini_get( 'memory_limit' ) )
364
+ ) );
365
 
366
  $uploads = wp_upload_dir();
367
 
374
  array( 'Plugins folder', cerber_get_plugins_dir() ),
375
  array( 'Must use plugin folder (WPMU_PLUGIN_DIR) ', WPMU_PLUGIN_DIR ),
376
  array( 'Folder for temporary files', ini_get( 'upload_tmp_dir' ) ),
377
+ array( 'Folder for session data', session_save_path() ),
378
+ array( 'Security scanner quarantine folder', cerber_get_the_folder() . 'quarantine' . DIRECTORY_SEPARATOR ),
379
  );
380
 
381
  foreach ( $folders as &$folder ) {
385
  if ( wp_is_writable( $folder[1] ) ) {
386
  $folder[2] = 'Writable';
387
  }
388
+ else {
389
+ $folder[2] = 'Write protected';
390
+ }
391
  $folder[3] = cerber_get_chmod($folder[1]);
392
  }
393
  else {
394
  $folder[2] = 'Not found';
395
  }
396
  }
397
+ if ( file_exists( ABSPATH . 'wp-config.php' )) {
398
+ $config = ABSPATH . 'wp-config.php';
399
+ }
400
+ elseif ( file_exists( dirname( ABSPATH ) . '/wp-config.php' ) ) {
401
+ $config = dirname( ABSPATH ) . '/wp-config.php';
402
+ }
403
+ else {
404
+ $config = 'None?';
405
+ }
406
+ $folders[] = array( 'WordPress config file', $config );
407
+ $folders[] = array( 'Directory separator', DIRECTORY_SEPARATOR );
408
 
409
+ $ret[] = '<p>File system</p>'.cerber_make_plain_table( $folders );
410
 
411
  $pls = array();
412
  $list = get_option('active_plugins');
changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  = 6.7.5 =
2
  * A new button View Activity has been added to the user edit page in the WordPress dashboard.
3
  * Miscellaneous code optimizations: performance of database routines and SQL queries are improved.
1
+ = 7.0 =
2
+ * Cerber Security Scanner: system integrity checker, malware detector and malware removal tool.
3
+ * New: a new setting for Traffic Inspector: Use White IP Access List.
4
+ * Update: the redirection from /wp-admin/ to the login page is not blocked for a user that has been logged in once before.
5
+ * Bug fixed: the limit to the number of new user registrations is calculated the way that allows one additional registration within a given period of time.
6
+
7
  = 6.7.5 =
8
  * A new button View Activity has been added to the user edit page in the WordPress dashboard.
9
  * Miscellaneous code optimizations: performance of database routines and SQL queries are improved.
common.php CHANGED
@@ -68,7 +68,7 @@ function cerber_admin_link($tab = '', $args = array()){
68
  elseif ( in_array( $tab, array( 'geo' ) ) ) {
69
  $page = 'cerber-rules';
70
  }
71
- elseif ( in_array( $tab, array( 'scanner' ) ) ) {
72
  $page = 'cerber-integrity';
73
  }
74
  else {
@@ -407,6 +407,10 @@ function is_ip_private($ip) {
407
  return false;
408
  }
409
 
 
 
 
 
410
  /**
411
  * Expands shortened IPv6 to full IPv6 address
412
  *
@@ -935,11 +939,18 @@ function cerber_admin_message($msg){
935
  *
936
  * @return string
937
  */
938
- function cerber_ago_time($time){
939
 
940
  return sprintf( __( '%s ago' ), human_time_diff( $time ) );
941
  }
942
 
 
 
 
 
 
 
 
943
  /**
944
  * Format date according to user settings and timezone
945
  *
@@ -1348,6 +1359,16 @@ function cerber_get_db() {
1348
  return $db;
1349
  }
1350
 
 
 
 
 
 
 
 
 
 
 
1351
  /**
1352
  * Create a WP DB handler
1353
  *
@@ -1433,6 +1454,19 @@ function cerber_check_groove( $hash = '' ) {
1433
  return false;
1434
  }
1435
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1436
  /*
1437
  Get the special public Cerber Sign for using with cookies
1438
  */
@@ -1689,9 +1723,9 @@ function cerber_is_permalink_enabled() {
1689
  *
1690
  * @return string Parent directory's path
1691
  */
1692
- function cerber_dirname( $path, $levels = 0 ) {
1693
 
1694
- if ( PHP_VERSION_ID >= 70000 || $levels == 0 ) {
1695
  return dirname( $path, $levels );
1696
  }
1697
 
@@ -1705,4 +1739,16 @@ function cerber_dirname( $path, $levels = 0 ) {
1705
 
1706
  return $ret;
1707
 
 
 
 
 
 
 
 
 
 
 
 
 
1708
  }
68
  elseif ( in_array( $tab, array( 'geo' ) ) ) {
69
  $page = 'cerber-rules';
70
  }
71
+ elseif ( in_array( $tab, array( 'scanner', 'scan_settings' ) ) ) {
72
  $page = 'cerber-integrity';
73
  }
74
  else {
407
  return false;
408
  }
409
 
410
+ function cerber_is_ip( $ip ) {
411
+ return filter_var( $ip, FILTER_VALIDATE_IP );
412
+ }
413
+
414
  /**
415
  * Expands shortened IPv6 to full IPv6 address
416
  *
939
  *
940
  * @return string
941
  */
942
+ function cerber_ago_time( $time ) {
943
 
944
  return sprintf( __( '%s ago' ), human_time_diff( $time ) );
945
  }
946
 
947
+ function cerber_auto_date( $time ) {
948
+ if ( ! $time ) {
949
+ return __( 'Never', 'wp-cerber' );
950
+ }
951
+ return $time < ( time() - DAY_IN_SECONDS ) ? cerber_date( $time ) : cerber_ago_time( $time );
952
+ }
953
+
954
  /**
955
  * Format date according to user settings and timezone
956
  *
1359
  return $db;
1360
  }
1361
 
1362
+ function cerber_get_db_prefix() {
1363
+ global $wpdb;
1364
+ static $prefix = null;
1365
+ if ( $prefix === null ) {
1366
+ $prefix = $wpdb->base_prefix;
1367
+ }
1368
+
1369
+ return $prefix;
1370
+ }
1371
+
1372
  /**
1373
  * Create a WP DB handler
1374
  *
1454
  return false;
1455
  }
1456
 
1457
+ /**
1458
+ * @since 7.0
1459
+ */
1460
+ function cerber_check_groove_x() {
1461
+ $groove_x = cerber_get_groove_x();
1462
+ $key = 'cerber_groove_x_' . $groove_x[0];
1463
+ if ( isset( $_COOKIE[ $key ] ) && $_COOKIE[ $key ] == $groove_x[1] ) {
1464
+ return true;
1465
+ }
1466
+
1467
+ return false;
1468
+ }
1469
+
1470
  /*
1471
  Get the special public Cerber Sign for using with cookies
1472
  */
1723
  *
1724
  * @return string Parent directory's path
1725
  */
1726
+ function cerber_dirname( $path, $levels = 1 ) {
1727
 
1728
+ if ( PHP_VERSION_ID >= 70000 || $levels == 1 ) {
1729
  return dirname( $path, $levels );
1730
  }
1731
 
1739
 
1740
  return $ret;
1741
 
1742
+ }
1743
+
1744
+ // Return an unmodified $wp_version variable
1745
+ function cerber_get_wp_version() {
1746
+ static $v;
1747
+ if ( ! $v ) {
1748
+ global $wp_version;
1749
+ include_once( ABSPATH . WPINC . DIRECTORY_SEPARATOR . 'version.php' );
1750
+ $v = $wp_version;
1751
+ }
1752
+
1753
+ return $v;
1754
  }
dashboard.php CHANGED
@@ -61,8 +61,7 @@ function cerber_admin_menu() {
61
  }
62
 
63
  if ( ! is_multisite() ) { // <-- To be implemented
64
-
65
- //add_submenu_page( 'cerber-security', 'Cerber Security: Site Integrity', __( 'Site Integrity', 'wp-cerber' ), 'manage_options', 'cerber-integrity', 'cerber_integrity_page' );
66
  }
67
 
68
  add_submenu_page( 'cerber-security', __( 'Cerber antispam settings', 'wp-cerber' ), __( 'Antispam', 'wp-cerber' ), 'manage_options', 'cerber-recaptcha', 'cerber_recaptcha_page' );
@@ -908,8 +907,12 @@ function cerber_ip_extra_view($ip, $context = 'activity'){
908
 
909
  if (cerber_get_options('ip_extra')) {
910
  $ip_data = cerber_ip_whois_info($ip);
911
- if (isset($ip_data['whois'])) $whois = '<div id="whois">' . $ip_data['whois'] . '</div>';
912
- if (isset($ip_data['error'])) $whois = '<div id="whois">' . $ip_data['error'] . '</div>';
 
 
 
 
913
  if (isset($ip_data['country'])) $country = $ip_data['country'];
914
  if (!empty($ip_data['data']['abuse-mailbox'])) $abuse = '<p>'.__('Abuse email:','wp-cerber').' <a href="mailto:'.$ip_data['data']['abuse-mailbox'].'">'.$ip_data['data']['abuse-mailbox'].'</a></p>';
915
  if (!empty($ip_data['data']['network'])) {
@@ -976,7 +979,7 @@ function cerber_user_extra_view( $user_id, $context = 'activity' ) {
976
 
977
  $time = strtotime( cerber_db_get_var( "SELECT user_registered FROM {$wpdb->users} WHERE id = " . $user_id ) );
978
  if ( $time ) {
979
- $reg = $time < ( time() - DAY_IN_SECONDS ) ? cerber_date( $time ) : cerber_ago_time( $time );
980
  if ( $rm = get_user_meta( $user_id, '_crb_reg_', true ) ) {
981
  if ( $rm['IP'] ) {
982
  if ( $country = crb_country_html( null, $rm['IP'] ) ) {
@@ -996,7 +999,7 @@ function cerber_user_extra_view( $user_id, $context = 'activity' ) {
996
  $sn = ( $time1 < $time2 ) ? $s2 : $s1;
997
 
998
  if ( $sn ) {
999
- $seen = $sn->stamp < ( time() - DAY_IN_SECONDS ) ? cerber_date( $sn->stamp ) : cerber_ago_time( $sn->stamp );
1000
  $seen = __( 'Last seen', 'wp-cerber' ) . ': ' . $seen;
1001
  if ( $country = crb_country_html( null, $sn->ip ) ) {
1002
  $seen .= ' &nbsp; ' . $country;
@@ -1239,6 +1242,13 @@ function cerber_quick_w(){
1239
  echo '<tr><td>Cloud Protection</td><td><b>'.$status.'</b></td></tr>';
1240
  }
1241
 
 
 
 
 
 
 
 
1242
  /*
1243
  $dev = crb_get_settings('pbdevice');
1244
  if (!$dev || $dev == 'N') echo '<tr><td style="padding-top:15px;">'.__('Push notifications','wp-cerber').'</td><td style="padding-top:15px;"><b>not configured</b></td></tr>';
@@ -1260,6 +1270,72 @@ function cerber_quick_w(){
1260
  Show Help tab screen
1261
  */
1262
  function cerber_show_help() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1263
  global $crb_assets_url;
1264
 
1265
  if (lab_lab()){
@@ -1310,6 +1386,10 @@ function cerber_show_help() {
1310
  <p><span class="dashicons dashicons-before dashicons-book-alt"></span> <a target="_blank" href="https://wpcerber.com/wordpress-traffic-inspector-how-to/">Traffic Inspector and logging how to</a>
1311
  </p>
1312
 
 
 
 
 
1313
 
1314
  </td>
1315
  <td>
@@ -1442,7 +1522,7 @@ function cerber_show_help() {
1442
  */
1443
  function cerber_show_dashboard() {
1444
 
1445
- echo '<div style="padding-right: 30px;">';
1446
 
1447
  $kpi_list = cerber_calculate_kpi(1);
1448
 
@@ -1946,10 +2026,12 @@ function cerber_admin_assets() {
1946
  wp_register_style( 'crb_multi_css', $crb_assets_url . 'multi/multi.css', null, CERBER_VER );
1947
  wp_enqueue_style( 'crb_multi_css' );
1948
  wp_enqueue_script( 'crb_multi_js', $crb_assets_url . 'multi/multi.min.js', array(), CERBER_VER );
 
1949
  }
1950
 
1951
  if ( ! defined( 'CERBER_BETA' ) ) {
1952
  wp_enqueue_script( 'cerber_js', $crb_assets_url . 'admin.js', array( 'jquery' ), CERBER_VER, true );
 
1953
  }
1954
 
1955
  wp_register_style( 'cerber_css', $crb_assets_url . 'admin.css', null, CERBER_VER );
@@ -1991,6 +2073,9 @@ function cerber_admin_head(){
1991
  crb_ajax_loader = '<?php echo $crb_ajax_loader; ?>';
1992
  crb_lab_available = <?php echo $crb_lab_available; ?>;
1993
 
 
 
 
1994
  </script>
1995
 
1996
  <?php
@@ -2015,7 +2100,7 @@ function cerber_admin_head(){
2015
 
2016
  /* New */
2017
  .actv11 {
2018
- font-weight: bold;
2019
  }
2020
  #crb-activity td {
2021
  padding-top: 0.5em;
@@ -2026,7 +2111,7 @@ function cerber_admin_head(){
2026
  }
2027
  .crb10, .crb11, .crb12, .crb16, .crb17, .crb18, .crb19, .crb41, .crb42, .crb51, .crb52, .crb53, .crb54, .crb55, .crb56, .crb70, .crb71 {
2028
  /*border-left: 4px solid #FF5733;*/
2029
- font-weight: bold;
2030
  border-left: 6px solid #FF5733;
2031
  padding-bottom: 2px;
2032
  }
@@ -2052,11 +2137,24 @@ function cerber_admin_head(){
2052
 
2053
  ?>
2054
  <style type="text/css" media="all">
2055
- /* Hide alien's crap messages */
 
 
 
 
 
 
 
 
 
 
 
 
2056
  .update-nag,
2057
  #setting-error-tgmpa,
2058
  .pms-cross-promo,
2059
- .vc_license-activation-notice{
 
2060
  display: none;
2061
  }
2062
 
@@ -3145,7 +3243,6 @@ function cerber_traffic_query($args = array()){
3145
  *
3146
  */
3147
  function cerber_traffic_search(){
3148
- add_thickbox();
3149
  ?>
3150
  <div id="cerber-traffic-search" style="display:none;">
3151
 
@@ -3191,6 +3288,8 @@ function cerber_traffic_search(){
3191
 
3192
  <p><input type="submit" class="button button-primary" value="Search"></p>
3193
  </div>
 
 
3194
  </form>
3195
 
3196
  </div>
@@ -3213,3 +3312,15 @@ function cerber_get_wp_type($wp_type){
3213
 
3214
  return '';
3215
  }
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
 
63
  if ( ! is_multisite() ) { // <-- To be implemented
64
+ add_submenu_page( 'cerber-security', 'Cerber Security: Site Integrity', __( 'Site Integrity', 'wp-cerber' ), 'manage_options', 'cerber-integrity', 'cerber_integrity_page' );
 
65
  }
66
 
67
  add_submenu_page( 'cerber-security', __( 'Cerber antispam settings', 'wp-cerber' ), __( 'Antispam', 'wp-cerber' ), 'manage_options', 'cerber-recaptcha', 'cerber_recaptcha_page' );
907
 
908
  if (cerber_get_options('ip_extra')) {
909
  $ip_data = cerber_ip_whois_info($ip);
910
+ if ( isset( $ip_data['error'] ) ) {
911
+ $whois = '<div id="whois">' . $ip_data['error'] . '</div>';
912
+ }
913
+ elseif ( isset( $ip_data['whois'] ) ) {
914
+ $whois = '<div id="whois">' . $ip_data['whois'] . '</div>';
915
+ }
916
  if (isset($ip_data['country'])) $country = $ip_data['country'];
917
  if (!empty($ip_data['data']['abuse-mailbox'])) $abuse = '<p>'.__('Abuse email:','wp-cerber').' <a href="mailto:'.$ip_data['data']['abuse-mailbox'].'">'.$ip_data['data']['abuse-mailbox'].'</a></p>';
918
  if (!empty($ip_data['data']['network'])) {
979
 
980
  $time = strtotime( cerber_db_get_var( "SELECT user_registered FROM {$wpdb->users} WHERE id = " . $user_id ) );
981
  if ( $time ) {
982
+ $reg = cerber_auto_date( $time );
983
  if ( $rm = get_user_meta( $user_id, '_crb_reg_', true ) ) {
984
  if ( $rm['IP'] ) {
985
  if ( $country = crb_country_html( null, $rm['IP'] ) ) {
999
  $sn = ( $time1 < $time2 ) ? $s2 : $s1;
1000
 
1001
  if ( $sn ) {
1002
+ $seen = cerber_auto_date( $sn->stamp );
1003
  $seen = __( 'Last seen', 'wp-cerber' ) . ': ' . $seen;
1004
  if ( $country = crb_country_html( null, $sn->ip ) ) {
1005
  $seen .= ' &nbsp; ' . $country;
1242
  echo '<tr><td>Cloud Protection</td><td><b>'.$status.'</b></td></tr>';
1243
  }
1244
 
1245
+ $s = '';
1246
+ $scan = cerber_get_scan();
1247
+ if ( WEEK_IN_SECONDS < ( time() - $scan['finished'] ) ) {
1248
+ $s = 'style="color: red;"';
1249
+ }
1250
+ echo '<tr ' . $s . '><td>Malware scan</td><td><b><a href="'.cerber_admin_link( 'scanner' ).'">' . cerber_auto_date( $scan['finished'] ) . '</a></b></td></tr>';
1251
+
1252
  /*
1253
  $dev = crb_get_settings('pbdevice');
1254
  if (!$dev || $dev == 'N') echo '<tr><td style="padding-top:15px;">'.__('Push notifications','wp-cerber').'</td><td style="padding-top:15px;"><b>not configured</b></td></tr>';
1270
  Show Help tab screen
1271
  */
1272
  function cerber_show_help() {
1273
+ if ( $_GET['page'] != 'cerber-integrity' ) {
1274
+ cerber_show_general_help();
1275
+ }
1276
+ else {
1277
+ cerber_show_scan_help();
1278
+ }
1279
+ }
1280
+
1281
+ function cerber_show_scan_help() {
1282
+ global $crb_assets_url;
1283
+ ?>
1284
+ <div id="crb-help">
1285
+ <table id="admin-help">
1286
+ <tr>
1287
+ <td>
1288
+
1289
+ <h2>Using the scanner</h2>
1290
+
1291
+ <p>To start scanning, click either the Start quick scan button, or the Start full scan button. Do not close the browser window while the scan in progress. You may just open a new browser tab to do something else on the website. Once the scan is finished you can close the windows, the results are stored in the local database until the next scan.</p>
1292
+
1293
+ <p>Depending on server performance and the number of files, the Quick Scan may take about 3-5 minutes and the Full Scan can take about ten minutes or less.</p>
1294
+
1295
+ <p>During the scan, the plugin verifies plugins, themes, and WordPress by trying to download checksum data from the wordpress.org. If the integrity data is not available, you can upload appropriate source ZIP archive for a plugin or a theme. The plugin will use it to detect changes in files. You need to do it once, after the first scan.</p>
1296
+
1297
+ <h2>What's the Quick Scan?</h2>
1298
+
1299
+ <p>During the Quick Scan, the scanner verifies the integrity and inspects code of all files with executable extensions only.</p>
1300
+
1301
+ <h2>What's the Full Scan?</h2>
1302
+
1303
+ <p>During the Full Scan, the scanner verifies the integrity and examines the content of all files on the website.</p>
1304
+
1305
+ <p><a href="https://wpcerber.com/wordpress-security-scanner/" target="_blank">Read more on www.wpcerber.com</a></p>
1306
+
1307
+ </td>
1308
+ <td>
1309
+
1310
+ <h2>Interpreting scan results</h2>
1311
+
1312
+ <p>The scanner will show you a list of issues and possible actions you can take. If the integrity of an object has been verified, you see a green mark Verified. If you see the "Integrity data not found" message, please upload a reference ZIP archive by clicking "Resolve issue". For the rest of issues, click on an appropriate issue link. To view the content of a file, click on its name.</p>
1313
+
1314
+ <p>The scanner shows you short file names, to view full file names with absolute path, click the Show full paths link.</p>
1315
+
1316
+ <h2>Deleting files</h2>
1317
+
1318
+ <p>Usually, you can delete any suspicious or malicious file if it has a checkbox in its row in the leftmost cell. Before deleting a file, click the issue link in its row to see an explanation. When you delete a file the plugin moves it to a quarantine folder.</p>
1319
+
1320
+ <h2>Restoring deleted files</h2>
1321
+
1322
+ <p>If you delete an important file by chance, you can restore the file from a quarantine folder. The location of the folder is shown on the Tools / Diagnostic page. This folder is not accessible from the Internet. To restore a deleted file you need to use a file manager in you hosting control panel. The original name and location of the deleted file is saved in the .restore file. It’s a text file so you can open it in a browser or a file viewer.</p>
1323
+
1324
+ <h2>Troubleshooting</h2>
1325
+
1326
+ <p>If the scanner window stops responding or updating, it may mean the process of scanning on the server is hung. It may happen due to many reasons. Try to disable scanning the session directory or the temp directory (or both) on the Settings tab. Open the browser console (F12 key) and check it for CERBER ERROR messages.</p>
1327
+
1328
+ <p>The scanner requires the CURL library to be enabled for PHP scripts. Usually, it's enabled by default.</p>
1329
+
1330
+ </td>
1331
+ </tr>
1332
+ </table>
1333
+ </div>
1334
+ <?php
1335
+
1336
+ }
1337
+
1338
+ function cerber_show_general_help() {
1339
  global $crb_assets_url;
1340
 
1341
  if (lab_lab()){
1386
  <p><span class="dashicons dashicons-before dashicons-book-alt"></span> <a target="_blank" href="https://wpcerber.com/wordpress-traffic-inspector-how-to/">Traffic Inspector and logging how to</a>
1387
  </p>
1388
 
1389
+ <h3>What's new in this version of the plugin?</h3>
1390
+
1391
+ <p><a href="https://wpcerber.com/security/releases/">Check out release notes</a></p>
1392
+
1393
 
1394
  </td>
1395
  <td>
1522
  */
1523
  function cerber_show_dashboard() {
1524
 
1525
+ echo '<div style="padding-right: 10px;">';
1526
 
1527
  $kpi_list = cerber_calculate_kpi(1);
1528
 
2026
  wp_register_style( 'crb_multi_css', $crb_assets_url . 'multi/multi.css', null, CERBER_VER );
2027
  wp_enqueue_style( 'crb_multi_css' );
2028
  wp_enqueue_script( 'crb_multi_js', $crb_assets_url . 'multi/multi.min.js', array(), CERBER_VER );
2029
+ add_thickbox();
2030
  }
2031
 
2032
  if ( ! defined( 'CERBER_BETA' ) ) {
2033
  wp_enqueue_script( 'cerber_js', $crb_assets_url . 'admin.js', array( 'jquery' ), CERBER_VER, true );
2034
+ wp_enqueue_script( 'cerber_scan', $crb_assets_url . 'scanner.js', array( 'jquery' ), CERBER_VER, true );
2035
  }
2036
 
2037
  wp_register_style( 'cerber_css', $crb_assets_url . 'admin.css', null, CERBER_VER );
2073
  crb_ajax_loader = '<?php echo $crb_ajax_loader; ?>';
2074
  crb_lab_available = <?php echo $crb_lab_available; ?>;
2075
 
2076
+ crb_scan_msg_steps = <?php echo json_encode( cerber_step_desc() ); ?>;
2077
+ crb_scan_msg_issues = <?php echo json_encode( cerber_get_issue_desc() ); ?>;
2078
+ crb_scan_msg_risks = <?php echo json_encode( cerber_get_risk_desc() ); ?>;
2079
  </script>
2080
 
2081
  <?php
2100
 
2101
  /* New */
2102
  .actv11 {
2103
+ /*font-weight: bold;*/
2104
  }
2105
  #crb-activity td {
2106
  padding-top: 0.5em;
2111
  }
2112
  .crb10, .crb11, .crb12, .crb16, .crb17, .crb18, .crb19, .crb41, .crb42, .crb51, .crb52, .crb53, .crb54, .crb55, .crb56, .crb70, .crb71 {
2113
  /*border-left: 4px solid #FF5733;*/
2114
+ /*font-weight: bold;*/
2115
  border-left: 6px solid #FF5733;
2116
  padding-bottom: 2px;
2117
  }
2137
 
2138
  ?>
2139
  <style type="text/css" media="all">
2140
+ /* Thickbox styles */
2141
+ #TB_title {
2142
+ background-color: #008ac6 !important;
2143
+ color:#fff;
2144
+ }
2145
+ .tb-close-icon {
2146
+ color:#fff !important;
2147
+ }
2148
+ #TB_window {
2149
+ font-family: 'Roboto', sans-serif;
2150
+ }
2151
+
2152
+ /* Hide alien's crappy messages */
2153
  .update-nag,
2154
  #setting-error-tgmpa,
2155
  .pms-cross-promo,
2156
+ .vc_license-activation-notice,
2157
+ #wordfenceConfigWarning {
2158
  display: none;
2159
  }
2160
 
3243
  *
3244
  */
3245
  function cerber_traffic_search(){
 
3246
  ?>
3247
  <div id="cerber-traffic-search" style="display:none;">
3248
 
3288
 
3289
  <p><input type="submit" class="button button-primary" value="Search"></p>
3290
  </div>
3291
+
3292
+ <!-- <button type="button" class="button" onclick="tb_remove();">Cancel</button> -->
3293
  </form>
3294
 
3295
  </div>
3312
 
3313
  return '';
3314
  }
3315
+
3316
+ /**
3317
+ * Is admin AJAX is permitted. Abort execution if not.
3318
+ *
3319
+ */
3320
+ function cerber_check_ajax(){
3321
+ check_ajax_referer( 'crb-ajax-admin', 'ajax_nonce' );
3322
+
3323
+ if ( ! current_user_can( 'manage_options' ) ) {
3324
+ wp_die('Oops! Access denied.');
3325
+ }
3326
+ }
languages/wp-cerber-pt_PT.mo CHANGED
Binary file
languages/wp-cerber-pt_PT.po CHANGED
@@ -1,1330 +1,1801 @@
1
- msgid ""
2
- msgstr ""
3
- "MIME-Version: 1.0\n"
4
- "Content-Type: text/plain; charset=UTF-8\n"
5
- "Content-Transfer-Encoding: 8bit\n"
6
- "X-Generator: Loco - https://localise.biz/\n"
7
- "Project-Id-Version: WP Cerber\n"
8
- "Language: pt-PT\n"
9
- "Plural-Forms: nplurals=2; plural=n != 1\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2017-08-17 17:51+0000\n"
12
- "PO-Revision-Date: 2017-08-17 17:51+0000\n"
13
- "Last-Translator: helderk <mail@helderk.com>\n"
14
- "Language-Team: Portuguese (Portugal)"
15
-
16
- #: ../dashboard.php:74 ../dashboard.php:123
17
- msgid "Remove"
18
- msgstr "Remover"
19
-
20
- #: ../dashboard.php:77 ../dashboard.php:502 ../wp-cerber.php:2696
21
- msgid "IP"
22
- msgstr "IP"
23
-
24
- #: ../dashboard.php:77 ../dashboard.php:502
25
- msgid "Hostname"
26
- msgstr "Nome do servidor"
27
-
28
- #: ../dashboard.php:77
29
- msgid "Expires"
30
- msgstr "Expira"
31
-
32
- #: ../dashboard.php:77 ../wp-cerber.php:2402
33
- msgid "Reason"
34
- msgstr "Razão"
35
-
36
- #: ../dashboard.php:77
37
- msgid "Action"
38
- msgstr "Ação"
39
-
40
- #: ../dashboard.php:83
41
- #, php-format
42
- msgid "Showing last %d records from %d"
43
- msgstr "Últimos %d registros de %d"
44
-
45
- #: ../dashboard.php:85
46
- msgid "Hint"
47
- msgstr "Dica"
48
-
49
- #: ../dashboard.php:85
50
- msgid "To view activity, click on the IP"
51
- msgstr "Para ver a atividade, clique no IP"
52
-
53
- #: ../dashboard.php:89
54
- msgid "No lockouts at the moment. The sky is clear."
55
- msgstr "Nenhum bloqueio de momento. O céu está limpo."
56
-
57
- #: ../dashboard.php:102 ../dashboard.php:483 ../dashboard.php:663
58
- #: ../dashboard. php:902 ../wp-cerber.php:2822 ../settings.php:61
59
- #: ../settings.php:192
60
- msgid "White IP Access List"
61
- msgstr "Lista Segura de IPs"
62
-
63
- #: ../dashboard.php:102
64
- msgid "These IPs will never be locked out"
65
- msgstr "Estes IPs nunca serão bloqueados"
66
-
67
- #: ../dashboard.php:104 ../dashboard.php:484 ../dashboard.php:665
68
- #: ../dashboard. php:903
69
- msgid "Black IP Access List"
70
- msgstr "Lista Negra de IPs"
71
-
72
- #: ../dashboard.php:104
73
- msgid "Nobody can log in or register from these IPs"
74
- msgstr "Ninguém pode entrar ou se registrar a partir destes IPs"
75
-
76
- #: ../dashboard.php:106
77
- msgid "Your IP"
78
- msgstr "Seu IP"
79
-
80
- #: ../dashboard.php:123 ../dashboard.php:695
81
- msgid "Check for activity"
82
- msgstr "Verificar atividade"
83
-
84
- #: ../dashboard.php:126
85
- msgid "List is empty"
86
- msgstr "A lista está vazia"
87
-
88
- #: ../dashboard.php:130
89
- msgid "Add IP to the list"
90
- msgstr "Adicionar IP à lista"
91
-
92
- #: ../dashboard.php:150 ../dashboard.php:158
93
- msgid "Incorrect IP address or IP range"
94
- msgstr "Endereço ou faixa de IP incorretos"
95
-
96
- #: ../dashboard.php:153
97
- #, php-format
98
- msgid "Address %s was added to White IP Access List"
99
- msgstr "Endereço %s adicionado à Lista Segura de IPs"
100
-
101
- #: ../dashboard.php:162
102
- msgid "You can't add your IP address"
103
- msgstr "Não pode adicionar seu próprio IP"
104
-
105
- #: ../dashboard.php:166
106
- #, php-format
107
- msgid "Address %s was added to Black IP Access List"
108
- msgstr "Endereço %s adicionado à Lista Negra de IPs"
109
-
110
- #: ../dashboard.php:237
111
- msgid "unknown"
112
- msgstr "desconhecido"
113
-
114
- #: ../dashboard.php:259
115
- msgid "Message has been sent to "
116
- msgstr "A mensagem foi enviada para "
117
-
118
- #: ../dashboard.php:262
119
- msgid "Unable to send notification email"
120
- msgstr "Não foi possível enviar o email de notificação"
121
-
122
- #: ../dashboard.php:270
123
- #, php-format
124
- msgid "Lockout for %s was removed"
125
- msgstr "Bloqueio de %s foi removido"
126
-
127
- #: ../dashboard.php:287 ../dashboard.php:1220
128
- msgid "Settings saved"
129
- msgstr "Configurações guardadas"
130
-
131
- #: ../dashboard.php:355
132
- msgid "IP address"
133
- msgstr "Endereço de IP"
134
-
135
- #: ../dashboard.php:355 ../dashboard.php:502
136
- msgid "Date"
137
- msgstr "Data"
138
-
139
- #: ../dashboard.php:355 ../dashboard.php:502
140
- msgid "Event"
141
- msgstr "Evento"
142
-
143
- #: ../dashboard.php:355 ../dashboard.php:502
144
- msgid "Local User"
145
- msgstr "Utilizador Local"
146
-
147
- #: ../dashboard.php:355
148
- msgid "User login"
149
- msgstr "Login do utilizador"
150
-
151
- #: ../dashboard.php:355
152
- msgid "User ID"
153
- msgstr "ID do utilizador"
154
-
155
- #: ../dashboard.php:355 ../dashboard.php:502 ../wp-cerber.php:2704
156
- msgid "Username used"
157
- msgstr "Nome de utilizador usado"
158
-
159
- #: ../dashboard.php:488 ../dashboard.php:668 ../common.php:347
160
- msgid "Locked out"
161
- msgstr "Bloqueado"
162
-
163
- #: ../dashboard.php:511
164
- msgid "Export"
165
- msgstr "Exportar"
166
-
167
- #: ../dashboard.php:515
168
- msgid "No activity has been logged."
169
- msgstr "Nenhuma atividade foi registrada."
170
-
171
- #: ../dashboard.php:521
172
- msgid "All activities"
173
- msgstr "Todas as atividades"
174
-
175
- #: ../dashboard.php:530
176
- msgid "Search for IP or username"
177
- msgstr "Buscar por IP ou utilizador"
178
-
179
- #: ../dashboard.php:530
180
- msgid "Filter"
181
- msgstr "Filtrar"
182
-
183
- #: ../dashboard.php:691
184
- msgid "Abuse email:"
185
- msgstr "Email para abusos:"
186
-
187
- #: ../dashboard.php:695
188
- msgid "Network:"
189
- msgstr "Rede:"
190
-
191
- #: ../dashboard.php:709
192
- msgid "Add network to the Black List"
193
- msgstr "Adicionar rede à Lista Negra"
194
-
195
- #: ../dashboard.php:713
196
- msgid "Add IP to the Black List"
197
- msgstr "Adicionar IP à Lista Negra"
198
-
199
- #: ../dashboard.php:744 ../settings.php:215
200
- msgid "WP Cerber Security"
201
- msgstr "WP Cerber Security"
202
-
203
- #. Name of the plugin
204
- #: ../dashboard.php:744 ../dashboard.php:759
205
- msgid "WP Cerber"
206
- msgstr "WP Cerber"
207
-
208
- #: ../dashboard.php:746
209
- msgid "Cerber Dashboard"
210
- msgstr "Painel de Controle do Cerber"
211
-
212
- #: ../dashboard.php:746 ../dashboard.php:910 ../dashboard.php:1412
213
- #: ../settings. php:220
214
- msgid "Dashboard"
215
- msgstr "Painel de Controle"
216
-
217
- #: ../dashboard.php:748
218
- msgid "Cerber antispam settings"
219
- msgstr "Configurações do Cerber Anti-spam"
220
-
221
- #: ../dashboard.php:748 ../settings.php:143
222
- msgid "Antispam"
223
- msgstr "Anti-spam"
224
-
225
- #: ../dashboard.php:749
226
- msgid "Cerber tools"
227
- msgstr "Ferramentas do Cerber"
228
-
229
- #: ../dashboard.php:749 ../cerber-tools.php:43
230
- msgid "Tools"
231
- msgstr "Ferramentas"
232
-
233
- #: ../dashboard.php:802
234
- msgid "Comments"
235
- msgstr "Comentários"
236
-
237
- #: ../dashboard.php:803
238
- msgid "Last login"
239
- msgstr "Último login"
240
-
241
- #: ../dashboard.php:804
242
- msgid "Failed attempts in last 24 hours"
243
- msgstr "Tentativas falhadas de login nas últimas 24 horas"
244
-
245
- #: ../dashboard.php:805
246
- msgid "Date of registration"
247
- msgstr "Data de registro"
248
-
249
- #: ../dashboard.php:830 ../dashboard.php:885
250
- msgid "Never"
251
- msgstr "Nunca"
252
-
253
- #: ../dashboard.php:854
254
- msgid "Cerber Quick View"
255
- msgstr "Visualição Rápida do Cerber"
256
-
257
- #: ../dashboard.php:889
258
- msgid "active"
259
- msgstr "ativo"
260
-
261
- #: ../dashboard.php:889
262
- msgid "deactivate"
263
- msgstr "desativar"
264
-
265
- #: ../dashboard.php:891
266
- msgid "not active"
267
- msgstr "inativo"
268
-
269
- #: ../dashboard.php:892
270
- msgid "disabled"
271
- msgstr "desabilitado"
272
-
273
- #: ../dashboard.php:897
274
- msgid "failed attempts"
275
- msgstr "tentativas falhadas"
276
-
277
- #: ../dashboard.php:897 ../dashboard.php:898
278
- msgid "in 24 hours"
279
- msgstr "em 24 horas"
280
-
281
- #: ../dashboard.php:897 ../dashboard.php:898
282
- msgid "view all"
283
- msgstr "ver todos"
284
-
285
- #: ../dashboard.php:898
286
- msgid "lockouts"
287
- msgstr "bloqueios"
288
-
289
- #: ../dashboard.php:900
290
- msgid "Lockouts at the moment"
291
- msgstr "Bloqueios no momento"
292
-
293
- #: ../dashboard.php:901
294
- msgid "Last lockout"
295
- msgstr "Último bloqueio"
296
-
297
- #: ../dashboard.php:902 ../dashboard.php:903 ../dashboard.php:1392
298
- msgid "entry"
299
- msgid_plural "entries"
300
- msgstr[0] "entrada"
301
- msgstr[1] "entradas"
302
-
303
- #: ../dashboard.php:904 ../settings.php:76
304
- msgid "Citadel mode"
305
- msgstr "Modo Fortaleza"
306
-
307
- #: ../dashboard.php:906 ../settings.php:157
308
- msgid "Push notifications"
309
- msgstr "Notificações push"
310
-
311
- #: ../dashboard.php:911 ../dashboard.php:1082 ../wp-cerber.php:2695
312
- #: ../settings. php:82 ../settings.php:222
313
- msgid "Activity"
314
- msgstr "Atividade"
315
-
316
- #: ../dashboard.php:912 ../settings.php:226
317
- msgid "Lockouts"
318
- msgstr "Bloqueios"
319
-
320
- #: ../dashboard.php:913 ../dashboard.php:1413 ../wp-cerber.php:2828
321
- #: ../settings. php:231 ../cerber-tools.php:87 ../cerber-tools.php:96
322
- #: ../cerber-tools.php:162
323
- msgid "Access Lists"
324
- msgstr "Acessos"
325
-
326
- #: ../dashboard.php:1048
327
- msgid "Malicious activities mitigated"
328
- msgstr "Atividades maliciosas mitigadas"
329
-
330
- #: ../dashboard.php:1049
331
- msgid "Spam comments denied"
332
- msgstr "Comentários de spam rejeitados"
333
-
334
- #: ../dashboard.php:1050
335
- msgid "Malicious IP addresses detected"
336
- msgstr "Endereços IP maliciosos detectados"
337
-
338
- #: ../dashboard.php:1051
339
- msgid "Lockouts occurred"
340
- msgstr "Bloqueios ocorridos"
341
-
342
- #: ../dashboard.php:1052
343
- msgid "Locked out IP now"
344
- msgstr "Bloquear IP agora"
345
-
346
- #: ../dashboard.php:1068 ../dashboard.php:1097
347
- msgid "View all"
348
- msgstr "Ver todos"
349
-
350
- #: ../dashboard.php:1076 ../common.php:334
351
- msgid "User registered"
352
- msgstr "Utilizador registrado"
353
-
354
- #: ../dashboard.php:1077
355
- msgid "All suspicious activity"
356
- msgstr "Toda atividade suspeita"
357
-
358
- #: ../dashboard.php:1098
359
- msgid "Recently locked out IP addresses"
360
- msgstr "Endereços de IP recentemente bloqueados"
361
-
362
- #: ../dashboard.php:1120
363
- msgid "Confused about some settings?"
364
- msgstr "Confuso em relação às configurações?"
365
-
366
- #: ../dashboard.php:1121
367
- msgid "You can easily load default recommended settings using button below"
368
- msgstr "Pode carregar as configurações recomendadas clicando no botão abaixo."
369
-
370
- #: ../dashboard.php:1123
371
- msgid "Load default settings"
372
- msgstr "Carregar configurações padrão"
373
-
374
- #: ../dashboard.php:1125
375
- msgid "Are you sure?"
376
- msgstr "Tem a certeza?"
377
-
378
- #: ../dashboard.php:1131
379
- msgid "doesn't affect Custom login URL and Access Lists"
380
- msgstr "não afeta URL alternativo de login e Listas de Acesso"
381
-
382
- #: ../dashboard.php:1150
383
- msgid "Donate"
384
- msgstr "Doar"
385
-
386
- #: ../dashboard.php:1203
387
- msgid "Attention! Citadel mode is now active. Nobody is able to log in."
388
- msgstr "Atenção! O modo Fortaleza está ativo. Ninguém pode fazer login."
389
-
390
- #: ../dashboard.php:1204
391
- msgid "Deactivate"
392
- msgstr "Desativar"
393
-
394
- #: ../dashboard.php:1205
395
- msgid "View Activity"
396
- msgstr "Ver Atividade"
397
-
398
- #: ../dashboard.php:1280
399
- msgid "New version is available"
400
- msgstr "Nova versão disponível"
401
-
402
- #: ../dashboard.php:1286
403
- #, php-format
404
- msgid "Update to version %s of WP Cerber"
405
- msgstr "Atualizar WP Cerber para a versão %s"
406
-
407
- #: ../dashboard.php:1325
408
- msgid "Subscribe"
409
- msgstr "Inscrever"
410
-
411
- #: ../dashboard.php:1326
412
- msgid "Unsubscribe"
413
- msgstr "Cancelar inscrição"
414
-
415
- #: ../dashboard.php:1354
416
- msgid "You've subscribed"
417
- msgstr "Já está inscrito"
418
-
419
- #: ../dashboard.php:1357
420
- msgid "You've unsubscribed"
421
- msgstr "Você cancelou sua inscrição"
422
-
423
- #. URI of the plugin
424
- msgid "http://wpcerber.com"
425
- msgstr "http://wpcerber.com"
426
-
427
- #. Description of the plugin
428
- msgid ""
429
- "Protects site from brute force attacks, bots and hackers. Antispam "
430
- "protection with reCAPTCHA. Comprehensive control of user activity. Restrict "
431
- "login by IP access lists. Limit login attempts. Know more: <a href=\"http:"
432
- "//wpcerber.com\">wpcerber.com</a>."
433
- msgstr ""
434
- "Protege o site de ataques de força bruta, bots e hackers. Proteção antispam "
435
- "com reCAPTCHA. Controlo abrangente da atividade do utilizador. Restringir o "
436
- "login por listas de acesso IP. Limite as tentativas de login. Saiba mais: <a "
437
- "href=\"http://wpcerber.com\"> wpcerber.com </a>."
438
-
439
- #. Author of the plugin
440
- msgid "Gregory"
441
- msgstr "Gregory"
442
-
443
- #: ../wp-cerber.php:215
444
- msgid "You are not allowed to log in. Ask your administrator for assistance."
445
- msgstr "Não tem permissão para entrar. Contacte o administrador."
446
-
447
- #: ../wp-cerber.php:221
448
- #, php-format
449
- msgid ""
450
- "You have reached the login attempts limit. Please try again in %d minutes."
451
- msgstr ""
452
- "Atingiu o limite de tentativas de login. Por favor, tente novamente em %d "
453
- "minutos."
454
-
455
- #: ../wp-cerber.php:240
456
- #, php-format
457
- msgid "You have only one attempt remaining."
458
- msgid_plural "You have %d attempts remaining."
459
- msgstr[0] "Resta-lhe apenas uma tentativa."
460
- msgstr[1] "Resta-lhe %d tentativas."
461
-
462
- #: ../wp-cerber.php:560 ../wp-cerber.php:572 ../wp-cerber.php:579
463
- #: ../wp-cerber. php:717 ../wp-cerber.php:922 ../wp-cerber.php:927
464
- #: ../wp-cerber.php:932 ../wp- cerber.php:938 ../wp-cerber.php:968
465
- #: ../wp-cerber.php:1062 ../common.php:128 .. common.php:181 ../common.php:185
466
- #: ../settings.php:513
467
- msgid "ERROR:"
468
- msgstr "ERRO:"
469
-
470
- #: ../wp-cerber.php:589
471
- msgid ""
472
- "Human verification failed. Please click the square box in the reCAPTCHA "
473
- "block below."
474
- msgstr ""
475
- "A verificação humana falhou. Por favor, clique no quadrado do bloco "
476
- "reCAPTCHA abaixo."
477
-
478
- #: ../wp-cerber.php:728
479
- #, php-format
480
- msgid ""
481
- "<strong>ERROR</strong>: The password you entered for the username %s is "
482
- "incorrect."
483
- msgstr ""
484
- "<strong>ERRO</strong>: A senha que você digitou para o utilizador %s está "
485
- "incorreta."
486
-
487
- #: ../wp-cerber.php:923 ../wp-cerber.php:939
488
- msgid "You are not allowed to register."
489
- msgstr "Não tem permissão para se registrar."
490
-
491
- #: ../wp-cerber.php:933
492
- msgid "Username is not allowed. Please choose another one."
493
- msgstr "O nome de utilizador não é permitido. Por favor, escolha outro nome."
494
-
495
- #: ../wp-cerber.php:1062
496
- msgid "Sorry, human verification failed."
497
- msgstr "Desculpe, falhou a verificação humana."
498
-
499
- #: ../wp-cerber.php:2348
500
- msgid "WP Cerber notify"
501
- msgstr "Notificações WP Cerber"
502
-
503
- #: ../wp-cerber.php:2366
504
- msgid "Citadel mode is activated"
505
- msgstr "Modo Fortaleza está ativo"
506
-
507
- #: ../wp-cerber.php:2368
508
- #, php-format
509
- msgid "Citadel mode is activated after %d failed login attempts in %d minutes."
510
- msgstr ""
511
- "O modo Fortaleza é atividado após %d tentaivas de login falhadas em %d "
512
- "minutos."
513
-
514
- #: ../wp-cerber.php:2369
515
- #, php-format
516
- msgid "Last failed attempt was at %s from IP %s with user login: %s."
517
- msgstr ""
518
- "Última tentativa de login falhada foi às %s do IP %s com o login de "
519
- "utilizador: %s."
520
-
521
- #: ../wp-cerber.php:2370 ../wp-cerber.php:2720
522
- msgid "View activity in dashboard"
523
- msgstr "Ver atividade no painel"
524
-
525
- #: ../wp-cerber.php:2395
526
- msgid "unspecified"
527
- msgstr "não especificado"
528
-
529
- #: ../wp-cerber.php:2398
530
- msgid "Number of lockouts is increasing"
531
- msgstr "O número de bloqueios está aumentando"
532
-
533
- #: ../wp-cerber.php:2400
534
- msgid "Number of active lockouts"
535
- msgstr "Número de bloqueios ativos"
536
-
537
- #: ../wp-cerber.php:2401
538
- #, php-format
539
- msgid "Last lockout was added: %s for IP %s"
540
- msgstr "Último bloqueio foi adicionado: %s para o IP %s"
541
-
542
- #: ../wp-cerber.php:2403
543
- msgid "View activity for this IP"
544
- msgstr "Ver atividade do IP"
545
-
546
- #: ../wp-cerber.php:2404
547
- msgid "View lockouts in dashboard"
548
- msgstr "Ver bloqueios no painel"
549
-
550
- #: ../wp-cerber.php:2407 ../wp-cerber.php:2409
551
- msgid "A new version of WP Cerber is available to install"
552
- msgstr "Uma nova versão do WP Cerber está disponível para ser instalada"
553
-
554
- #: ../wp-cerber.php:2408
555
- msgid "Hi!"
556
- msgstr "Olá!"
557
-
558
- #: ../wp-cerber.php:2410 ../wp-cerber.php:2421
559
- msgid "Website"
560
- msgstr "Website"
561
-
562
- #: ../wp-cerber.php:2413 ../wp-cerber.php:2414
563
- msgid "The WP Cerber security plugin has been deactivated"
564
- msgstr "O plugin de segurança WP Cerber foi desativado"
565
-
566
- #: ../wp-cerber.php:2416
567
- msgid "Not logged in"
568
- msgstr "Não Logado"
569
-
570
- #: ../wp-cerber.php:2422
571
- msgid "By user"
572
- msgstr "Pelo utilizador"
573
-
574
- #: ../wp-cerber.php:2423
575
- msgid "From IP address"
576
- msgstr "Do endereço de IP"
577
-
578
- #: ../wp-cerber.php:2426
579
- msgid "From country"
580
- msgstr "Do país"
581
-
582
- #: ../wp-cerber.php:2430
583
- msgid "The WP Cerber security plugin is now active"
584
- msgstr "O plugin de segurança WP Cerber está agora ativado"
585
-
586
- #: ../wp-cerber.php:2431 ../wp-cerber.php:2821
587
- msgid "WP Cerber is now active and has started protecting your site"
588
- msgstr "WP Cerver está ativo agora e já começou a proteger o seu site"
589
-
590
- #: ../wp-cerber.php:2432
591
- msgid "Change notification settings"
592
- msgstr "Alterar configurações de notificações"
593
-
594
- #: ../wp-cerber.php:2437
595
- msgid "New Custom login URL"
596
- msgstr "Novo URL alternativo de login"
597
-
598
- #: ../wp-cerber.php:2441 ../wp-cerber.php:2442
599
- msgid "A new activity has been recorded"
600
- msgstr "Uma nova atividade foi capturada"
601
-
602
- #: ../wp-cerber.php:2457
603
- msgid "This message was sent by"
604
- msgstr "Esta mensagem foi enviada por"
605
-
606
- #: ../wp-cerber.php:2700
607
- msgid "User"
608
- msgstr "Utilizador"
609
-
610
- #: ../wp-cerber.php:2708
611
- msgid "Search string"
612
- msgstr "Termo pesquisado"
613
-
614
- #: ../wp-cerber.php:2721
615
- msgid "To unsubscribe click here"
616
- msgstr "Para cancelar sua inscrição, clique aqui"
617
-
618
- #: ../wp-cerber.php:2796
619
- #, php-format
620
- msgid "The WP Cerber requires PHP %s or higher. You are running"
621
- msgstr "WP Cerber requer PHP %s ou mais recente. Actualmente está correndo"
622
-
623
- #: ../wp-cerber.php:2800
624
- #, php-format
625
- msgid "The WP Cerber requires WordPress %s or higher. You are running"
626
- msgstr ""
627
- "WP Cerber requer Wordpress %s ou mais recente. Actualmente está correndo"
628
-
629
- #: ../wp-cerber.php:2805
630
- msgid "Can't activate WP Cerber due to a database error."
631
- msgstr ""
632
- "Não foi possível ativar o WP Cerber devido a um erro na conexão com a base "
633
- "de dados."
634
-
635
- #: ../wp-cerber.php:2822
636
- msgid "Your IP address is added to the"
637
- msgstr "Seu endereço de IP foi adicionado à"
638
-
639
- #: ../wp-cerber.php:2824
640
- msgid "It's important to check security settings."
641
- msgstr "É importante verificar as configurações de segurança."
642
-
643
- #: ../wp-cerber.php:2827 ../settings.php:228
644
- msgid "Main Settings"
645
- msgstr "Configurações"
646
-
647
- #: ../wp-cerber.php:2829 ../settings.php:233
648
- msgid "Hardening"
649
- msgstr "Fortalecendo"
650
-
651
- #: ../wp-cerber.php:2830 ../settings.php:62 ../settings.php:80
652
- #: ../settings.php:238
653
- msgid "Notifications"
654
- msgstr "Notificações"
655
-
656
- #: ../wp-cerber.php:2831
657
- msgid "Import settings"
658
- msgstr "Importar configurações"
659
-
660
- #: ../whois.php:210 ../common.php:374
661
- msgid "Unknown"
662
- msgstr "Desconhecido"
663
-
664
- #: ../common.php:333
665
- msgid "User created"
666
- msgstr "Utilizador criado"
667
-
668
- #: ../common.php:335
669
- msgid "Logged in"
670
- msgstr "Logado"
671
-
672
- #: ../common.php:336
673
- msgid "Logged out"
674
- msgstr "Desconectado"
675
-
676
- #: ../common.php:337
677
- msgid "Login failed"
678
- msgstr "Falha no login"
679
-
680
- #: ../common.php:340
681
- msgid "IP blocked"
682
- msgstr "IP bloqueado"
683
-
684
- #: ../common.php:341
685
- msgid "Subnet blocked"
686
- msgstr "Sub-rede bloqueada"
687
-
688
- #: ../common.php:343
689
- msgid "Citadel activated!"
690
- msgstr "Fortaleza ativada!"
691
-
692
- #: ../common.php:344
693
- msgid "Spam comment denied"
694
- msgstr "Comentário de spam negado"
695
-
696
- #: ../common.php:348
697
- msgid "IP blacklisted"
698
- msgstr "IP bloqueado"
699
-
700
- #: ../common.php:350
701
- msgid "by Cerber Lab"
702
- msgstr "by Cerber Lab"
703
-
704
- #: ../common.php:354
705
- msgid "Password changed"
706
- msgstr "Senha alterada"
707
-
708
- #: ../common.php:355
709
- msgid "Password reset requested"
710
- msgstr "Redefinição de senha solicitada"
711
-
712
- #: ../common.php:357
713
- msgid "reCAPTCHA verification failed"
714
- msgstr "A verificação do reCAPTCHA falhou"
715
-
716
- #: ../common.php:358
717
- msgid "reCAPTCHA settings are incorrect"
718
- msgstr "As configurações do reCAPTCHA estão incorretas"
719
-
720
- #: ../common.php:359
721
- msgid "Request to the Google reCAPTCHA service failed"
722
- msgstr "A requisição para o serviço Google reCAPTCHA falhou"
723
-
724
- #: ../common.php:361
725
- msgid "Attempt to access prohibited URL"
726
- msgstr "Tentativa de acesso a URL proibido"
727
-
728
- #: ../common.php:362 ../common.php:377
729
- msgid "Attempt to log in with non-existent username"
730
- msgstr "Tentativa de login com nome de utilizador não existente"
731
-
732
- #: ../common.php:363 ../common.php:378
733
- msgid "Attempt to log in with prohibited username"
734
- msgstr "Tentativa de login com nome de utilizador proibido."
735
-
736
- #: ../common.php:365
737
- msgid "Attempt to log in denied"
738
- msgstr "Tentativa de login negado"
739
-
740
- #: ../common.php:366
741
- msgid "Attempt to register denied"
742
- msgstr "Tentativa de registro negado"
743
-
744
- #: ../common.php:375
745
- msgid "Limit on login attempts is reached"
746
- msgstr "O limite de tentativas de login foi atingido"
747
-
748
- #: ../common.php:376
749
- msgid "Attempt to access"
750
- msgstr "Tentativa de acesso"
751
-
752
- #: ../common.php:379
753
- msgid "Limit on failed reCAPTCHA verifications is reached"
754
- msgstr "Foi atingido o limite de verificações falhadas do reCAPTCHA"
755
-
756
- #: ../common.php:380
757
- msgid "Bot activity is detected"
758
- msgstr "Detectada atividade de bot"
759
-
760
- #: ../common.php:432
761
- #, php-format
762
- msgid "%s ago"
763
- msgstr "%s atrás"
764
-
765
- #: ../cerber-lab.php:576
766
- msgid "Want to make WP Cerber even more powerful?"
767
- msgstr "Gostaria de fazer o WP Cerber ainda mais poderoso?"
768
-
769
- #: ../cerber-lab.php:577
770
- msgid ""
771
- "Allow WP Cerber to send locked out malicious IP addresses to Cerber Lab. "
772
- "This helps the plugin team to develop new algorithms for WP Cerber that will "
773
- "defend WordPress against new threats and botnets that are appearing "
774
- "everyday. You can disable the sending in the plugin settings at any time."
775
- msgstr ""
776
- "Permita que o WP Cerber envie endereços de IP maliciosos para o Cerber Lab. "
777
- "Isso ajuda os desenvolvedores do plugin a criarem algoritmos para defender o "
778
- "WordPress de novas ameaças e botnets que surgem dia-a-dia. Pode desabilitar "
779
- "este envio a qualquer momento nas configurações do plugin."
780
-
781
- #: ../cerber-lab.php:578
782
- msgid "OK, nail them all"
783
- msgstr "OK, acabe com eles"
784
-
785
- #: ../cerber-lab.php:579
786
- msgid "NO, maybe later"
787
- msgstr "NÃO, talvez mais tarde"
788
-
789
- #: ../cerber-lab.php:580 ../settings.php:196
790
- msgid "Know more"
791
- msgstr "Saiba mais"
792
-
793
- #: ../settings.php:57
794
- msgid "Limit login attempts"
795
- msgstr "Limitar tentativas de login"
796
-
797
- #: ../settings.php:58
798
- msgid "Attempts"
799
- msgstr "Tentativas"
800
-
801
- #: ../settings.php:59
802
- msgid "Lockout duration"
803
- msgstr "Duração do bloqueio"
804
-
805
- #: ../settings.php:59 ../settings.php:78
806
- msgid "minutes"
807
- msgstr "minutos"
808
-
809
- #: ../settings.php:60
810
- msgid "Aggressive lockout"
811
- msgstr "Bloqueio agressivo"
812
-
813
- #: ../settings.php:61
814
- msgid "Apply limit login rules to IP addresses in the White IP Access List"
815
- msgstr ""
816
- "Aplicar regras de limite para login aos endereçoes de IP da Lista Segura"
817
-
818
- #: ../settings.php:63
819
- msgid "Site connection"
820
- msgstr "Conexão do site"
821
-
822
- #: ../settings.php:63
823
- msgid "My site is behind a reverse proxy"
824
- msgstr "Meu site está sob um proxy reverso"
825
-
826
- #: ../settings.php:65
827
- msgid "Proactive security rules"
828
- msgstr "Regras de segurança proativa"
829
-
830
- #: ../settings.php:66
831
- msgid "Block subnet"
832
- msgstr "Bloquear sub-rede"
833
-
834
- #: ../settings.php:66
835
- msgid "Always block entire subnet Class C of intruders IP"
836
- msgstr "Sempre bloquear toda a sub-rede classe C de IPs invasores"
837
-
838
- #: ../settings.php:67
839
- msgid "Non-existent users"
840
- msgstr "Utilizadores não existentes"
841
-
842
- #: ../settings.php:67
843
- msgid ""
844
- "Immediately block IP when attempting to login with a non-existent username"
845
- msgstr ""
846
- "Bloquear IP imediatamente nas tentativas de login com nomes de utilizadores "
847
- "não existentes"
848
-
849
- #: ../settings.php:68
850
- msgid "Redirect dashboard requests"
851
- msgstr "Redirecionar requisições ao painel"
852
-
853
- #: ../settings.php:68
854
- msgid ""
855
- "Disable automatic redirecting to the login page when /wp-admin/ is requested "
856
- "by an unauthorized request"
857
- msgstr ""
858
- "Desabilitar redirecionamento automático para a página de login quando /wp-"
859
- "admin/ é requisitada sem autorização"
860
-
861
- #: ../settings.php:69
862
- msgid "Request wp-login.php"
863
- msgstr "Requisitar wp-login.php"
864
-
865
- #: ../settings.php:69
866
- msgid "Immediately block IP after any request to wp-login.php"
867
- msgstr "Bloquer IP imediatamente após qualquer requisição a wp-login.php"
868
-
869
- #: ../settings.php:70
870
- msgid "Display 404 page"
871
- msgstr "Exibir página 404"
872
-
873
- #: ../settings.php:72
874
- msgid "Custom login page"
875
- msgstr "Página alternativa de login"
876
-
877
- #: ../settings.php:73
878
- msgid "Custom login URL"
879
- msgstr "URL alternativo de login"
880
-
881
- #: ../settings.php:73
882
- msgid "must not overlap with the existing pages or posts slug"
883
- msgstr "não se deve sobrepor aos links permanentes de páginas e posts"
884
-
885
- #: ../settings.php:74
886
- msgid "Disable wp-login.php"
887
- msgstr "Desabilitar wp-login.php"
888
-
889
- #: ../settings.php:74
890
- msgid "Block direct access to wp-login.php and return HTTP 404 Not Found Error"
891
- msgstr "Bloquear acesso direto a wp-login.php e retornar o erro HTTP 404"
892
-
893
- #: ../settings.php:77
894
- msgid "Threshold"
895
- msgstr "Limite"
896
-
897
- #: ../settings.php:78
898
- msgid "Duration"
899
- msgstr "Duração"
900
-
901
- #: ../settings.php:80
902
- msgid "Send notification to admin email"
903
- msgstr "Enviar notificação para o email do administrador"
904
-
905
- #: ../settings.php:80 ../settings.php:367
906
- msgid "Click to send test"
907
- msgstr "Clique para enviar teste"
908
-
909
- #: ../settings.php:83
910
- msgid "Keep records for"
911
- msgstr "Guardar registros por"
912
-
913
- #: ../settings.php:83 ../settings.php:126
914
- msgid "days"
915
- msgstr "dias"
916
-
917
- #: ../settings.php:84
918
- msgid "Cerber Lab connection"
919
- msgstr "Conexão Cerber Lab"
920
-
921
- #: ../settings.php:84
922
- msgid "Send malicious IP addresses to the Cerber Lab"
923
- msgstr "Enviar endereço de IP malicioso para o Cerber Lab"
924
-
925
- #: ../settings.php:85
926
- msgid "Cerber Lab protocol"
927
- msgstr "Protocolo Cerber Lab"
928
-
929
- #: ../settings.php:86
930
- msgid "Use file"
931
- msgstr "Usar arquivo"
932
-
933
- #: ../settings.php:86
934
- msgid "Write failed login attempts to the file"
935
- msgstr "Escrever tentativas falhadas de login em um arquivo"
936
-
937
- #: ../settings.php:88
938
- msgid "Preferences"
939
- msgstr "Preferências"
940
-
941
- #: ../settings.php:89
942
- msgid "Drill down IP"
943
- msgstr "Rastrear IP"
944
-
945
- #: ../settings.php:89
946
- msgid "Retrieve extra WHOIS information for IP"
947
- msgstr "Receber informação extra de WHOIS para o IP"
948
-
949
- #: ../settings.php:90
950
- msgid "Date format"
951
- msgstr "Formato da data"
952
-
953
- #: ../settings.php:90
954
- #, php-format
955
- msgid "if empty, the default format %s will be used"
956
- msgstr "se vazio, o formato padrão %s será usado"
957
-
958
- #: ../settings.php:97
959
- msgid "Hardening WordPress"
960
- msgstr "Fortalecendo o Wordpress"
961
-
962
- #: ../settings.php:98
963
- msgid "Stop user enumeration"
964
- msgstr "Bloquear enumeração de utilizador"
965
-
966
- #: ../settings.php:98
967
- msgid "Block access to the pages like /?author=n"
968
- msgstr "Bloquear acesso a páginas como /?autor=n"
969
-
970
- #: ../settings.php:99
971
- msgid "Disable XML-RPC"
972
- msgstr "Desabilitar XML-RPC"
973
-
974
- #: ../settings.php:99
975
- msgid "Block access to the XML-RPC server (including Pingbacks and Trackbacks)"
976
- msgstr "Bloquear acesso ao servidor XML-RPC (incluindo Pingbacks e Trackbacks)"
977
-
978
- #: ../settings.php:100
979
- msgid "Disable feeds"
980
- msgstr "Desabilitar feeds"
981
-
982
- #: ../settings.php:100
983
- msgid "Block access to the RSS, Atom and RDF feeds"
984
- msgstr "Bloquear acesso aos feeds RSS, Atom e RDF"
985
-
986
- #: ../settings.php:101
987
- msgid "Disable REST API"
988
- msgstr "Desabilitar API REST"
989
-
990
- #: ../settings.php:101
991
- msgid "Block access to the WordPress REST API"
992
- msgstr "Bloquear acesso à API REST do Wordpress"
993
-
994
- #: ../settings.php:110
995
- msgid "User related settings"
996
- msgstr "Configurações de utilizador"
997
-
998
- #: ../settings.php:111
999
- msgid "Prohibited usernames"
1000
- msgstr "Nomes de utilizadores proibidos"
1001
-
1002
- #: ../settings.php:111
1003
- msgid ""
1004
- "Usernames from this list are not allowed to log in or register. Any IP "
1005
- "address, have tried to use any of these usernames, will be immediately "
1006
- "blocked. Use comma to separate logins."
1007
- msgstr ""
1008
- "Nomes de utilizadores desta lista não podem fazer login ou serem registrados."
1009
- " Qualquer endereço de IP que tentar utilizar algum destes nomes será "
1010
- "imediatamente bloqueado. Utilize vírgulas para separar os logins."
1011
-
1012
- #: ../settings.php:112
1013
- msgid "User session expire"
1014
- msgstr "Sessão de utilizador expira"
1015
-
1016
- #: ../settings.php:112
1017
- msgid "in minutes (leave empty to use default WP value)"
1018
- msgstr "em minutos (deixe em branco para usar o valor padrão do Wordpress)"
1019
-
1020
- #: ../settings.php:119
1021
- msgid "Cerber antispam engine"
1022
- msgstr "Motor Cerber anti-spam"
1023
-
1024
- #: ../settings.php:120
1025
- msgid "Comment form"
1026
- msgstr "Formulário de comentário"
1027
-
1028
- #: ../settings.php:120
1029
- msgid "Protect comment form with bot detection engine"
1030
- msgstr "Proteja o formulário de comentários com motor de detecção de bot"
1031
-
1032
- #: ../settings.php:121 ../settings.php:134
1033
- msgid "Registration form"
1034
- msgstr "Formulário de registo"
1035
-
1036
- #: ../settings.php:121
1037
- msgid "Protect registration form with bot detection engine"
1038
- msgstr "Proteja o formulário de inscrição com motor de detecção de bot"
1039
-
1040
- #: ../settings.php:124
1041
- msgid "Comment processing"
1042
- msgstr "Processamento de comentários"
1043
-
1044
- #: ../settings.php:125
1045
- msgid "If a spam comment detected"
1046
- msgstr "Se um comentário de spam for detectado"
1047
-
1048
- #: ../settings.php:126
1049
- msgid "Trash spam comments"
1050
- msgstr "Comentários de spam"
1051
-
1052
- #: ../settings.php:126
1053
- msgid "Move spam comments to trash after"
1054
- msgstr "Mova comentários de spam para o lixo após"
1055
-
1056
- #: ../settings.php:129
1057
- msgid "reCAPTCHA settings"
1058
- msgstr "Configurações do reCAPTCHA"
1059
-
1060
- #: ../settings.php:130
1061
- msgid "Site key"
1062
- msgstr "Chave do site"
1063
-
1064
- #: ../settings.php:131
1065
- msgid "Secret key"
1066
- msgstr "Chave secreta"
1067
-
1068
- #: ../settings.php:132
1069
- msgid "Invisible reCAPTCHA"
1070
- msgstr "reCAPTCHA invisível"
1071
-
1072
- #: ../settings.php:132
1073
- msgid "Enable invisible reCAPTCHA"
1074
- msgstr "Habilitar reCAPTCHA invisível"
1075
-
1076
- #: ../settings.php:132
1077
- msgid ""
1078
- "(do not enable it unless you get and enter the Site and Secret keys for the "
1079
- "invisible version)"
1080
- msgstr ""
1081
- "(não habilite esta opção a menos que tenha as Chaves do Site e Secreta para "
1082
- "esta versão invisível)"
1083
-
1084
- #: ../settings.php:134
1085
- msgid "Enable reCAPTCHA for WordPress registration form"
1086
- msgstr "Habilitar reCAPTCHA para o formulário de registro do Wordpress"
1087
-
1088
- #: ../settings.php:135
1089
- msgid "Enable reCAPTCHA for WooCommerce registration form"
1090
- msgstr "Habilitar reCAPTCHA para o formulário de registro do WooCommerce"
1091
-
1092
- #: ../settings.php:137
1093
- msgid "Lost password form"
1094
- msgstr "A senha do formulário foi perdida"
1095
-
1096
- #: ../settings.php:137
1097
- msgid "Enable reCAPTCHA for WordPress lost password form"
1098
- msgstr "Habilitar reCAPTCHA para o formulário de senha perdida do Wordpress"
1099
-
1100
- #: ../settings.php:138
1101
- msgid "Enable reCAPTCHA for WooCommerce lost password form"
1102
- msgstr "Habilitar reCAPTCHA para o formulário de senha perdida do WooCommerce"
1103
-
1104
- #: ../settings.php:140
1105
- msgid "Login form"
1106
- msgstr "Formulário de login"
1107
-
1108
- #: ../settings.php:140
1109
- msgid "Enable reCAPTCHA for WordPress login form"
1110
- msgstr "Habilitar reCAPTCHA para o formulário de login do Wordpress"
1111
-
1112
- #: ../settings.php:141
1113
- msgid "Enable reCAPTCHA for WooCommerce login form"
1114
- msgstr "Habilitar reCAPTCHA para o formulário de login do WooCommerce"
1115
-
1116
- #: ../settings.php:143
1117
- msgid "Enable reCAPTCHA for WordPress comment form"
1118
- msgstr "Habilitar reCAPTCHA para o formulário de comentários do Wordpress"
1119
-
1120
- #: ../settings.php:144
1121
- msgid "Disable reCAPTCHA for logged in users"
1122
- msgstr "Desabilitar reCAPTCHA para utilizador conectados"
1123
-
1124
- #: ../settings.php:146
1125
- msgid "Limit attempts"
1126
- msgstr "Limitar tentativas"
1127
-
1128
- #: ../settings.php:146
1129
- #, php-format
1130
- msgid ""
1131
- "Lock out IP address for %s minutes after %s failed attempts within %s minutes"
1132
- msgstr ""
1133
- "Bloquear endereço de IP por %s minutos depois de %s tentativas falhadas "
1134
- "dentro de %s minutos"
1135
-
1136
- #: ../settings.php:152
1137
- msgid "Email notifications"
1138
- msgstr "Notificações por email"
1139
-
1140
- #: ../settings.php:154
1141
- msgid "Email Address"
1142
- msgstr "Endereço de Email"
1143
-
1144
- #: ../settings.php:154
1145
- msgid "Use comma to specify multiple values"
1146
- msgstr "Use vírgulas para separar múltiplos valores"
1147
-
1148
- #: ../settings.php:154
1149
- #, php-format
1150
- msgid "if empty, the admin email %s will be used"
1151
- msgstr "se vazio, o email do administrador %s será usado"
1152
-
1153
- #: ../settings.php:155
1154
- msgid "Notification limit"
1155
- msgstr "Limite de notificação"
1156
-
1157
- #: ../settings.php:155
1158
- msgid "notification letters allowed per hour (0 means unlimited)"
1159
- msgstr "notificações permitidas por hora (0 significa ilimitadas)"
1160
-
1161
- #: ../settings.php:164
1162
- msgid "All connected devices"
1163
- msgstr "Todos os dispositivos conectados"
1164
-
1165
- #: ../settings.php:165
1166
- msgid "No devices found"
1167
- msgstr "Nenhum dispositivo encontrado"
1168
-
1169
- #: ../settings.php:167
1170
- msgid "Not available"
1171
- msgstr "Não disponível"
1172
-
1173
- #: ../settings.php:178
1174
- msgid "Make your protection smarter!"
1175
- msgstr "Deixe sua proteção mais inteligente!"
1176
-
1177
- #: ../settings.php:182
1178
- msgid ""
1179
- "Please enable Permalinks to use this feature. Set Permalink Settings to "
1180
- "something other than Default."
1181
- msgstr ""
1182
- "Habilitar as Ligações Permanentes para utilizar essa funcionalidade. "
1183
- "Configure os Ligações Permanentes para um valor diferente ao pre-definido."
1184
-
1185
- #: ../settings.php:185
1186
- msgid ""
1187
- "Be careful when enabling this options. If you forget the custom login URL "
1188
- "you will not be able to login."
1189
- msgstr ""
1190
- "Tenha cuidado ao habilitar essas opções. Se não se lembrar do URL de login, "
1191
- "não será capaz de fazer o Login."
1192
-
1193
- #: ../settings.php:189
1194
- msgid ""
1195
- "In the Citadel mode nobody is able to log in except IPs from the White IP "
1196
- "Access List. Active user sessions will not be affected."
1197
- msgstr ""
1198
- "No modo Fortaleza apenas os IPs da Lista Segura se podem conectar. Sessões "
1199
- "ativas de utilizadores não serão afetadas."
1200
-
1201
- #: ../settings.php:192
1202
- msgid "These settings do not affect hosts from the "
1203
- msgstr "Estas configurações não afetam servidores do "
1204
-
1205
- #: ../settings.php:195
1206
- msgid ""
1207
- "Before you can start using reCAPTCHA, you have to obtain Site key and Secret "
1208
- "key on the Google website"
1209
- msgstr ""
1210
- "Antes de começar a utilizar o reCAPTCHA, você precisa obter uma Chave do "
1211
- "Site uma Chave Secreta no website do Google"
1212
-
1213
- #: ../settings.php:235
1214
- msgid "Users"
1215
- msgstr "Utilizadores"
1216
-
1217
- #: ../settings.php:240
1218
- msgid "Help"
1219
- msgstr "Ajuda"
1220
-
1221
- #: ../settings.php:353
1222
- #, php-format
1223
- msgid "%s allowed retries in %s minutes"
1224
- msgstr "%s tentativas restantes em %s minutos"
1225
-
1226
- #: ../settings.php:358
1227
- #, php-format
1228
- msgid ""
1229
- "Increase lockout duration to %s hours after %s lockouts in the last %s hours"
1230
- msgstr ""
1231
- "Aumentar a duração do bloqueio para %s horas após %s bloqueios nas últimas "
1232
- "%s horas."
1233
-
1234
- #: ../settings.php:365
1235
- msgid "Notify admin if the number of active lockouts above"
1236
- msgstr "Notificar o administrador caso o número de bloqueios ativos seja acima"
1237
-
1238
- #: ../settings.php:370
1239
- #, php-format
1240
- msgid "Enable after %s failed login attempts in last %s minutes"
1241
- msgstr "Habilitar após %s tentativas falhadas de login nos últimos %s minutos"
1242
-
1243
- #: ../settings.php:460
1244
- msgid "Attention! You have changed the login URL! The new login URL is"
1245
- msgstr "Atenção! Você alterou o URL de login! O novo URL de login é"
1246
-
1247
- #: ../settings.php:540
1248
- msgid "<strong>ERROR</strong>: please enter a valid email address."
1249
- msgstr "<strong>ERRO</strong>: favor digitar um endereço de email válido."
1250
-
1251
- #: ../cerber-tools.php:48
1252
- msgid "Export & Import"
1253
- msgstr "Exportar e importar"
1254
-
1255
- #: ../cerber-tools.php:49
1256
- msgid "Diagnostic"
1257
- msgstr "Diagnóstico"
1258
-
1259
- #: ../cerber-tools.php:83
1260
- msgid "Export settings to the file"
1261
- msgstr "Exportar configurações para o arquivo"
1262
-
1263
- #: ../cerber-tools.php:84
1264
- msgid ""
1265
- "When you click the button below you will get a configuration file, which you "
1266
- "can upload on another site."
1267
- msgstr ""
1268
- "Para descarregar um arquivo de configuração que poderá usar em outros sites, "
1269
- "clicar no botão abaixo."
1270
-
1271
- #: ../cerber-tools.php:85
1272
- msgid "What do you want to export?"
1273
- msgstr "O que gostaria de exportar?"
1274
-
1275
- #: ../cerber-tools.php:86 ../cerber-tools.php:95
1276
- msgid "Settings"
1277
- msgstr "Configurações"
1278
-
1279
- #: ../cerber-tools.php:88
1280
- msgid "Download file"
1281
- msgstr "Descarregar arquivo"
1282
-
1283
- #: ../cerber-tools.php:90
1284
- msgid "Import settings from the file"
1285
- msgstr "Importar configurações desde um arquivo"
1286
-
1287
- #: ../cerber-tools.php:91
1288
- msgid ""
1289
- "When you click the button below, file will be uploaded and all existing "
1290
- "settings will be overridden."
1291
- msgstr ""
1292
- "Ao clicar no botão abaixo, o arquivo de configuração ira ser carregado para "
1293
- "o servidor e todas as configurações actuais serão substituídas."
1294
-
1295
- #: ../cerber-tools.php:92
1296
- msgid "Select file to import."
1297
- msgstr "Selecionar arquivo para importação."
1298
-
1299
- #: ../cerber-tools.php:92
1300
- #, php-format
1301
- msgid "Maximum upload file size: %s."
1302
- msgstr "Tamanho máximo do arquivo para upload: %s."
1303
-
1304
- #: ../cerber-tools.php:95
1305
- msgid "What do you want to import?"
1306
- msgstr "O que gostaria de importar?"
1307
-
1308
- #: ../cerber-tools.php:97
1309
- msgid "Upload file"
1310
- msgstr "Enviar arquivo"
1311
-
1312
- #: ../cerber-tools.php:132
1313
- msgid "No file was uploaded or file is corrupted"
1314
- msgstr "Nenhum arquivo foi enviado ou o arquivo está corrompido"
1315
-
1316
- #: ../cerber-tools.php:162
1317
- msgid "Error while updating"
1318
- msgstr "Erro ao enviar arquivo"
1319
-
1320
- #: ../cerber-tools.php:165
1321
- msgid "Settings has imported successfully from"
1322
- msgstr "As configurações foram importadas com sucesso de"
1323
-
1324
- #: ../cerber-tools.php:169
1325
- msgid "Error while parsing file"
1326
- msgstr "Erro ao interpretar arquivo"
1327
-
1328
- #: ../cerber-tools.php:267
1329
- msgid "Antispam and bot detection settings"
1330
- msgstr "Configurações de detecção de anti-spam e bot"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "MIME-Version: 1.0\n"
4
+ "Content-Type: text/plain; charset=UTF-8\n"
5
+ "Content-Transfer-Encoding: 8bit\n"
6
+ "X-Generator: POEditor.com\n"
7
+ "Project-Id-Version: WP Cerber Security\n"
8
+ "Language: pt-br\n"
9
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
10
+
11
+ #: ../settings.php:73
12
+ msgid "Limit login attempts"
13
+ msgstr "Limitar tentativas de login"
14
+
15
+ #: ../settings.php:74
16
+ msgid "Attempts"
17
+ msgstr "Tentativas"
18
+
19
+ #: ../settings.php:75
20
+ msgid "Lockout duration"
21
+ msgstr "Duração do bloqueio"
22
+
23
+ #: ../settings.php:75 ../settings.php:101
24
+ msgid "minutes"
25
+ msgstr "minutos"
26
+
27
+ #: ../settings.php:76
28
+ msgid "Aggressive lockout"
29
+ msgstr "Bloqueio agressivo"
30
+
31
+ #: ../settings.php:79
32
+ msgid "Site connection"
33
+ msgstr "Conexão do site"
34
+
35
+ #: ../settings.php:81
36
+ msgid "Proactive security rules"
37
+ msgstr "Regras de segurança proativa"
38
+
39
+ #: ../settings.php:82
40
+ msgid "Block subnet"
41
+ msgstr "Bloquear sub-rede"
42
+
43
+ #: ../settings.php:85
44
+ msgid "Request wp-login.php"
45
+ msgstr "Requisitar wp-login.php"
46
+
47
+ #: ../settings.php:85
48
+ msgid "Immediately block IP after any request to wp-login.php"
49
+ msgstr "Bloquer IP imediatamente após qualquer requisição a wp-login.php"
50
+
51
+ #: ../settings.php:84
52
+ msgid "Redirect dashboard requests"
53
+ msgstr "Redirecionar requisições ao painel"
54
+
55
+ #: ../settings.php:88
56
+ msgid "Custom login page"
57
+ msgstr "Página alternativa de login"
58
+
59
+ #: ../settings.php:89
60
+ msgid "Custom login URL"
61
+ msgstr "URL personalizado de login"
62
+
63
+ #: ../settings.php:95
64
+ msgid "must not overlap with the existing pages or posts slug"
65
+ msgstr "não deve se sobrepor aos links permanentes de páginas e posts"
66
+
67
+ #: ../settings.php:97
68
+ msgid "Disable wp-login.php"
69
+ msgstr "Desabilitar wp-login.php"
70
+
71
+ #: ../settings.php:97
72
+ msgid "Block direct access to wp-login.php and return HTTP 404 Not Found Error"
73
+ msgstr "Bloquear acesso direto a wp-login.php e retornar o erro HTTP 404"
74
+
75
+ #: ../dashboard.php:1221 ../settings.php:99
76
+ msgid "Citadel mode"
77
+ msgstr "Modo Fortaleza"
78
+
79
+ #: ../settings.php:100
80
+ msgid "Threshold"
81
+ msgstr "Limite"
82
+
83
+ #: ../settings.php:101
84
+ msgid "Duration"
85
+ msgstr "Duração"
86
+
87
+ #: ../cerber-load.php:4111 ../settings.php:78 ../settings.php:102 ../settings.php:
88
+ #: 411
89
+ msgid "Notifications"
90
+ msgstr "Notificações"
91
+
92
+ #: ../settings.php:102
93
+ msgid "Send notification to admin email"
94
+ msgstr "Enviar notificação para o email do administrador"
95
+
96
+ #: ../cerber-load.php:4108 ../settings.php:404 ../cerber-tools.php:92 ../cerber-
97
+ #: tools.php:101 ../cerber-tools.php:182
98
+ msgid "Access Lists"
99
+ msgstr "Listas de Acesso"
100
+
101
+ #: ../dashboard.php:1239 ../dashboard.php:1467 ../cerber-load.php:3855 ..
102
+ #: /settings.php:104 ../settings.php:395
103
+ msgid "Activity"
104
+ msgstr "Atividade"
105
+
106
+ #: ../settings.php:399
107
+ msgid "Lockouts"
108
+ msgstr "Bloqueios"
109
+
110
+ #: ../settings.php:520 ../settings.php:642
111
+ msgid "%s allowed retries in %s minutes"
112
+ msgstr "%s tentativas restantes em %s minutos"
113
+
114
+ #: ../settings.php:542 ../settings.php:664
115
+ msgid "Enable after %s failed login attempts in last %s minutes"
116
+ msgstr "Habilitar após %s tentativas falhas de login nos últimos %s minutos"
117
+
118
+ #: ../dashboard.php:129 ../dashboard.php:695 ../dashboard.php:2848 ../cerber-load.
119
+ #: php:3864
120
+ msgid "IP"
121
+ msgstr "IP"
122
+
123
+ #: ../dashboard.php:534 ../dashboard.php:698 ../dashboard.php:2846
124
+ msgid "Date"
125
+ msgstr "Data"
126
+
127
+ #: ../dashboard.php:534 ../dashboard.php:700 ../dashboard.php:2851
128
+ msgid "Local User"
129
+ msgstr "Usuário Local"
130
+
131
+ #: ../dashboard.php:534 ../dashboard.php:701 ../cerber-load.php:3872
132
+ msgid "Username used"
133
+ msgstr "Nome de usuário usado"
134
+
135
+ #: ../dashboard.php:148
136
+ msgid "Showing last %d records from %d"
137
+ msgstr "Mostrando últimos %d registros de %d"
138
+
139
+ #: ../common.php:798
140
+ msgid "Logged in"
141
+ msgstr "Logado"
142
+
143
+ #: ../common.php:799
144
+ msgid "Logged out"
145
+ msgstr "Desconectado"
146
+
147
+ #: ../common.php:800
148
+ msgid "Login failed"
149
+ msgstr "Falha no login"
150
+
151
+ #: ../common.php:803
152
+ msgid "IP blocked"
153
+ msgstr "IP bloqueado"
154
+
155
+ #: ../common.php:804
156
+ msgid "Subnet blocked"
157
+ msgstr "Sub-rede bloqueada"
158
+
159
+ #: ../common.php:806
160
+ msgid "Citadel activated!"
161
+ msgstr "Fortaleza ativada!"
162
+
163
+ #: ../dashboard.php:675 ../dashboard.php:879 ../dashboard.php:2684 ../common.php:
164
+ #: 845
165
+ msgid "Locked out"
166
+ msgstr "Bloqueado"
167
+
168
+ #: ../common.php:846
169
+ msgid "IP blacklisted"
170
+ msgstr "IP bloqueado"
171
+
172
+ #: ../common.php:821
173
+ msgid "Password changed"
174
+ msgstr "Senha alterada"
175
+
176
+ #: ../dashboard.php:122 ../dashboard.php:195
177
+ msgid "Remove"
178
+ msgstr "Remover"
179
+
180
+ #: ../dashboard.php:425
181
+ msgid "Lockout for %s was removed"
182
+ msgstr "Bloqueio de %s foi removido"
183
+
184
+ #: ../dashboard.php:167 ../dashboard.php:670 ../dashboard.php:873 ../dashboard.
185
+ #: php:1219 ../dashboard.php:2679 ../cerber-load.php:4100 ../settings.php:77 ..
186
+ #: /settings.php:365
187
+ msgid "White IP Access List"
188
+ msgstr "Lista Segura de IPs"
189
+
190
+ #: ../dashboard.php:169 ../dashboard.php:671 ../dashboard.php:876 ../dashboard.
191
+ #: php:1220 ../dashboard.php:2680
192
+ msgid "Black IP Access List"
193
+ msgstr "Lista Negra de IPs"
194
+
195
+ #: ../dashboard.php:201
196
+ msgid "List is empty"
197
+ msgstr "A lista está vazia"
198
+
199
+ #: ../dashboard.php:238
200
+ msgid "Address %s was added to White IP Access List"
201
+ msgstr "Endereço %s adicionado à Lista Segura de IPs"
202
+
203
+ #: ../dashboard.php:252
204
+ msgid "Address %s was added to Black IP Access List"
205
+ msgstr "Endereço %s adicionado à Lista Negra de IPs"
206
+
207
+ #: ../cerber-load.php:3337
208
+ msgid "Citadel mode is activated after %d failed login attempts in %d minutes."
209
+ msgstr "O modo Fortaleza é atividado após %d tentaivas de login falhas em %d minutos."
210
+
211
+ #: ../dashboard.php:1625
212
+ msgid "View Activity"
213
+ msgstr "Ver Atividade"
214
+
215
+ #: ../dashboard.php:2530 ../cerber-tools.php:91 ../cerber-tools.php:100
216
+ msgid "Settings"
217
+ msgstr "Configurações"
218
+
219
+ #: ../dashboard.php:1082
220
+ msgid "Last login"
221
+ msgstr "Último login"
222
+
223
+ #: ../dashboard.php:1115 ../dashboard.php:1202
224
+ msgid "Never"
225
+ msgstr "Nunca"
226
+
227
+ #: ../dashboard.php:1513
228
+ msgid "Are you sure?"
229
+ msgstr "Tem certeza?"
230
+
231
+ #: ../dashboard.php:1307 ../settings.php:79
232
+ msgid "My site is behind a reverse proxy"
233
+ msgstr "Meu site está sob um proxy reverso"
234
+
235
+ #: ../settings.php:83
236
+ msgid "Non-existent users"
237
+ msgstr "Usuários não-existentes"
238
+
239
+ #: ../settings.php:83
240
+ msgid "Immediately block IP when attempting to login with a non-existent username"
241
+ msgstr "Bloquear IP imediatamente nas tentativas de login com nomes de usuários não existentes"
242
+
243
+ #: ../settings.php:84
244
+ msgid "Disable automatic redirecting to the login page when /wp-admin/ is requested by an unauthorized request"
245
+ msgstr "Desabilitar redirecionamento automático para a página de login quando /wp-admin/ é requisitada sem autorização"
246
+
247
+ #: ../settings.php:351
248
+ msgid "Make your protection smarter!"
249
+ msgstr "Deixe sua proteção mais inteligente!"
250
+
251
+ #: ../settings.php:355
252
+ msgid "Please enable Permalinks to use this feature. Set Permalink Settings to something other than Default."
253
+ msgstr "Favor habilitar os Links Permanentes para utilizar essa funcionalidade. Configure os Link Permanentes para algo além do Padrão."
254
+
255
+ #: ../cerber-load.php:4107 ../settings.php:401
256
+ msgid "Main Settings"
257
+ msgstr "Configurações Principais"
258
+
259
+ #: ../dashboard.php:2531 ../settings.php:413 ../cerber-tools.php:51
260
+ msgid "Help"
261
+ msgstr "Ajuda"
262
+
263
+ #: ../settings.php:530 ../settings.php:652
264
+ msgid "Increase lockout duration to %s hours after %s lockouts in the last %s hours"
265
+ msgstr "Aumentar a duração do bloqueio para %s horas após %s bloqueios nas últimas %s horas."
266
+
267
+ #: ../cerber-load.php:358
268
+ msgid "You are not allowed to log in. Ask your administrator for assistance."
269
+ msgstr "Você não tem permissão para entrar. Peça ajuda ao administrador."
270
+
271
+ #: ../cerber-load.php:364
272
+ msgid "You have reached the login attempts limit. Please try again in %d minutes."
273
+ msgstr "Você atingiu o limite de tentativas de login. Por favor, tente novamente em %d minutos."
274
+
275
+ #: ../cerber-load.php:383
276
+ msgid "You have only one attempt remaining."
277
+ msgid_plural "You have %d attempts remaining."
278
+ msgstr[0] "Você tem apenas uma tentativa restante."
279
+ msgstr[1] "Você tem %d tentativas restantes."
280
+
281
+ #: ../dashboard.php:723
282
+ msgid "No activity has been logged."
283
+ msgstr "Nenhuma atividade foi registrada."
284
+
285
+ #: ../dashboard.php:132
286
+ msgid "Expires"
287
+ msgstr "Expira"
288
+
289
+ #: ../dashboard.php:154
290
+ msgid "No lockouts at the moment. The sky is clear."
291
+ msgstr "Nenhum bloqueio no momento. O céu está limpo."
292
+
293
+ #: ../dashboard.php:167
294
+ msgid "These IPs will never be locked out"
295
+ msgstr "Estes IPs nunca serão bloqueados"
296
+
297
+ #: ../dashboard.php:176
298
+ msgid "Your IP"
299
+ msgstr "Seu IP"
300
+
301
+ #: ../cerber-load.php:3338
302
+ msgid "Last failed attempt was at %s from IP %s with user login: %s."
303
+ msgstr "Última tentativa de login falha foi às %s do IP %s com o login de usuário: %s."
304
+
305
+ #: ../cerber-load.php:4067
306
+ msgid "Can't activate WP Cerber due to a database error."
307
+ msgstr "Não foi possível ativar o WP Cerber devido a um erro na conexão com o banco de dados."
308
+
309
+ #: ../settings.php:537 ../settings.php:659
310
+ msgid "Notify admin if the number of active lockouts above"
311
+ msgstr "Notificar o administrador caso o número de bloqueios ativos seja acima"
312
+
313
+ #: ../settings.php:105 ../settings.php:179 ../settings.php:341
314
+ msgid "days"
315
+ msgstr "dias"
316
+
317
+ #: ../dashboard.php:1172
318
+ msgid "Cerber Quick View"
319
+ msgstr "Visualição Rápida do Cerber"
320
+
321
+ #: ../dashboard.php:150
322
+ msgid "Hint"
323
+ msgstr "Dica"
324
+
325
+ #: ../dashboard.php:150
326
+ msgid "To view activity, click on the IP"
327
+ msgstr "Para ver a atividade, clique no IP"
328
+
329
+ #: ../dashboard.php:194 ../dashboard.php:886 ../dashboard.php:913 ../dashboard.
330
+ #: php:1005
331
+ msgid "Check for activity"
332
+ msgstr "Verificar atividade"
333
+
334
+ #: ../settings.php:82
335
+ msgid "Always block entire subnet Class C of intruders IP"
336
+ msgstr "Sempre bloquear toda a sub-rede classe C de IPs invasores"
337
+
338
+ #: ../settings.php:102 ../settings.php:539 ../settings.php:661
339
+ msgid "Click to send test"
340
+ msgstr "Clique para enviar teste"
341
+
342
+ #: ../settings.php:814 ../settings.php:815
343
+ msgid "Attention! You have changed the login URL! The new login URL is"
344
+ msgstr "Atenção! Você alterou o URL de login! O novo URL de login é"
345
+
346
+ #: ../dashboard.php:1081
347
+ msgid "Comments"
348
+ msgstr "Comentários"
349
+
350
+ #: ../common.php:1078
351
+ msgid "Update to version %s of WP Cerber"
352
+ msgstr "Atualizar WP Cerber para a versão %s"
353
+
354
+ #: ../cerber-load.php:3339 ../cerber-load.php:3896
355
+ msgid "View activity in dashboard"
356
+ msgstr "Ver atividade no painel"
357
+
358
+ #: ../cerber-load.php:3369
359
+ msgid "Number of active lockouts"
360
+ msgstr "Número de bloqueios ativos"
361
+
362
+ #: ../cerber-load.php:3373
363
+ msgid "View lockouts in dashboard"
364
+ msgstr "Ver bloqueios no painel"
365
+
366
+ #: ../cerber-load.php:3455
367
+ msgid "This message was sent by"
368
+ msgstr "Esta mensagem foi enviada por"
369
+
370
+ #: ../dashboard.php:64 ../cerber-tools.php:43
371
+ msgid "Tools"
372
+ msgstr "Ferramentas"
373
+
374
+ #: ../cerber-tools.php:88
375
+ msgid "Export settings to the file"
376
+ msgstr "Exportar configurações para o arquivo"
377
+
378
+ #: ../cerber-tools.php:89
379
+ msgid "When you click the button below you will get a configuration file, which you can upload on another site."
380
+ msgstr "Assim que clicar no botão abaixo, você baixará um arquivo de configuração que poderá usar em outros sites."
381
+
382
+ #: ../cerber-tools.php:90
383
+ msgid "What do you want to export?"
384
+ msgstr "O que gostaria de exportar?"
385
+
386
+ #: ../cerber-tools.php:93
387
+ msgid "Download file"
388
+ msgstr "Baixar arquivo"
389
+
390
+ #: ../cerber-tools.php:95
391
+ msgid "Import settings from the file"
392
+ msgstr "Importar configurações de um arquivo"
393
+
394
+ #: ../cerber-tools.php:96
395
+ msgid "When you click the button below, file will be uploaded and all existing settings will be overridden."
396
+ msgstr "Assim que clicar no botão abaixo, o arquivo será enviado e todas as configurações existentes serão sobrescritas."
397
+
398
+ #: ../cerber-tools.php:97
399
+ msgid "Select file to import."
400
+ msgstr "Selecionar arquivo para importação."
401
+
402
+ #: ../cerber-tools.php:97
403
+ msgid "Maximum upload file size: %s."
404
+ msgstr "Tamanho máximo do arquivo para envio: %s."
405
+
406
+ #: ../cerber-tools.php:100
407
+ msgid "What do you want to import?"
408
+ msgstr "O que gostaria de importar?"
409
+
410
+ #: ../cerber-tools.php:102
411
+ msgid "Upload file"
412
+ msgstr "Enviar arquivo"
413
+
414
+ #: ../cerber-tools.php:149
415
+ msgid "No file was uploaded or file is corrupted"
416
+ msgstr "Nenhum arquivo foi enviado ou o arquivo está corrompido"
417
+
418
+ #: ../cerber-tools.php:182
419
+ msgid "Error while updating"
420
+ msgstr "Erro ao enviar arquivo"
421
+
422
+ #: ../cerber-tools.php:185
423
+ msgid "Settings has imported successfully from"
424
+ msgstr "As configurações foram importadas com sucesso de"
425
+
426
+ #: ../cerber-tools.php:189
427
+ msgid "Error while parsing file"
428
+ msgstr "Erro ao interpretar arquivo"
429
+
430
+ #: ../dashboard.php:130 ../dashboard.php:696
431
+ msgid "Hostname"
432
+ msgstr "Nome do servidor"
433
+
434
+ #: ../dashboard.php:391
435
+ msgid "unknown"
436
+ msgstr "desconhecido"
437
+
438
+ #: ../settings.php:105 ../settings.php:337
439
+ msgid "Keep records for"
440
+ msgstr "Guardar registros por"
441
+
442
+ #: ../dashboard.php:1206 ../dashboard.php:1227
443
+ msgid "active"
444
+ msgstr "ativo"
445
+
446
+ #: ../dashboard.php:1206
447
+ msgid "deactivate"
448
+ msgstr "desativar"
449
+
450
+ #: ../dashboard.php:1208
451
+ msgid "not active"
452
+ msgstr "inativo"
453
+
454
+ #: ../dashboard.php:1209 ../dashboard.php:1223
455
+ msgid "disabled"
456
+ msgstr "desabilitado"
457
+
458
+ #: ../dashboard.php:1214
459
+ msgid "failed attempts"
460
+ msgstr "tentativas falhas"
461
+
462
+ #: ../dashboard.php:1214 ../dashboard.php:1215
463
+ msgid "in 24 hours"
464
+ msgstr "em 24 horas"
465
+
466
+ #: ../dashboard.php:1214 ../dashboard.php:1215
467
+ msgid "view all"
468
+ msgstr "ver todos"
469
+
470
+ #: ../dashboard.php:1215
471
+ msgid "lockouts"
472
+ msgstr "bloqueios"
473
+
474
+ #: ../dashboard.php:1217
475
+ msgid "Lockouts at the moment"
476
+ msgstr "Bloqueios no momento"
477
+
478
+ #: ../dashboard.php:1218
479
+ msgid "Last lockout"
480
+ msgstr "Último bloqueio"
481
+
482
+ #: ../dashboard.php:1219 ../dashboard.php:1220 ../dashboard.php:1796
483
+ msgid "entry"
484
+ msgid_plural "entries"
485
+ msgstr[0] "entrada"
486
+ msgstr[1] "entradas"
487
+
488
+ #: ../dashboard.php:1508
489
+ msgid "Confused about some settings?"
490
+ msgstr "Confuso em relação às configurações?"
491
+
492
+ #: ../dashboard.php:1509
493
+ msgid "You can easily load default recommended settings using button below"
494
+ msgstr "Você pode carregar as configurações recomendadas clicando no botão abaixo."
495
+
496
+ #: ../dashboard.php:1511
497
+ msgid "Load default settings"
498
+ msgstr "Carregar configurações padrão"
499
+
500
+ #: ../dashboard.php:1519
501
+ msgid "doesn't affect Custom login URL and Access Lists"
502
+ msgstr "não afeta URL personalizado de login e Listas de Acesso"
503
+
504
+ #: ../common.php:1071 ../settings.php:221
505
+ msgid "New version is available"
506
+ msgstr "Nova versão disponível"
507
+
508
+ #. Name of the plugin
509
+ #: ../dashboard.php:52 ../dashboard.php:76
510
+ msgid "WP Cerber"
511
+ msgstr "WP Cerber"
512
+
513
+ #: ../cerber-load.php:3313
514
+ msgid "WP Cerber notify"
515
+ msgstr "WP Cerber notifica"
516
+
517
+ #: ../cerber-load.php:3335
518
+ msgid "Citadel mode is activated"
519
+ msgstr "Modo Fortaleza está ativado"
520
+
521
+ #: ../cerber-load.php:3409
522
+ msgid "New Custom login URL"
523
+ msgstr "Novo URL personalizado de login"
524
+
525
+ #: ../cerber-load.php:4054
526
+ msgid "The WP Cerber requires PHP %s or higher. You are running"
527
+ msgstr "O WP Cerber requer PHP %s ou mais recente. Você está rodando"
528
+
529
+ #: ../cerber-load.php:4058
530
+ msgid "The WP Cerber requires WordPress %s or higher. You are running"
531
+ msgstr "O WP Cerber requer Wordpress %s ou mais recente. Você está rodando"
532
+
533
+ #: ../settings.php:108
534
+ msgid "Use file"
535
+ msgstr "Usar arquivo"
536
+
537
+ #: ../settings.php:108
538
+ msgid "Write failed login attempts to the file"
539
+ msgstr "Escrever tentativas falhas de login em um arquivo"
540
+
541
+ #: ../dashboard.php:1624
542
+ msgid "Deactivate"
543
+ msgstr "Desativar"
544
+
545
+ #: ../dashboard.php:133 ../cerber-load.php:3371
546
+ msgid "Reason"
547
+ msgstr "Razão"
548
+
549
+ #: ../dashboard.php:206
550
+ msgid "Add IP to the list"
551
+ msgstr "Adicionar IP à lista"
552
+
553
+ #: ../dashboard.php:932
554
+ msgid "Add IP to the Black List"
555
+ msgstr "Adicionar IP à Lista Negra"
556
+
557
+ #: ../common.php:876
558
+ msgid "Attempt to access"
559
+ msgstr "Tentativa de acesso"
560
+
561
+ #: ../common.php:875
562
+ msgid "Limit on login attempts is reached"
563
+ msgstr "O limite de tentativas de login foi atingido"
564
+
565
+ #: ../common.php:829 ../common.php:877
566
+ msgid "Attempt to log in with non-existent username"
567
+ msgstr "Tentativa de login com nome de usuário não existente"
568
+
569
+ #: ../cerber-load.php:3370
570
+ msgid "Last lockout was added: %s for IP %s"
571
+ msgstr "Último bloqueio foi adicionado: %s para o IP %s"
572
+
573
+ #: ../cerber-load.php:4110 ../settings.php:406
574
+ msgid "Hardening"
575
+ msgstr "Fortalecendo"
576
+
577
+ #: ../dashboard.php:909
578
+ msgid "Abuse email:"
579
+ msgstr "Email para abusos:"
580
+
581
+ #: ../settings.php:208 ../settings.php:243
582
+ msgid "Email Address"
583
+ msgstr "Endereço de Email"
584
+
585
+ #: ../settings.php:217
586
+ msgid "if empty, the admin email %s will be used"
587
+ msgstr "se vazio, o email do administrador %s será usado"
588
+
589
+ #: ../settings.php:111
590
+ msgid "Drill down IP"
591
+ msgstr "Rastrear IP"
592
+
593
+ #: ../settings.php:111
594
+ msgid "Retrieve extra WHOIS information for IP"
595
+ msgstr "Pegar informação extra de WHOIS para o IP"
596
+
597
+ #: ../settings.php:119
598
+ msgid "Hardening WordPress"
599
+ msgstr "Fortalecendo o Wordpress"
600
+
601
+ #: ../settings.php:120
602
+ msgid "Stop user enumeration"
603
+ msgstr "Bloquear enumeração de usuários"
604
+
605
+ #: ../settings.php:122
606
+ msgid "Disable XML-RPC"
607
+ msgstr "Desabilitar XML-RPC"
608
+
609
+ #: ../settings.php:122
610
+ msgid "Block access to the XML-RPC server (including Pingbacks and Trackbacks)"
611
+ msgstr "Bloquear acesso ao servidor XML-RPC (incluindo Pingbacks e Trackbacks)"
612
+
613
+ #: ../settings.php:123
614
+ msgid "Disable feeds"
615
+ msgstr "Desabilitar feeds"
616
+
617
+ #: ../settings.php:123
618
+ msgid "Block access to the RSS, Atom and RDF feeds"
619
+ msgstr "Bloquear acesso aos feeds RSS, Atom e RDF"
620
+
621
+ #: ../settings.php:124
622
+ msgid "Disable REST API"
623
+ msgstr "Desabilitar API REST"
624
+
625
+ #: ../settings.php:365
626
+ msgid "These settings do not affect hosts from the "
627
+ msgstr "Estas configurações não afetam servidores do "
628
+
629
+ #: ../settings.php:895 ../settings.php:907
630
+ msgid "<strong>ERROR</strong>: please enter a valid email address."
631
+ msgstr "<strong>ERRO</strong>: favor digitar um endereço de email válido."
632
+
633
+ #: ../cerber-load.php:3401 ../cerber-load.php:4099
634
+ msgid "WP Cerber is now active and has started protecting your site"
635
+ msgstr "WP Cerver está ativo agora e já começou a proteger o seu site"
636
+
637
+ #: ../dashboard.php:134
638
+ msgid "Action"
639
+ msgstr "Ação"
640
+
641
+ #: ../dashboard.php:169
642
+ msgid "Nobody can log in or register from these IPs"
643
+ msgstr "Ninguém pode entrar ou se registrar a partir destes IPs"
644
+
645
+ #: ../dashboard.php:232 ../dashboard.php:244
646
+ msgid "Incorrect IP address or IP range"
647
+ msgstr "Endereço ou faixa de IP incorretos"
648
+
649
+ #: ../dashboard.php:441 ../dashboard.php:1640
650
+ msgid "Settings saved"
651
+ msgstr "Configurações salvas"
652
+
653
+ #: ../dashboard.php:913
654
+ msgid "Network:"
655
+ msgstr "Rede:"
656
+
657
+ #: ../dashboard.php:927
658
+ msgid "Add network to the Black List"
659
+ msgstr "Adicionar rede à Lista Negra"
660
+
661
+ #: ../dashboard.php:1623
662
+ msgid "Attention! Citadel mode is now active. Nobody is able to log in."
663
+ msgstr "Atenção! O modo Fortaleza agora está ativado. Ninguém pode fazer login."
664
+
665
+ #: ../dashboard.php:349 ../dashboard.php:2609 ../whois.php:221 ../whois.php:252 ..
666
+ #: /common.php:874 ../common.php:1153
667
+ msgid "Unknown"
668
+ msgstr "Desconhecido"
669
+
670
+ #. Author of the plugin
671
+ #:
672
+ msgid "Gregory"
673
+ msgstr "Gregory"
674
+
675
+ #: ../common.php:203 ../common.php:260 ../common.php:265 ../common.php:270 ..
676
+ #: /cerber-load.php:666 ../cerber-load.php:678 ../cerber-load.php:685 ../cerber-
677
+ #: load.php:932 ../cerber-load.php:1149 ../cerber-load.php:1155 ../cerber-load.
678
+ #: php:1160 ../cerber-load.php:1165 ../cerber-load.php:1171 ../cerber-load.php:
679
+ #: 1178 ../cerber-load.php:1278 ../cerber-load.php:1415 ../settings.php:793 ..
680
+ #: /settings.php:864
681
+ msgid "ERROR:"
682
+ msgstr "ERRO:"
683
+
684
+ #: ../cerber-load.php:695
685
+ msgid "Human verification failed. Please click the square box in the reCAPTCHA block below."
686
+ msgstr "Verificação de humanidade falhou. Por favor, click no quadrado do bloco reCAPTCHA abaixo."
687
+
688
+ #: ../cerber-load.php:944
689
+ msgid "<strong>ERROR</strong>: The password you entered for the username %s is incorrect."
690
+ msgstr "<strong>ERRO</strong>: A senha que você digitou para o usuário %s está incorreta."
691
+
692
+ #: ../cerber-load.php:1166
693
+ msgid "Username is not allowed. Please choose another one."
694
+ msgstr "Nome de usuário não permitido. Por favor, escolha outro nome."
695
+
696
+ #: ../cerber-load.php:3364
697
+ msgid "unspecified"
698
+ msgstr "não especificado"
699
+
700
+ #: ../cerber-load.php:3367
701
+ msgid "Number of lockouts is increasing"
702
+ msgstr "O número de bloqueios está aumentando"
703
+
704
+ #: ../cerber-load.php:3372
705
+ msgid "View activity for this IP"
706
+ msgstr "Ver atividade do IP"
707
+
708
+ #: ../cerber-load.php:3376 ../cerber-load.php:3378
709
+ msgid "A new version of WP Cerber is available to install"
710
+ msgstr "Uma nova versão do WP Cerber está disponível para ser instalada"
711
+
712
+ #: ../cerber-load.php:3377
713
+ msgid "Hi!"
714
+ msgstr "Olá!"
715
+
716
+ #: ../cerber-load.php:3380 ../cerber-load.php:3391
717
+ msgid "Website"
718
+ msgstr "Website"
719
+
720
+ #: ../cerber-load.php:3383 ../cerber-load.php:3384
721
+ msgid "The WP Cerber security plugin has been deactivated"
722
+ msgstr "O plugin de segurança WP Cerber foi desativado"
723
+
724
+ #: ../cerber-load.php:3386
725
+ msgid "Not logged in"
726
+ msgstr "Não logado"
727
+
728
+ #: ../cerber-load.php:3392
729
+ msgid "By user"
730
+ msgstr "Pelo usuário"
731
+
732
+ #: ../cerber-load.php:3393
733
+ msgid "From IP address"
734
+ msgstr "Do endereço de IP"
735
+
736
+ #: ../cerber-load.php:3396
737
+ msgid "From country"
738
+ msgstr "Do país"
739
+
740
+ #: ../cerber-load.php:3400
741
+ msgid "The WP Cerber security plugin is now active"
742
+ msgstr "O plugin de segurança WP Cerber está agora ativado"
743
+
744
+ #: ../cerber-load.php:4100
745
+ msgid "Your IP address is added to the"
746
+ msgstr "Seu endereço de IP foi adicionado à"
747
+
748
+ #: ../cerber-load.php:4112
749
+ msgid "Import settings"
750
+ msgstr "Importar configurações"
751
+
752
+ #: ../settings.php:220
753
+ msgid "Notification limit"
754
+ msgstr "Limite de notificação"
755
+
756
+ #: ../settings.php:220
757
+ msgid "notification letters allowed per hour (0 means unlimited)"
758
+ msgstr "notificações permitidas por hora (0 significa ilimitadas)"
759
+
760
+ #: ../settings.php:142
761
+ msgid "User related settings"
762
+ msgstr "Configurações de usuário"
763
+
764
+ #: ../settings.php:144
765
+ msgid "Prohibited usernames"
766
+ msgstr "Nomes de usuários proibidos"
767
+
768
+ #: ../settings.php:150
769
+ msgid "Usernames from this list are not allowed to log in or register. Any IP address, have tried to use any of these usernames, will be immediately blocked. Use comma to separate logins."
770
+ msgstr "Nomes de usuários desta lista não podem fazer login ou serem registrados. Qualquer endereço de IP que tentar utilizar algum destes nomes será imediatamente bloqueado. Utilize vírgulas para separar os logins."
771
+
772
+ #: ../settings.php:152
773
+ msgid "User session expire"
774
+ msgstr "Sessão de usuário expira"
775
+
776
+ #: ../settings.php:152
777
+ msgid "in minutes (leave empty to use default WP value)"
778
+ msgstr "em minutos (deixe em branco para usar o valor padrão do Wordpress)"
779
+
780
+ #: ../settings.php:182
781
+ msgid "reCAPTCHA settings"
782
+ msgstr "Configurações do reCAPTCHA"
783
+
784
+ #: ../settings.php:183
785
+ msgid "Site key"
786
+ msgstr "Chave do site"
787
+
788
+ #: ../settings.php:184
789
+ msgid "Secret key"
790
+ msgstr "Chave secreta"
791
+
792
+ #: ../settings.php:187
793
+ msgid "Enable reCAPTCHA for WordPress registration form"
794
+ msgstr "Habilitar reCAPTCHA para o formulário de registro do Wordpress"
795
+
796
+ #: ../settings.php:190
797
+ msgid "Lost password form"
798
+ msgstr "Formulário de senha perdida"
799
+
800
+ #: ../settings.php:193
801
+ msgid "Login form"
802
+ msgstr "Formulário de login"
803
+
804
+ #: ../settings.php:193
805
+ msgid "Enable reCAPTCHA for WordPress login form"
806
+ msgstr "Habilitar reCAPTCHA para o formulário de login do Wordpress"
807
+
808
+ #: ../settings.php:368
809
+ msgid "Before you can start using reCAPTCHA, you have to obtain Site key and Secret key on the Google website"
810
+ msgstr "Antes de começar a utilizar o reCAPTCHA, você precisa obter uma Chave do Site uma Chave Secreta no website do Google"
811
+
812
+ #: ../cerber-lab.php:720 ../settings.php:369
813
+ msgid "Know more"
814
+ msgstr "Saiba mais"
815
+
816
+ #: ../dashboard.php:52 ../settings.php:388
817
+ msgid "WP Cerber Security"
818
+ msgstr "WP Cerber Security"
819
+
820
+ #: ../settings.php:408
821
+ msgid "Users"
822
+ msgstr "Usuários"
823
+
824
+ #: ../common.php:796
825
+ msgid "User created"
826
+ msgstr "Usuário criado"
827
+
828
+ #: ../dashboard.php:1460 ../common.php:797
829
+ msgid "User registered"
830
+ msgstr "Usuário registrado"
831
+
832
+ #: ../common.php:824
833
+ msgid "reCAPTCHA verification failed"
834
+ msgstr "A verificação do reCAPTCHA falhou"
835
+
836
+ #: ../common.php:825
837
+ msgid "reCAPTCHA settings are incorrect"
838
+ msgstr "As configurações do reCAPTCHA estão incorretas"
839
+
840
+ #: ../common.php:828
841
+ msgid "Attempt to access prohibited URL"
842
+ msgstr "Tentativa de acesso a URL proibido"
843
+
844
+ #: ../common.php:830 ../common.php:878
845
+ msgid "Attempt to log in with prohibited username"
846
+ msgstr "Tentativa de login com nome de usuário proibido."
847
+
848
+ #: ../settings.php:106
849
+ msgid "Cerber Lab connection"
850
+ msgstr "Conexão Cerber Lab"
851
+
852
+ #: ../settings.php:106
853
+ msgid "Send malicious IP addresses to the Cerber Lab"
854
+ msgstr "Enviar endereço de IP malicioso para o Cerber Lab"
855
+
856
+ #: ../settings.php:107
857
+ msgid "Cerber Lab protocol"
858
+ msgstr "Protocolo Cerber Lab"
859
+
860
+ #: ../settings.php:162 ../settings.php:187
861
+ msgid "Registration form"
862
+ msgstr "Formulário de restro"
863
+
864
+ #: ../settings.php:188
865
+ msgid "Enable reCAPTCHA for WooCommerce registration form"
866
+ msgstr "Habilitar reCAPTCHA para o formulário de registro do WooCommerce"
867
+
868
+ #: ../settings.php:190
869
+ msgid "Enable reCAPTCHA for WordPress lost password form"
870
+ msgstr "Habilitar reCAPTCHA para o formulário de senha perdida do Wordpress"
871
+
872
+ #: ../settings.php:191
873
+ msgid "Enable reCAPTCHA for WooCommerce lost password form"
874
+ msgstr "Habilitar reCAPTCHA para o formulário de senha perdida do WooCommerce"
875
+
876
+ #: ../settings.php:194
877
+ msgid "Enable reCAPTCHA for WooCommerce login form"
878
+ msgstr "Habilitar reCAPTCHA para o formulário de login do WooCommerce"
879
+
880
+ #: ../common.php:826
881
+ msgid "Request to the Google reCAPTCHA service failed"
882
+ msgstr "A requisição para o serviço Google reCAPTCHA falhou"
883
+
884
+ #: ../dashboard.php:1452 ../dashboard.php:1482
885
+ msgid "View all"
886
+ msgstr "Ver todos"
887
+
888
+ #: ../dashboard.php:1483
889
+ msgid "Recently locked out IP addresses"
890
+ msgstr "Endereços de IP recentemente bloqueados"
891
+
892
+ #: ../cerber-lab.php:718
893
+ msgid "OK, nail them all"
894
+ msgstr "OK, acabe com eles"
895
+
896
+ #: ../cerber-lab.php:719
897
+ msgid "NO, maybe later"
898
+ msgstr "NÃO, talvez mais tarde"
899
+
900
+ #: ../dashboard.php:54 ../dashboard.php:1238 ../dashboard.php:1816 ../settings.
901
+ #: php:393
902
+ msgid "Dashboard"
903
+ msgstr "Painel de Controle"
904
+
905
+ #: ../cerber-lab.php:716
906
+ msgid "Want to make WP Cerber even more powerful?"
907
+ msgstr "Gostaria de fazer o WP Cerber ainda mais poderoso?"
908
+
909
+ #: ../cerber-lab.php:717
910
+ msgid "Allow WP Cerber to send locked out malicious IP addresses to Cerber Lab. This helps the plugin team to develop new algorithms for WP Cerber that will defend WordPress against new threats and botnets that are appearing everyday. You can disable the sending in the plugin settings at any time."
911
+ msgstr "Permita que o WP Cerber envie endereços de IP maliciosos para o Cerber Lab. Isso ajuda os desenvolvedores do plugin a criarem algoritmos para defender o WordPress de novas ameaças e botnets que surgem dia-a-dia. Você pode desabilitar este envio a qualquer momento nas configurações do plugin."
912
+
913
+ #: ../dashboard.php:534
914
+ msgid "IP address"
915
+ msgstr "Endereço de IP"
916
+
917
+ #: ../dashboard.php:534
918
+ msgid "User login"
919
+ msgstr "Login do usuário"
920
+
921
+ #: ../dashboard.php:534
922
+ msgid "User ID"
923
+ msgstr "ID do usuário"
924
+
925
+ #: ../dashboard.php:719
926
+ msgid "Export"
927
+ msgstr "Exportar"
928
+
929
+ #: ../dashboard.php:738
930
+ msgid "Search for IP or username"
931
+ msgstr "Buscar por IP ou usuário"
932
+
933
+ #: ../dashboard.php:738
934
+ msgid "Filter"
935
+ msgstr "Filtrar"
936
+
937
+ #: ../dashboard.php:54
938
+ msgid "Cerber Dashboard"
939
+ msgstr "Painel de Controle do Cerber"
940
+
941
+ #: ../dashboard.php:64
942
+ msgid "Cerber tools"
943
+ msgstr "Ferramentas do Cerber"
944
+
945
+ #: ../dashboard.php:1726
946
+ msgid "Subscribe"
947
+ msgstr "Inscrever"
948
+
949
+ #: ../dashboard.php:1727 ../cerber-tools.php:273
950
+ msgid "Unsubscribe"
951
+ msgstr "Cancelar inscrição"
952
+
953
+ #: ../dashboard.php:1755
954
+ msgid "You've subscribed"
955
+ msgstr "Você está inscrito"
956
+
957
+ #: ../dashboard.php:1758
958
+ msgid "You've unsubscribed"
959
+ msgstr "Você cancelou sua inscrição"
960
+
961
+ #: ../cerber-load.php:3413 ../cerber-load.php:3414
962
+ msgid "A new activity has been recorded"
963
+ msgstr "Uma nova atividade foi capturada"
964
+
965
+ #: ../cerber-load.php:3868
966
+ msgid "User"
967
+ msgstr "Usuário"
968
+
969
+ #: ../cerber-load.php:3876
970
+ msgid "Search string"
971
+ msgstr "Termo pesquisado"
972
+
973
+ #: ../cerber-load.php:3897
974
+ msgid "To unsubscribe click here"
975
+ msgstr "Para cancelar sua inscrição, clique aqui"
976
+
977
+ #: ../settings.php:110
978
+ msgid "Preferences"
979
+ msgstr "Preferências"
980
+
981
+ #: ../settings.php:112
982
+ msgid "Date format"
983
+ msgstr "Formato da data"
984
+
985
+ #: ../settings.php:112
986
+ msgid "if empty, the default format %s will be used"
987
+ msgstr "se vazio, o formato padrão %s será usado"
988
+
989
+ #: ../settings.php:226
990
+ msgid "Push notifications"
991
+ msgstr "Notificações push"
992
+
993
+ #: ../settings.php:205
994
+ msgid "Email notifications"
995
+ msgstr "Notificações por email"
996
+
997
+ #: ../settings.php:212 ../settings.php:248 ../settings.php:305
998
+ msgid "Use comma to specify multiple values"
999
+ msgstr "Use vírgulas para separar múltiplos valores"
1000
+
1001
+ #: ../settings.php:233
1002
+ msgid "All connected devices"
1003
+ msgstr "Todos os dispositivos conectados"
1004
+
1005
+ #: ../settings.php:234
1006
+ msgid "No devices found"
1007
+ msgstr "Nenhum dispositivo encontrado"
1008
+
1009
+ #: ../settings.php:236
1010
+ msgid "Not available"
1011
+ msgstr "Não disponível"
1012
+
1013
+ #: ../common.php:822
1014
+ msgid "Password reset requested"
1015
+ msgstr "Redefinição de senha solicitada"
1016
+
1017
+ #: ../common.php:879
1018
+ msgid "Limit on failed reCAPTCHA verifications is reached"
1019
+ msgstr "Foi atingido o limite de verificações falhas do reCAPTCHA"
1020
+
1021
+ #: ../common.php:937
1022
+ msgid "%s ago"
1023
+ msgstr "%s atrás"
1024
+
1025
+ #: ../settings.php:77
1026
+ msgid "Apply limit login rules to IP addresses in the White IP Access List"
1027
+ msgstr "Aplicar regras de limite para login aos endereçoes de IP da Lista Segura"
1028
+
1029
+ #: ../settings.php:86
1030
+ msgid "Display 404 page"
1031
+ msgstr "Exibir página 404"
1032
+
1033
+ #: ../settings.php:185
1034
+ msgid "Invisible reCAPTCHA"
1035
+ msgstr "reCAPTCHA invisível"
1036
+
1037
+ #: ../settings.php:185
1038
+ msgid "Enable invisible reCAPTCHA"
1039
+ msgstr "Habilitar reCAPTCHA invisível"
1040
+
1041
+ #: ../settings.php:185
1042
+ msgid "(do not enable it unless you get and enter the Site and Secret keys for the invisible version)"
1043
+ msgstr "(não habilite esta opção a menos que tenha as Chaves do Site e Secreta para esta versão invisível)"
1044
+
1045
+ #: ../settings.php:196
1046
+ msgid "Enable reCAPTCHA for WordPress comment form"
1047
+ msgstr "Habilitar reCAPTCHA para o formulário de comentários do Wordpress"
1048
+
1049
+ #: ../settings.php:197
1050
+ msgid "Disable reCAPTCHA for logged in users"
1051
+ msgstr "Desabilitar reCAPTCHA para usuários logados"
1052
+
1053
+ #: ../settings.php:199
1054
+ msgid "Limit attempts"
1055
+ msgstr "Limitar tentativas"
1056
+
1057
+ #: ../settings.php:199
1058
+ msgid "Lock out IP address for %s minutes after %s failed attempts within %s minutes"
1059
+ msgstr "Bloquear endereço de IP por %s minutos depois de %s tentativas falhas dentro de %s minutos"
1060
+
1061
+ #: ../settings.php:362
1062
+ msgid "In the Citadel mode nobody is able to log in except IPs from the White IP Access List. Active user sessions will not be affected."
1063
+ msgstr "No modo Fortaleza apenas os IPs da Lista Segura podem se conectar. Sessões ativas de usuários não serão afetadas."
1064
+
1065
+ #: ../dashboard.php:534 ../dashboard.php:699
1066
+ msgid "Event"
1067
+ msgstr "Evento"
1068
+
1069
+ #: ../common.php:146
1070
+ #, fuzzy
1071
+ msgid "Spam comments denied"
1072
+ msgstr "Comentários spam recusados"
1073
+
1074
+ #: ../common.php:148
1075
+ msgid "Malicious IP addresses detected"
1076
+ msgstr "Endereço de IP malicioso detectado"
1077
+
1078
+ #: ../common.php:149
1079
+ msgid "Lockouts occurred"
1080
+ msgstr "Bloqueios ocorridos"
1081
+
1082
+ #: ../dashboard.php:1461
1083
+ msgid "All suspicious activity"
1084
+ msgstr "Todas as atividades suspeitas"
1085
+
1086
+ #: ../cerber-load.php:1150 ../cerber-load.php:1156 ../cerber-load.php:1172 ..
1087
+ #: /cerber-load.php:1179
1088
+ msgid "You are not allowed to register."
1089
+ msgstr "Não é permitido o seu registro."
1090
+
1091
+ #: ../common.php:807
1092
+ #, fuzzy
1093
+ msgid "Spam comment denied"
1094
+ msgstr "Comentário spam recusado"
1095
+
1096
+ #: ../common.php:832
1097
+ msgid "Attempt to log in denied"
1098
+ msgstr "Tentativa de login recusada"
1099
+
1100
+ #: ../common.php:833
1101
+ msgid "Attempt to register denied"
1102
+ msgstr "Tentativa de registro recusada"
1103
+
1104
+ #: ../common.php:143
1105
+ msgid "Malicious activities mitigated"
1106
+ msgstr "Atividades maliciosas mitigadas"
1107
+
1108
+ #: ../dashboard.php:63
1109
+ msgid "Cerber antispam settings"
1110
+ msgstr "Configurações antispam do Cerber"
1111
+
1112
+ #: ../dashboard.php:63 ../dashboard.php:1241 ../cerber-load.php:4109 ../settings.
1113
+ #: php:196
1114
+ msgid "Antispam"
1115
+ msgstr "Antispam"
1116
+
1117
+ #: ../settings.php:160
1118
+ msgid "Cerber antispam engine"
1119
+ msgstr "Mecanismo antispam do Cerber"
1120
+
1121
+ #: ../settings.php:161
1122
+ msgid "Comment form"
1123
+ msgstr "Formulário para comentários"
1124
+
1125
+ #: ../settings.php:161
1126
+ msgid "Protect comment form with bot detection engine"
1127
+ msgstr "Proteger formulário para comentários com mecanismo de detecção de bots"
1128
+
1129
+ #: ../settings.php:162
1130
+ msgid "Protect registration form with bot detection engine"
1131
+ msgstr "Proteger formulário de registro com mecanismo de detecção de bots"
1132
+
1133
+ #: ../cerber-tools.php:48
1134
+ msgid "Export & Import"
1135
+ msgstr "Exportar & Importar"
1136
+
1137
+ #: ../cerber-tools.php:49
1138
+ msgid "Diagnostic"
1139
+ msgstr "Diagnóstico"
1140
+
1141
+ #: ../cerber-tools.php:50
1142
+ msgid "License"
1143
+ msgstr "Licença"
1144
+
1145
+ #: ../cerber-tools.php:343
1146
+ msgid "Antispam and bot detection settings"
1147
+ msgstr "Configurações antispam e de detecção de bots"
1148
+
1149
+ #: ../cerber-load.php:1415
1150
+ msgid "Sorry, human verification failed."
1151
+ msgstr "Desculpe, a verificação de humanidade falhou."
1152
+
1153
+ #: ../common.php:880
1154
+ msgid "Bot activity is detected"
1155
+ msgstr "Atividade de bot detectada"
1156
+
1157
+ #: ../settings.php:177
1158
+ msgid "Comment processing"
1159
+ msgstr "Processando comentário"
1160
+
1161
+ #: ../settings.php:178
1162
+ #, fuzzy
1163
+ msgid "If a spam comment detected"
1164
+ msgstr "Se um comentário spam for detectado"
1165
+
1166
+ #: ../settings.php:179
1167
+ #, fuzzy
1168
+ msgid "Trash spam comments"
1169
+ msgstr "Mandar comentários spam para a lixeira"
1170
+
1171
+ #: ../settings.php:179
1172
+ #, fuzzy
1173
+ msgid "Move spam comments to trash after"
1174
+ msgstr "Mover comentários spam para a lixeira após"
1175
+
1176
+ #: ../common.php:808
1177
+ #, fuzzy
1178
+ msgid "Spam form submission denied"
1179
+ msgstr "Envio de formulário spam recusado"
1180
+
1181
+ #: ../settings.php:163
1182
+ msgid "Other forms"
1183
+ msgstr "Outros formulários"
1184
+
1185
+ #: ../settings.php:163
1186
+ msgid "Protect all forms on the website with bot detection engine"
1187
+ msgstr "Proteger todos os formulários do website com o mecanismo de detecção de bots"
1188
+
1189
+ #: ../settings.php:165
1190
+ msgid "Adjust antispam engine"
1191
+ msgstr "Ajustar mecanismo antispam"
1192
+
1193
+ #: ../settings.php:166
1194
+ msgid "Safe mode"
1195
+ msgstr "Modo seguro"
1196
+
1197
+ #: ../settings.php:166
1198
+ msgid "Use less restrictive policies (allow AJAX)"
1199
+ msgstr "Usar políticas menos restritivas (permitir AJAX)"
1200
+
1201
+ #: ../dashboard.php:2876 ../settings.php:167
1202
+ msgid "Logged in users"
1203
+ msgstr "Usuários logados"
1204
+
1205
+ #: ../settings.php:167
1206
+ msgid "Disable bot detection engine for logged in users"
1207
+ msgstr "Desabilitar mecanismo de detecção de bots para usuários logados"
1208
+
1209
+ #. Name of the plugin
1210
+ #:
1211
+ msgid "WP Cerber Security & Antispam"
1212
+ msgstr "WP Cerber Security & Antispam"
1213
+
1214
+ #: ../dashboard.php:131 ../dashboard.php:697
1215
+ msgid "Country"
1216
+ msgstr "País"
1217
+
1218
+ #: ../dashboard.php:729
1219
+ msgid "All events"
1220
+ msgstr "Todos os eventos"
1221
+
1222
+ #: ../dashboard.php:60
1223
+ msgid "Cerber Security Rules"
1224
+ msgstr "Regras de Segurança do Cerber"
1225
+
1226
+ #: ../dashboard.php:60 ../dashboard.php:2184
1227
+ msgid "Security Rules"
1228
+ msgstr "Regras de Segurança"
1229
+
1230
+ #: ../dashboard.php:1083
1231
+ msgid "Failed login attempts"
1232
+ msgstr "Tentativas falhas de login"
1233
+
1234
+ #: ../dashboard.php:999 ../dashboard.php:1084
1235
+ msgid "Registered"
1236
+ msgstr "Registrado"
1237
+
1238
+ #: ../dashboard.php:1154
1239
+ msgid "You"
1240
+ msgstr "Você"
1241
+
1242
+ #: ../common.php:147
1243
+ msgid "Spam form submissions denied"
1244
+ msgstr "Envio de formulário de spam recusado"
1245
+
1246
+ #: ../dashboard.php:1520 ../cerber-load.php:3403 ../cerber-load.php:4102
1247
+ msgid "Getting Started Guide"
1248
+ msgstr "Guia de Introdução"
1249
+
1250
+ #: ../dashboard.php:2189
1251
+ msgid "Countries"
1252
+ msgstr "Países"
1253
+
1254
+ #: ../dashboard.php:2252
1255
+ msgid "Permitted for one country"
1256
+ msgid_plural "Permitted for %d countries"
1257
+ msgstr[0] "Permitido para um país"
1258
+ msgstr[1] "Permitido para %d países"
1259
+
1260
+ #: ../dashboard.php:2263
1261
+ msgid "No rule"
1262
+ msgstr "Nenhuma regra"
1263
+
1264
+ #: ../dashboard.php:2475
1265
+ msgid "Security rules have been updated"
1266
+ msgstr "As regras de segurança foram atualizadas"
1267
+
1268
+ #. URI of the plugin
1269
+ #:
1270
+ msgid "https://wpcerber.com"
1271
+ msgstr "https://wpcerber.com"
1272
+
1273
+ #: ../common.php:809
1274
+ msgid "Form submission denied"
1275
+ msgstr "Envio de formulário recusado"
1276
+
1277
+ #: ../common.php:810
1278
+ msgid "Comment denied"
1279
+ msgstr "Comentário recusado"
1280
+
1281
+ #: ../common.php:838
1282
+ msgid "Request to REST API denied"
1283
+ msgstr "Requisição à API REST recusada"
1284
+
1285
+ #: ../common.php:839
1286
+ msgid "XML-RPC request denied"
1287
+ msgstr "Requisição XML-RPC recusada"
1288
+
1289
+ #: ../common.php:843
1290
+ msgid "Bot detected"
1291
+ msgstr "Bot detectado"
1292
+
1293
+ #: ../common.php:844
1294
+ msgid "Citadel mode is active"
1295
+ msgstr "Modo Fortaleza está ativo"
1296
+
1297
+ #: ../common.php:849
1298
+ msgid "Malicious activity detected"
1299
+ msgstr "Atividade maliciosa detectada"
1300
+
1301
+ #: ../common.php:850
1302
+ msgid "Blocked by country rule"
1303
+ msgstr "Bloquear por regra de países"
1304
+
1305
+ #: ../common.php:851
1306
+ msgid "Limit reached"
1307
+ msgstr "Limite atingido"
1308
+
1309
+ #: ../common.php:852
1310
+ msgid "Multiple suspicious activities"
1311
+ msgstr "Múltiplas atividades suspeitas"
1312
+
1313
+ #: ../common.php:881
1314
+ msgid "Multiple suspicious activities were detected"
1315
+ msgstr "Múltiplas atividades suspeitas foram detectadas"
1316
+
1317
+ #: ../settings.php:120
1318
+ msgid "Block access to user pages like /?author=n and user data via REST API"
1319
+ msgstr "Bloquear acesso a páginas de usuários como /?autor=n e dados de usuários via API REST"
1320
+
1321
+ #: ../settings.php:124
1322
+ msgid "Block access to the WordPress REST API except the following"
1323
+ msgstr "Bloquear acesso à API REST do Wordpress exceto para o seguinte"
1324
+
1325
+ #: ../settings.php:125
1326
+ msgid "Allow REST API for logged in users"
1327
+ msgstr "Permitir API REST para usuários logados"
1328
+
1329
+ #: ../settings.php:132
1330
+ msgid "Specify REST API namespaces to be allowed if REST API is disabled. One string per line."
1331
+ msgstr "Especificar namespaces permitidos da API REST quando ela estiver desabilitada. Um namespace por linha."
1332
+
1333
+ #: ../settings.php:143
1334
+ msgid "Registration limit"
1335
+ msgstr "Limite de registros"
1336
+
1337
+ #: ../settings.php:153
1338
+ msgid "Sort users in dashboard"
1339
+ msgstr "Ordenar usuários no painel de controle"
1340
+
1341
+ #: ../settings.php:153
1342
+ msgid "by date of registration"
1343
+ msgstr "por data de registro"
1344
+
1345
+ #: ../settings.php:168
1346
+ msgid "Query whitelist"
1347
+ msgstr "Lista de permissão para consultas"
1348
+
1349
+ #: ../settings.php:525 ../settings.php:647
1350
+ msgid "%s allowed registrations in %s minutes from one IP"
1351
+ msgstr "%s registros permitidos de um IP em %s minutos"
1352
+
1353
+ #: ../dashboard.php:2319
1354
+ msgid "Start typing here to find a country"
1355
+ msgstr "Comece a digitar aqui para encontrar um país"
1356
+
1357
+ #: ../dashboard.php:2402
1358
+ msgid "Click on a country name to add it to the list of selected countries"
1359
+ msgstr "Clique no nome de um país para adicioná-lo à lista de países selecionados"
1360
+
1361
+ #: ../dashboard.php:2426
1362
+ msgid "Submit forms"
1363
+ msgstr "Enviar formulários"
1364
+
1365
+ #: ../dashboard.php:2427
1366
+ msgid "Post comments"
1367
+ msgstr "Publicar comentários"
1368
+
1369
+ #: ../dashboard.php:2428
1370
+ msgid "Log in to the website"
1371
+ msgstr "Logar no website"
1372
+
1373
+ #: ../dashboard.php:2429
1374
+ msgid "Register on the website"
1375
+ msgstr "Registrar no website"
1376
+
1377
+ #: ../dashboard.php:2430
1378
+ msgid "Use XML-RPC"
1379
+ msgstr "Usar XML-RPC"
1380
+
1381
+ #: ../dashboard.php:2431
1382
+ msgid "Use REST API"
1383
+ msgstr "Usar API REST"
1384
+
1385
+ #: ../settings.php:178
1386
+ msgid "Deny it completely"
1387
+ msgstr "Negar completamente"
1388
+
1389
+ #: ../settings.php:178
1390
+ msgid "Mark it as spam"
1391
+ msgstr "Marcar como spam"
1392
+
1393
+ #: ../dashboard.php:1446
1394
+ msgid "in the last 24 hours"
1395
+ msgstr "nas últimas 24 horas"
1396
+
1397
+ #: ../dashboard.php:1817
1398
+ msgid "Main settings"
1399
+ msgstr "Configurações principais"
1400
+
1401
+ #: ../settings.php:240
1402
+ msgid "Weekly reports"
1403
+ msgstr "Relatórios semanais"
1404
+
1405
+ #: ../settings.php:750
1406
+ msgid "Sunday"
1407
+ msgstr "Domingo"
1408
+
1409
+ #: ../settings.php:751
1410
+ msgid "Monday"
1411
+ msgstr "Segunda-feira"
1412
+
1413
+ #: ../settings.php:752
1414
+ msgid "Tuesday"
1415
+ msgstr "Terça-feira"
1416
+
1417
+ #: ../settings.php:753
1418
+ msgid "Wednesday"
1419
+ msgstr "Quarta-feira"
1420
+
1421
+ #: ../settings.php:754
1422
+ msgid "Thursday"
1423
+ msgstr "Quinta-feira"
1424
+
1425
+ #: ../settings.php:755
1426
+ msgid "Friday"
1427
+ msgstr "Sexta-feira"
1428
+
1429
+ #: ../settings.php:756
1430
+ msgid "Saturday"
1431
+ msgstr "Sábado"
1432
+
1433
+ #: ../settings.php:816 ../settings.php:817
1434
+ msgid "If you use a caching plugin, you have to add your new login URL to the list of pages not to cache."
1435
+ msgstr "Se estiver utilizando um plugin de cache, você deve adicionar o novo URL de login na lista de páginas excluídas do cache."
1436
+
1437
+ #. translators: preposition of time
1438
+ #: ../settings.php:766
1439
+ msgctxt "preposition of time"
1440
+ msgid "at"
1441
+ msgstr "às"
1442
+
1443
+ #: ../cerber-load.php:3419
1444
+ msgid "Weekly report"
1445
+ msgstr "Relatório semanal"
1446
+
1447
+ #: ../cerber-load.php:3422
1448
+ msgid "To change reporting settings visit"
1449
+ msgstr "Para modificar as configurações de relatórios visitar"
1450
+
1451
+ #: ../cerber-load.php:3448
1452
+ msgid "Your login page:"
1453
+ msgstr "Sua página de login:"
1454
+
1455
+ #: ../cerber-load.php:3452
1456
+ msgid "Your license is valid until"
1457
+ msgstr "Sua licença é válida até"
1458
+
1459
+ #: ../cerber-load.php:3563
1460
+ msgid "Activity details"
1461
+ msgstr "Detalhes da atividade"
1462
+
1463
+ #: ../settings.php:782
1464
+ msgid "Click to send now"
1465
+ msgstr "Clique para enviar agora"
1466
+
1467
+ #: ../cerber-load.php:796
1468
+ msgid "> > > Translator of WP Cerber? To get the PRO license for free, drop your contacts here: https://wpcerber.com/contact/"
1469
+ msgstr "> > > Tradutor do WP Cerber? Para ganhar uma licença PRO, deixe seu contato aqui: https://wpcerber.com/contact/"
1470
+
1471
+ #: ../dashboard.php:416
1472
+ msgid "Email has been sent to"
1473
+ msgstr "O email foi enviado para"
1474
+
1475
+ #: ../dashboard.php:419
1476
+ msgid "Unable to send email to"
1477
+ msgstr "Não foi possível enviar o email para"
1478
+
1479
+ #: ../dashboard.php:2255
1480
+ msgid "Not permitted for one country"
1481
+ msgid_plural "Not permitted for %d countries"
1482
+ msgstr[0] "Não permitido para um país"
1483
+ msgstr[1] "Não permitido para %d países"
1484
+
1485
+ #: ../dashboard.php:2406
1486
+ msgctxt "to is a marker of infinitive, e.g. \"to use it\""
1487
+ msgid "Selected countries are permitted to %s, other countries are not permitted to"
1488
+ msgstr "Aos países selecionados é permitido %s, aos outros países não"
1489
+
1490
+ #: ../dashboard.php:2409
1491
+ msgctxt "to is a marker of infinitive, e.g. \"to use it\""
1492
+ msgid "Selected countries are not permitted to %s, other countries are permitted to"
1493
+ msgstr "Aos países selecionados não é permitido %s, aos outros países sim"
1494
+
1495
+ #. Description of the plugin
1496
+ #:
1497
+ msgid "Protects site from brute force attacks, bots and hackers. Antispam protection with the Cerber antispam engine and reCAPTCHA. Comprehensive control of user activity. Restrict login by IP access lists. Limit login attempts. Know more: <a href=\"https://wpcerber.com\">wpcerber.com</a>."
1498
+ msgstr "Protege sites de ataques de força bruta, bots e hackers. Proteção antispam com o mecanismo antispam Cerber e reCAPTCHA. Controle abrangente das atividades de usuários. Restrição de login com listas de acesso por IPs. Limitação das tentativas de login. Saiba mais: <a href=\"https://wpcerber.com\">wpcerber.com</a>."
1499
+
1500
+ #: ../cerber-load.php:3551
1501
+ msgid "Weekly Report"
1502
+ msgstr "Relatório Semanal"
1503
+
1504
+ #: ../settings.php:86
1505
+ msgid "Use 404 template from the active theme"
1506
+ msgstr "Usar template 404 do tema ativo"
1507
+
1508
+ #: ../settings.php:86
1509
+ msgid "Display simple 404 page"
1510
+ msgstr "Exibir página 404 simples"
1511
+
1512
+ #: ../settings.php:174
1513
+ msgid "Enter a part of query string or query path to exclude a request from inspection by the engine. One item per line."
1514
+ msgstr "Digite parte da string de consulta ou do caminho de consulta para excluir uma requisição da inspeção. Um item por linha."
1515
+
1516
+ #: ../settings.php:253
1517
+ msgid "if empty, email from notification settings will be used"
1518
+ msgstr "quando vazio, o email das configurações de notificações será usado"
1519
+
1520
+ #: ../settings.php:241
1521
+ msgid "Enable reporting"
1522
+ msgstr "Habilitar relatórios"
1523
+
1524
+ #: ../cerber-load.php:3476
1525
+ msgid "Your last sign-in was %s from %s"
1526
+ msgstr "Seu último login foi em %s a partir do IP %s"
1527
+
1528
+ #: ../cerber-load.php:3577
1529
+ msgid "Attempts to log in with non-existent username"
1530
+ msgstr "Tentativas de login com nomes de usuário não existentes"
1531
+
1532
+ #: ../dashboard.php:205
1533
+ msgid "IP address, IPv4 address range or subnet"
1534
+ msgstr "Endereço de IP, faixa de IPv4 ou sub-rede"
1535
+
1536
+ #: ../dashboard.php:207
1537
+ msgid "Optional comment for this entry"
1538
+ msgstr "Comentário opcional para esta estrada"
1539
+
1540
+ #: ../dashboard.php:248
1541
+ msgid "You cannot add your IP address or network"
1542
+ msgstr "Você não pode adicionar seu endereço de IP ou rede"
1543
+
1544
+ #: ../cerber-news.php:173
1545
+ msgid "Cool!"
1546
+ msgstr "Legal!"
1547
+
1548
+ #: ../settings.php:150
1549
+ msgid "To specify a REGEX pattern wrap a pattern in two forward slashes."
1550
+ msgstr "Para especificar um padrão REGEX, envolva o padrão entre barras"
1551
+
1552
+ #: ../dashboard.php:56
1553
+ msgid "Cerber Traffic Inspector"
1554
+ msgstr "Inspetor de Tráfego do Cerber"
1555
+
1556
+ #: ../dashboard.php:56 ../dashboard.php:1224 ../dashboard.php:2524
1557
+ msgid "Traffic Inspector"
1558
+ msgstr "Inspetor de Tráfego"
1559
+
1560
+ #: ../dashboard.php:1240
1561
+ msgid "Traffic"
1562
+ msgstr "Tráfego"
1563
+
1564
+ #: ../dashboard.php:2529
1565
+ msgid "Live traffic"
1566
+ msgstr "Tráfego ao vivo"
1567
+
1568
+ #: ../dashboard.php:2847
1569
+ msgid "Request"
1570
+ msgstr "Requisição"
1571
+
1572
+ #: ../dashboard.php:2849
1573
+ msgid "Host Info"
1574
+ msgstr "Informação do Servidor"
1575
+
1576
+ #: ../dashboard.php:2850
1577
+ msgid "User Agent"
1578
+ msgstr "User Agent"
1579
+
1580
+ #: ../dashboard.php:2875
1581
+ msgid "All requests"
1582
+ msgstr "Todas as requisições"
1583
+
1584
+ #: ../dashboard.php:2877
1585
+ msgid "Not logged in visitors"
1586
+ msgstr "Visitantes não logados"
1587
+
1588
+ #: ../dashboard.php:2878
1589
+ msgid "Form submissions"
1590
+ msgstr "Envios de formulários"
1591
+
1592
+ #: ../dashboard.php:2879
1593
+ msgid "Page Not Found"
1594
+ msgstr "Página não encontrada"
1595
+
1596
+ #: ../dashboard.php:2880
1597
+ msgid "REST API"
1598
+ msgstr "API REST"
1599
+
1600
+ #: ../dashboard.php:2881
1601
+ msgid "XML-RPC"
1602
+ msgstr "XML-RPC"
1603
+
1604
+ #: ../dashboard.php:2885
1605
+ msgid "Longer than"
1606
+ msgstr "Mais do que"
1607
+
1608
+ #: ../dashboard.php:2898
1609
+ msgid "Refresh"
1610
+ msgstr "Recarregar"
1611
+
1612
+ #: ../common.php:109
1613
+ msgid "Check for requests"
1614
+ msgstr "Verificar requisições"
1615
+
1616
+ #: ../common.php:1097
1617
+ msgid "Not specified"
1618
+ msgstr "Não especificado"
1619
+
1620
+ #: ../settings.php:277
1621
+ msgid "Logging mode"
1622
+ msgstr "Modo de registro"
1623
+
1624
+ #: ../settings.php:283
1625
+ msgid "Logging disabled"
1626
+ msgstr "Registro desabilitado"
1627
+
1628
+ #: ../settings.php:284
1629
+ msgid "Smart"
1630
+ msgstr "Inteligente"
1631
+
1632
+ #: ../settings.php:285
1633
+ msgid "All traffic"
1634
+ msgstr "Todo tráfego"
1635
+
1636
+ #: ../settings.php:289
1637
+ msgid "Ignore crawlers"
1638
+ msgstr "Ignorar crawlers"
1639
+
1640
+ #: ../settings.php:299
1641
+ msgid "Mask these form fields"
1642
+ msgstr "Mascarar estes campos de fomulários"
1643
+
1644
+ #: ../settings.php:334
1645
+ msgid "milliseconds"
1646
+ msgstr "milissegundos"
1647
+
1648
+ #: ../settings.php:261
1649
+ msgid "Inspection"
1650
+ msgstr "Inspeção"
1651
+
1652
+ #: ../settings.php:262
1653
+ msgid "Enable traffic inspection"
1654
+ msgstr "Habilitar inspeção de tráfego"
1655
+
1656
+ #: ../settings.php:276
1657
+ msgid "Logging"
1658
+ msgstr "Registrando"
1659
+
1660
+ #: ../settings.php:294
1661
+ msgid "Save request fields"
1662
+ msgstr "Salvar campos de requisição"
1663
+
1664
+ #: ../settings.php:329
1665
+ msgid "Page generation time threshold"
1666
+ msgstr "Limite de tempo para geração de páginas"
1667
+
1668
+ #: ../dashboard.php:2867
1669
+ msgid "No requests have been logged."
1670
+ msgstr "Nenhuma requisição foi registrada."
1671
+
1672
+ #: ../dashboard.php:1223
1673
+ msgid "enabled"
1674
+ msgstr "habilitado"
1675
+
1676
+ #: ../dashboard.php:1227
1677
+ msgid "no connection"
1678
+ msgstr "sem conexão"
1679
+
1680
+ #: ../dashboard.php:3159
1681
+ msgid "Advanced search"
1682
+ msgstr "Busca avançada"
1683
+
1684
+ #: ../dashboard.php:992
1685
+ msgid "Last seen"
1686
+ msgstr "Visto pela última vez"
1687
+
1688
+ #: ../common.php:834 ../common.php:882
1689
+ msgid "Probing for vulnerable PHP code"
1690
+ msgstr "Teste para vulnerabilidades no código PHP"
1691
+
1692
+ #: ../dashboard.php:3119
1693
+ msgid "Any"
1694
+ msgstr "Qualquer"
1695
+
1696
+ #: ../cerber-load.php:3203
1697
+ msgid "We're sorry, you are not allowed to proceed"
1698
+ msgstr "Desculpe, você não tem permissão para prosseguir"
1699
+
1700
+ #: ../settings.php:267
1701
+ msgid "Request whitelist"
1702
+ msgstr "Lista de permissão para requisições"
1703
+
1704
+ #: ../settings.php:273
1705
+ msgid "Enter a request URI to exclude the request from inspection. One item per line."
1706
+ msgstr "Digite um URI de requisição para excluir a requisição da inspeção. Um item por linha."
1707
+
1708
+ #: ../settings.php:310
1709
+ msgid "Save request headers"
1710
+ msgstr "Salvar cabeçalhos da requisição"
1711
+
1712
+ #: ../settings.php:316
1713
+ msgid "Save $_SERVER"
1714
+ msgstr "Salvar $_SERVER"
1715
+
1716
+ #: ../settings.php:322
1717
+ msgid "Save request cookies"
1718
+ msgstr "Salvar cookies da requisição"
1719
+
1720
+ #: ../settings.php:121
1721
+ msgid "Protect admin scripts"
1722
+ msgstr "Proteger scripts da administração"
1723
+
1724
+ #: ../settings.php:121
1725
+ msgid "Block unauthorized access to load-scripts.php and load-styles.php"
1726
+ msgstr "Bloquear acessos não autorizados a load-scripts.php e load-styles.php"
1727
+
1728
+ #: ../common.php:1583
1729
+ msgid "Unable to create the directory"
1730
+ msgstr "Não foi possível criar o diretório"
1731
+
1732
+ #: ../common.php:1588
1733
+ msgid "Destination folder access denied"
1734
+ msgstr "Acesso recusado à pasta de destino"
1735
+
1736
+ #: ../common.php:1591
1737
+ msgid "File not found"
1738
+ msgstr "Arquivo não encontrado"
1739
+
1740
+ #: ../common.php:1594
1741
+ msgid "Unable to copy the file"
1742
+ msgstr "Não foi possível copiar o arquivo"
1743
+
1744
+ #: ../common.php:1600
1745
+ msgid "Unable to delete the file"
1746
+ msgstr "Não foi possível apagar o arquivo"
1747
+
1748
+ #: ../settings.php:70
1749
+ msgid "Plugin initialization"
1750
+ msgstr "Inicialização do plugin"
1751
+
1752
+ #: ../settings.php:71
1753
+ msgid "Load security engine"
1754
+ msgstr "Carregar mecanismo de segurança"
1755
+
1756
+ #: ../settings.php:71
1757
+ msgid "Legacy mode"
1758
+ msgstr "Modo legado"
1759
+
1760
+ #: ../settings.php:71
1761
+ msgid "Standard mode"
1762
+ msgstr "Modo padrão"
1763
+
1764
+ #: ../settings.php:794
1765
+ msgid "Plugin initialization mode has not been changed"
1766
+ msgstr "O modo de inicialização do plugin não foi alterado"
1767
+
1768
+ #. Description of the plugin
1769
+ #:
1770
+ msgid "This is a standard boot module for WP Cerber Security & Antispam plugin. It was installed when you set the plugin initialization mode to Standard. Know more: <a href=\"https://wpcerber.com\">wpcerber.com</a>."
1771
+ msgstr "Este é um módulo de inicialização padrão para o plugin WP Cerber Security & Antispam. Ele foi instalado ao configurar \"Padrão\" como modo de inicialização do plugin. Saiba mais: <a href=\"https://wpcerber.com\">wpcerber.com</a>."
1772
+
1773
+ #: ../common.php:835
1774
+ msgid "Attempt to upload executable file denied"
1775
+ msgstr "Tentativa de upload de arquivo executável recusada"
1776
+
1777
+ #: ../common.php:836
1778
+ msgid "File upload denied"
1779
+ msgstr "Upload de arquivo recusado"
1780
+
1781
+ #. Description of the plugin
1782
+ #:
1783
+ msgid "Protects WordPress against brute force attacks, bots and hackers. Antispam protection with the Cerber antispam engine and reCAPTCHA. Comprehensive control of user and bot activity. Restrict login by IP access lists. Limit login attempts. Know more: <a href=\"https://wpcerber.com\">wpcerber.com</a>."
1784
+ msgstr "Protege o Wordpress contra ataques de força bruta, bots e hackers. Proteção contra spam com o mecanismo antispam do Cerber e reCAPTCHA. Controle abrangente das atividades de usuários e bots. Restrição de login com listas de acesso por IP. Limitação para tentativas de login. Saiba mais: <a href=\"https://wpcerber.com\">wpcerber.com</a>."
1785
+
1786
+ #: ../settings.php:94
1787
+ msgid "Custom login URL may contain only letters, numbers, dashes and underscores"
1788
+ msgstr "O URL personalizado de login pode conter apenas letras, números, traços e underscores."
1789
+
1790
+ #: ../settings.php:174 ../settings.php:273
1791
+ msgid "To specify a REGEX pattern, enclose a whole line in two braces."
1792
+ msgstr "Para especificar um padrão REGEX, envolva a linha toda entre duas barras."
1793
+
1794
+ #: ../settings.php:358
1795
+ msgid "Be careful about enabling these options."
1796
+ msgstr "Seja cuidadoso ao habilitar estas opções."
1797
+
1798
+ #: ../settings.php:358
1799
+ msgid "If you forget your Custom login URL, you will be unable to log in."
1800
+ msgstr "Se você esquecer sua URL de login personalizada, não será possível fazer login."
1801
+
languages/wp-cerber.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: WP Cerber\n"
6
  "Report-Msgid-Bugs-To: \n"
7
  "POT-Creation-Date: Tue Sep 08 2015 21:38:11 GMT+0300\n"
8
- "POT-Revision-Date: Thu Apr 05 2018 11:06:47 GMT+0300\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -24,12 +24,12 @@ msgstr ""
24
  "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
25
  "X-Generator: Loco - https://localise.biz/"
26
 
27
- #: ../dashboard.php:52 ../settings.php:388
28
  msgid "WP Cerber Security"
29
  msgstr ""
30
 
31
  #. Name of the plugin
32
- #: ../dashboard.php:52 ../dashboard.php:76
33
  msgid "WP Cerber"
34
  msgstr ""
35
 
@@ -37,8 +37,8 @@ msgstr ""
37
  msgid "Cerber Dashboard"
38
  msgstr ""
39
 
40
- #: ../dashboard.php:54 ../dashboard.php:1238 ../dashboard.php:1816 ../settings.
41
- #: php:393
42
  msgid "Dashboard"
43
  msgstr ""
44
 
@@ -46,7 +46,7 @@ msgstr ""
46
  msgid "Cerber Traffic Inspector"
47
  msgstr ""
48
 
49
- #: ../dashboard.php:56 ../dashboard.php:1224 ../dashboard.php:2524
50
  msgid "Traffic Inspector"
51
  msgstr ""
52
 
@@ -54,548 +54,553 @@ msgstr ""
54
  msgid "Cerber Security Rules"
55
  msgstr ""
56
 
57
- #: ../dashboard.php:60 ../dashboard.php:2184
58
  msgid "Security Rules"
59
  msgstr ""
60
 
61
- #: ../dashboard.php:63
 
 
 
 
62
  msgid "Cerber antispam settings"
63
  msgstr ""
64
 
65
- #: ../dashboard.php:63 ../dashboard.php:1241 ../cerber-load.php:4109 ../settings.
66
- #: php:196
67
  msgid "Antispam"
68
  msgstr ""
69
 
70
- #: ../dashboard.php:64
71
  msgid "Cerber tools"
72
  msgstr ""
73
 
74
- #: ../dashboard.php:64 ../cerber-tools.php:43
75
  msgid "Tools"
76
  msgstr ""
77
 
78
- #: ../dashboard.php:122 ../dashboard.php:195
79
  msgid "Remove"
80
  msgstr ""
81
 
82
- #: ../dashboard.php:129 ../dashboard.php:695 ../dashboard.php:2848 ../cerber-load.
83
- #: php:3864
84
  msgid "IP"
85
  msgstr ""
86
 
87
- #: ../dashboard.php:130 ../dashboard.php:696
88
  msgid "Hostname"
89
  msgstr ""
90
 
91
- #: ../dashboard.php:131 ../dashboard.php:697
92
  msgid "Country"
93
  msgstr ""
94
 
95
- #: ../dashboard.php:132
96
  msgid "Expires"
97
  msgstr ""
98
 
99
- #: ../dashboard.php:133 ../cerber-load.php:3371
100
  msgid "Reason"
101
  msgstr ""
102
 
103
- #: ../dashboard.php:134
104
  msgid "Action"
105
  msgstr ""
106
 
107
- #: ../dashboard.php:148
108
  #, php-format
109
  msgid "Showing last %d records from %d"
110
  msgstr ""
111
 
112
- #: ../dashboard.php:150
113
  msgid "Hint"
114
  msgstr ""
115
 
116
- #: ../dashboard.php:150
117
  msgid "To view activity, click on the IP"
118
  msgstr ""
119
 
120
- #: ../dashboard.php:154
121
  msgid "No lockouts at the moment. The sky is clear."
122
  msgstr ""
123
 
124
- #: ../dashboard.php:167 ../dashboard.php:670 ../dashboard.php:873 ../dashboard.
125
- #: php:1219 ../dashboard.php:2679 ../cerber-load.php:4100 ../settings.php:77 ..
126
- #: /settings.php:365
127
  msgid "White IP Access List"
128
  msgstr ""
129
 
130
- #: ../dashboard.php:167
131
  msgid "These IPs will never be locked out"
132
  msgstr ""
133
 
134
- #: ../dashboard.php:169 ../dashboard.php:671 ../dashboard.php:876 ../dashboard.
135
- #: php:1220 ../dashboard.php:2680
136
  msgid "Black IP Access List"
137
  msgstr ""
138
 
139
- #: ../dashboard.php:169
140
  msgid "Nobody can log in or register from these IPs"
141
  msgstr ""
142
 
143
- #: ../dashboard.php:176
144
  msgid "Your IP"
145
  msgstr ""
146
 
147
- #: ../dashboard.php:194 ../dashboard.php:886 ../dashboard.php:913 ../dashboard.
148
- #: php:1005
149
  msgid "Check for activity"
150
  msgstr ""
151
 
152
- #: ../dashboard.php:201
153
  msgid "List is empty"
154
  msgstr ""
155
 
156
- #: ../dashboard.php:205
157
  msgid "IP address, IPv4 address range or subnet"
158
  msgstr ""
159
 
160
- #: ../dashboard.php:206
161
  msgid "Add IP to the list"
162
  msgstr ""
163
 
164
- #: ../dashboard.php:207
165
  msgid "Optional comment for this entry"
166
  msgstr ""
167
 
168
- #: ../dashboard.php:232 ../dashboard.php:244
169
  msgid "Incorrect IP address or IP range"
170
  msgstr ""
171
 
172
- #: ../dashboard.php:238
173
  #, php-format
174
  msgid "Address %s was added to White IP Access List"
175
  msgstr ""
176
 
177
- #: ../dashboard.php:248
178
  msgid "You cannot add your IP address or network"
179
  msgstr ""
180
 
181
- #: ../dashboard.php:252
182
  #, php-format
183
  msgid "Address %s was added to Black IP Access List"
184
  msgstr ""
185
 
186
- #: ../dashboard.php:349 ../dashboard.php:2609 ../whois.php:221 ../whois.php:252 ..
187
- #: /common.php:874 ../common.php:1153
188
  msgid "Unknown"
189
  msgstr ""
190
 
191
- #: ../dashboard.php:391
192
  msgid "unknown"
193
  msgstr ""
194
 
195
- #: ../dashboard.php:416
196
  msgid "Email has been sent to"
197
  msgstr ""
198
 
199
- #: ../dashboard.php:419
200
  msgid "Unable to send email to"
201
  msgstr ""
202
 
203
- #: ../dashboard.php:425
204
  #, php-format
205
  msgid "Lockout for %s was removed"
206
  msgstr ""
207
 
208
- #: ../dashboard.php:441 ../dashboard.php:1640
209
  msgid "Settings saved"
210
  msgstr ""
211
 
212
- #: ../dashboard.php:534
213
  msgid "IP address"
214
  msgstr ""
215
 
216
- #: ../dashboard.php:534 ../dashboard.php:698 ../dashboard.php:2846
217
  msgid "Date"
218
  msgstr ""
219
 
220
- #: ../dashboard.php:534 ../dashboard.php:699
221
  msgid "Event"
222
  msgstr ""
223
 
224
- #: ../dashboard.php:534 ../dashboard.php:700 ../dashboard.php:2851
225
  msgid "Local User"
226
  msgstr ""
227
 
228
- #: ../dashboard.php:534
229
  msgid "User login"
230
  msgstr ""
231
 
232
- #: ../dashboard.php:534
233
  msgid "User ID"
234
  msgstr ""
235
 
236
- #: ../dashboard.php:534 ../dashboard.php:701 ../cerber-load.php:3872
237
  msgid "Username used"
238
  msgstr ""
239
 
240
- #: ../dashboard.php:675 ../dashboard.php:879 ../dashboard.php:2684 ../common.php:
241
- #: 845
242
  msgid "Locked out"
243
  msgstr ""
244
 
245
- #: ../dashboard.php:719
246
  msgid "Export"
247
  msgstr ""
248
 
249
- #: ../dashboard.php:723
250
  msgid "No activity has been logged."
251
  msgstr ""
252
 
253
- #: ../dashboard.php:729
254
  msgid "All events"
255
  msgstr ""
256
 
257
- #: ../dashboard.php:738
258
  msgid "Search for IP or username"
259
  msgstr ""
260
 
261
- #: ../dashboard.php:738
262
  msgid "Filter"
263
  msgstr ""
264
 
265
- #: ../dashboard.php:909
266
  msgid "Abuse email:"
267
  msgstr ""
268
 
269
- #: ../dashboard.php:913
270
  msgid "Network:"
271
  msgstr ""
272
 
273
- #: ../dashboard.php:927
274
  msgid "Add network to the Black List"
275
  msgstr ""
276
 
277
- #: ../dashboard.php:932
278
  msgid "Add IP to the Black List"
279
  msgstr ""
280
 
281
- #: ../dashboard.php:992
282
  msgid "Last seen"
283
  msgstr ""
284
 
285
- #: ../dashboard.php:999 ../dashboard.php:1084
286
  msgid "Registered"
287
  msgstr ""
288
 
289
- #: ../dashboard.php:1081
290
  msgid "Comments"
291
  msgstr ""
292
 
293
- #: ../dashboard.php:1082
294
  msgid "Last login"
295
  msgstr ""
296
 
297
- #: ../dashboard.php:1083
298
  msgid "Failed login attempts"
299
  msgstr ""
300
 
301
- #: ../dashboard.php:1115 ../dashboard.php:1202
302
  msgid "Never"
303
  msgstr ""
304
 
305
- #: ../dashboard.php:1154
306
  msgid "You"
307
  msgstr ""
308
 
309
- #: ../dashboard.php:1172
310
  msgid "Cerber Quick View"
311
  msgstr ""
312
 
313
- #: ../dashboard.php:1206 ../dashboard.php:1227
314
  msgid "active"
315
  msgstr ""
316
 
317
- #: ../dashboard.php:1206
318
  msgid "deactivate"
319
  msgstr ""
320
 
321
- #: ../dashboard.php:1208
322
  msgid "not active"
323
  msgstr ""
324
 
325
- #: ../dashboard.php:1209 ../dashboard.php:1223
326
  msgid "disabled"
327
  msgstr ""
328
 
329
- #: ../dashboard.php:1214
330
  msgid "failed attempts"
331
  msgstr ""
332
 
333
- #: ../dashboard.php:1214 ../dashboard.php:1215
334
  msgid "in 24 hours"
335
  msgstr ""
336
 
337
- #: ../dashboard.php:1214 ../dashboard.php:1215
338
  msgid "view all"
339
  msgstr ""
340
 
341
- #: ../dashboard.php:1215
342
  msgid "lockouts"
343
  msgstr ""
344
 
345
- #: ../dashboard.php:1217
346
  msgid "Lockouts at the moment"
347
  msgstr ""
348
 
349
- #: ../dashboard.php:1218
350
  msgid "Last lockout"
351
  msgstr ""
352
 
353
- #: ../dashboard.php:1219 ../dashboard.php:1220 ../dashboard.php:1796
354
  msgid "entry"
355
  msgid_plural "entries"
356
  msgstr[0] ""
357
  msgstr[1] ""
358
 
359
- #: ../dashboard.php:1221 ../settings.php:99
360
  msgid "Citadel mode"
361
  msgstr ""
362
 
363
- #: ../dashboard.php:1223
364
  msgid "enabled"
365
  msgstr ""
366
 
367
- #: ../dashboard.php:1227
368
  msgid "no connection"
369
  msgstr ""
370
 
371
- #: ../dashboard.php:1239 ../dashboard.php:1467 ../cerber-load.php:3855 ..
372
- #: /settings.php:104 ../settings.php:395
373
  msgid "Activity"
374
  msgstr ""
375
 
376
- #: ../dashboard.php:1240
377
  msgid "Traffic"
378
  msgstr ""
379
 
380
- #: ../dashboard.php:1307 ../settings.php:79
381
  msgid "My site is behind a reverse proxy"
382
  msgstr ""
383
 
384
- #: ../dashboard.php:1446
385
  msgid "in the last 24 hours"
386
  msgstr ""
387
 
388
- #: ../dashboard.php:1452 ../dashboard.php:1482
389
  msgid "View all"
390
  msgstr ""
391
 
392
- #: ../dashboard.php:1460 ../common.php:797
393
  msgid "User registered"
394
  msgstr ""
395
 
396
- #: ../dashboard.php:1461
397
  msgid "All suspicious activity"
398
  msgstr ""
399
 
400
- #: ../dashboard.php:1483
401
  msgid "Recently locked out IP addresses"
402
  msgstr ""
403
 
404
- #: ../dashboard.php:1508
405
  msgid "Confused about some settings?"
406
  msgstr ""
407
 
408
- #: ../dashboard.php:1509
409
  msgid "You can easily load default recommended settings using button below"
410
  msgstr ""
411
 
412
- #: ../dashboard.php:1511
413
  msgid "Load default settings"
414
  msgstr ""
415
 
416
- #: ../dashboard.php:1513
417
  msgid "Are you sure?"
418
  msgstr ""
419
 
420
- #: ../dashboard.php:1519
421
  msgid "doesn't affect Custom login URL and Access Lists"
422
  msgstr ""
423
 
424
- #: ../dashboard.php:1520 ../cerber-load.php:3403 ../cerber-load.php:4102
425
  msgid "Getting Started Guide"
426
  msgstr ""
427
 
428
- #: ../dashboard.php:1623
429
  msgid "Attention! Citadel mode is now active. Nobody is able to log in."
430
  msgstr ""
431
 
432
- #: ../dashboard.php:1624
433
  msgid "Deactivate"
434
  msgstr ""
435
 
436
- #: ../dashboard.php:1625
437
  msgid "View Activity"
438
  msgstr ""
439
 
440
- #: ../dashboard.php:1726
441
  msgid "Subscribe"
442
  msgstr ""
443
 
444
- #: ../dashboard.php:1727 ../cerber-tools.php:273
445
  msgid "Unsubscribe"
446
  msgstr ""
447
 
448
- #: ../dashboard.php:1755
449
  msgid "You've subscribed"
450
  msgstr ""
451
 
452
- #: ../dashboard.php:1758
453
  msgid "You've unsubscribed"
454
  msgstr ""
455
 
456
- #: ../dashboard.php:1817
457
  msgid "Main settings"
458
  msgstr ""
459
 
460
- #: ../dashboard.php:2189
461
  msgid "Countries"
462
  msgstr ""
463
 
464
- #: ../dashboard.php:2252
465
  #, php-format
466
  msgid "Permitted for one country"
467
  msgid_plural "Permitted for %d countries"
468
  msgstr[0] ""
469
  msgstr[1] ""
470
 
471
- #: ../dashboard.php:2255
472
  #, php-format
473
  msgid "Not permitted for one country"
474
  msgid_plural "Not permitted for %d countries"
475
  msgstr[0] ""
476
  msgstr[1] ""
477
 
478
- #: ../dashboard.php:2263
479
  msgid "No rule"
480
  msgstr ""
481
 
482
- #: ../dashboard.php:2319
483
  msgid "Start typing here to find a country"
484
  msgstr ""
485
 
486
- #: ../dashboard.php:2402
487
  msgid "Click on a country name to add it to the list of selected countries"
488
  msgstr ""
489
 
490
- #: ../dashboard.php:2406
491
  #, php-format
492
  msgctxt "to is a marker of infinitive, e.g. \"to use it\""
493
  msgid "Selected countries are permitted to %s, other countries are not permitted to"
494
  msgstr ""
495
 
496
- #: ../dashboard.php:2409
497
  #, php-format
498
  msgctxt "to is a marker of infinitive, e.g. \"to use it\""
499
  msgid "Selected countries are not permitted to %s, other countries are permitted to"
500
  msgstr ""
501
 
502
- #: ../dashboard.php:2426
503
  msgid "Submit forms"
504
  msgstr ""
505
 
506
- #: ../dashboard.php:2427
507
  msgid "Post comments"
508
  msgstr ""
509
 
510
- #: ../dashboard.php:2428
511
  msgid "Log in to the website"
512
  msgstr ""
513
 
514
- #: ../dashboard.php:2429
515
  msgid "Register on the website"
516
  msgstr ""
517
 
518
- #: ../dashboard.php:2430
519
  msgid "Use XML-RPC"
520
  msgstr ""
521
 
522
- #: ../dashboard.php:2431
523
  msgid "Use REST API"
524
  msgstr ""
525
 
526
- #: ../dashboard.php:2475
527
  msgid "Security rules have been updated"
528
  msgstr ""
529
 
530
- #: ../dashboard.php:2529
531
  msgid "Live traffic"
532
  msgstr ""
533
 
534
- #: ../dashboard.php:2530 ../cerber-tools.php:91 ../cerber-tools.php:100
 
535
  msgid "Settings"
536
  msgstr ""
537
 
538
- #: ../dashboard.php:2531 ../settings.php:413 ../cerber-tools.php:51
 
539
  msgid "Help"
540
  msgstr ""
541
 
542
- #: ../dashboard.php:2847
543
  msgid "Request"
544
  msgstr ""
545
 
546
- #: ../dashboard.php:2849
547
  msgid "Host Info"
548
  msgstr ""
549
 
550
- #: ../dashboard.php:2850
551
  msgid "User Agent"
552
  msgstr ""
553
 
554
- #: ../dashboard.php:2867
555
  msgid "No requests have been logged."
556
  msgstr ""
557
 
558
- #: ../dashboard.php:2875
559
  msgid "All requests"
560
  msgstr ""
561
 
562
- #: ../dashboard.php:2876 ../settings.php:167
563
  msgid "Logged in users"
564
  msgstr ""
565
 
566
- #: ../dashboard.php:2877
567
  msgid "Not logged in visitors"
568
  msgstr ""
569
 
570
- #: ../dashboard.php:2878
571
  msgid "Form submissions"
572
  msgstr ""
573
 
574
- #: ../dashboard.php:2879
575
  msgid "Page Not Found"
576
  msgstr ""
577
 
578
- #: ../dashboard.php:2880
579
  msgid "REST API"
580
  msgstr ""
581
 
582
- #: ../dashboard.php:2881
583
  msgid "XML-RPC"
584
  msgstr ""
585
 
586
- #: ../dashboard.php:2885
587
  msgid "Longer than"
588
  msgstr ""
589
 
590
- #: ../dashboard.php:2898
591
  msgid "Refresh"
592
  msgstr ""
593
 
594
- #: ../dashboard.php:3119
595
  msgid "Any"
596
  msgstr ""
597
 
598
- #: ../dashboard.php:3159
599
  msgid "Advanced search"
600
  msgstr ""
601
 
@@ -619,226 +624,230 @@ msgstr ""
619
  msgid "Gregory"
620
  msgstr ""
621
 
622
- #: ../common.php:109
623
  msgid "Check for requests"
624
  msgstr ""
625
 
626
- #: ../common.php:143
627
  msgid "Malicious activities mitigated"
628
  msgstr ""
629
 
630
- #: ../common.php:146
631
  msgid "Spam comments denied"
632
  msgstr ""
633
 
634
- #: ../common.php:147
635
  msgid "Spam form submissions denied"
636
  msgstr ""
637
 
638
- #: ../common.php:148
639
  msgid "Malicious IP addresses detected"
640
  msgstr ""
641
 
642
- #: ../common.php:149
643
  msgid "Lockouts occurred"
644
  msgstr ""
645
 
646
- #: ../common.php:203 ../common.php:260 ../common.php:265 ../common.php:270 ..
647
- #: /cerber-load.php:666 ../cerber-load.php:678 ../cerber-load.php:685 ../cerber-
648
- #: load.php:932 ../cerber-load.php:1149 ../cerber-load.php:1155 ../cerber-load.
649
- #: php:1160 ../cerber-load.php:1165 ../cerber-load.php:1171 ../cerber-load.php:
650
- #: 1178 ../cerber-load.php:1278 ../cerber-load.php:1415 ../settings.php:793 ..
651
- #: /settings.php:864
652
  msgid "ERROR:"
653
  msgstr ""
654
 
655
- #: ../common.php:796
656
  msgid "User created"
657
  msgstr ""
658
 
659
- #: ../common.php:798
660
  msgid "Logged in"
661
  msgstr ""
662
 
663
- #: ../common.php:799
664
  msgid "Logged out"
665
  msgstr ""
666
 
667
- #: ../common.php:800
668
  msgid "Login failed"
669
  msgstr ""
670
 
671
- #: ../common.php:803
672
  msgid "IP blocked"
673
  msgstr ""
674
 
675
- #: ../common.php:804
676
  msgid "Subnet blocked"
677
  msgstr ""
678
 
679
- #: ../common.php:806
680
  msgid "Citadel activated!"
681
  msgstr ""
682
 
683
- #: ../common.php:807
684
  msgid "Spam comment denied"
685
  msgstr ""
686
 
687
- #: ../common.php:808
688
  msgid "Spam form submission denied"
689
  msgstr ""
690
 
691
- #: ../common.php:809
692
  msgid "Form submission denied"
693
  msgstr ""
694
 
695
- #: ../common.php:810
696
  msgid "Comment denied"
697
  msgstr ""
698
 
699
- #: ../common.php:821
700
  msgid "Password changed"
701
  msgstr ""
702
 
703
- #: ../common.php:822
704
  msgid "Password reset requested"
705
  msgstr ""
706
 
707
- #: ../common.php:824
708
  msgid "reCAPTCHA verification failed"
709
  msgstr ""
710
 
711
- #: ../common.php:825
712
  msgid "reCAPTCHA settings are incorrect"
713
  msgstr ""
714
 
715
- #: ../common.php:826
716
  msgid "Request to the Google reCAPTCHA service failed"
717
  msgstr ""
718
 
719
- #: ../common.php:828
720
  msgid "Attempt to access prohibited URL"
721
  msgstr ""
722
 
723
- #: ../common.php:829 ../common.php:877
724
  msgid "Attempt to log in with non-existent username"
725
  msgstr ""
726
 
727
- #: ../common.php:830 ../common.php:878
728
  msgid "Attempt to log in with prohibited username"
729
  msgstr ""
730
 
731
- #: ../common.php:832
732
  msgid "Attempt to log in denied"
733
  msgstr ""
734
 
735
- #: ../common.php:833
736
  msgid "Attempt to register denied"
737
  msgstr ""
738
 
739
- #: ../common.php:834 ../common.php:882
740
  msgid "Probing for vulnerable PHP code"
741
  msgstr ""
742
 
743
- #: ../common.php:835
744
  msgid "Attempt to upload executable file denied"
745
  msgstr ""
746
 
747
- #: ../common.php:836
748
  msgid "File upload denied"
749
  msgstr ""
750
 
751
- #: ../common.php:838
752
  msgid "Request to REST API denied"
753
  msgstr ""
754
 
755
- #: ../common.php:839
756
  msgid "XML-RPC request denied"
757
  msgstr ""
758
 
759
- #: ../common.php:843
760
  msgid "Bot detected"
761
  msgstr ""
762
 
763
- #: ../common.php:844
764
  msgid "Citadel mode is active"
765
  msgstr ""
766
 
767
- #: ../common.php:846
768
  msgid "IP blacklisted"
769
  msgstr ""
770
 
771
- #: ../common.php:849
772
  msgid "Malicious activity detected"
773
  msgstr ""
774
 
775
- #: ../common.php:850
776
  msgid "Blocked by country rule"
777
  msgstr ""
778
 
779
- #: ../common.php:851
780
  msgid "Limit reached"
781
  msgstr ""
782
 
783
- #: ../common.php:852
784
  msgid "Multiple suspicious activities"
785
  msgstr ""
786
 
787
- #: ../common.php:875
 
 
 
 
788
  msgid "Limit on login attempts is reached"
789
  msgstr ""
790
 
791
- #: ../common.php:876
792
  msgid "Attempt to access"
793
  msgstr ""
794
 
795
- #: ../common.php:879
796
  msgid "Limit on failed reCAPTCHA verifications is reached"
797
  msgstr ""
798
 
799
- #: ../common.php:880
800
  msgid "Bot activity is detected"
801
  msgstr ""
802
 
803
- #: ../common.php:881
804
  msgid "Multiple suspicious activities were detected"
805
  msgstr ""
806
 
807
- #: ../common.php:937
808
  #, php-format
809
  msgid "%s ago"
810
  msgstr ""
811
 
812
- #: ../common.php:1071 ../settings.php:221
813
  msgid "New version is available"
814
  msgstr ""
815
 
816
- #: ../common.php:1078
817
  #, php-format
818
  msgid "Update to version %s of WP Cerber"
819
  msgstr ""
820
 
821
- #: ../common.php:1097
822
  msgid "Not specified"
823
  msgstr ""
824
 
825
- #: ../common.php:1583
826
  msgid "Unable to create the directory"
827
  msgstr ""
828
 
829
- #: ../common.php:1588
830
  msgid "Destination folder access denied"
831
  msgstr ""
832
 
833
- #: ../common.php:1591
834
  msgid "File not found"
835
  msgstr ""
836
 
837
- #: ../common.php:1594
838
  msgid "Unable to copy the file"
839
  msgstr ""
840
 
841
- #: ../common.php:1600
842
  msgid "Unable to delete the file"
843
  msgstr ""
844
 
@@ -846,11 +855,11 @@ msgstr ""
846
  msgid "Cool!"
847
  msgstr ""
848
 
849
- #: ../cerber-lab.php:716
850
  msgid "Want to make WP Cerber even more powerful?"
851
  msgstr ""
852
 
853
- #: ../cerber-lab.php:717
854
  msgid ""
855
  "Allow WP Cerber to send locked out malicious IP addresses to Cerber Lab. "
856
  "This helps the plugin team to develop new algorithms for WP Cerber that will "
@@ -858,929 +867,979 @@ msgid ""
858
  "everyday. You can disable the sending in the plugin settings at any time."
859
  msgstr ""
860
 
861
- #: ../cerber-lab.php:718
862
  msgid "OK, nail them all"
863
  msgstr ""
864
 
865
- #: ../cerber-lab.php:719
866
  msgid "NO, maybe later"
867
  msgstr ""
868
 
869
- #: ../cerber-lab.php:720 ../settings.php:369
870
  msgid "Know more"
871
  msgstr ""
872
 
873
- #: ../cerber-load.php:358
874
  msgid "You are not allowed to log in. Ask your administrator for assistance."
875
  msgstr ""
876
 
877
- #: ../cerber-load.php:364
878
  #, php-format
879
  msgid "You have reached the login attempts limit. Please try again in %d minutes."
880
  msgstr ""
881
 
882
- #: ../cerber-load.php:383
883
  #, php-format
884
  msgid "You have only one attempt remaining."
885
  msgid_plural "You have %d attempts remaining."
886
  msgstr[0] ""
887
  msgstr[1] ""
888
 
889
- #: ../cerber-load.php:695
890
  msgid ""
891
  "Human verification failed. Please click the square box in the reCAPTCHA "
892
  "block below."
893
  msgstr ""
894
 
895
- #: ../cerber-load.php:796
896
  msgid ""
897
  "> > > Translator of WP Cerber? To get the PRO license for free, drop your "
898
  "contacts here: https://wpcerber.com/contact/"
899
  msgstr ""
900
 
901
- #: ../cerber-load.php:944
902
  #, php-format
903
  msgid ""
904
  "<strong>ERROR</strong>: The password you entered for the username %s is "
905
  "incorrect."
906
  msgstr ""
907
 
908
- #: ../cerber-load.php:1150 ../cerber-load.php:1156 ../cerber-load.php:1172 ..
909
- #: /cerber-load.php:1179
910
  msgid "You are not allowed to register."
911
  msgstr ""
912
 
913
- #: ../cerber-load.php:1166
914
  msgid "Username is not allowed. Please choose another one."
915
  msgstr ""
916
 
917
- #: ../cerber-load.php:1415
918
  msgid "Sorry, human verification failed."
919
  msgstr ""
920
 
921
- #: ../cerber-load.php:3203
922
  msgid "We're sorry, you are not allowed to proceed"
923
  msgstr ""
924
 
925
- #: ../cerber-load.php:3313
926
  msgid "WP Cerber notify"
927
  msgstr ""
928
 
929
- #: ../cerber-load.php:3335
930
  msgid "Citadel mode is activated"
931
  msgstr ""
932
 
933
- #: ../cerber-load.php:3337
934
  #, php-format
935
  msgid "Citadel mode is activated after %d failed login attempts in %d minutes."
936
  msgstr ""
937
 
938
- #: ../cerber-load.php:3338
939
  #, php-format
940
  msgid "Last failed attempt was at %s from IP %s with user login: %s."
941
  msgstr ""
942
 
943
- #: ../cerber-load.php:3339 ../cerber-load.php:3896
944
  msgid "View activity in dashboard"
945
  msgstr ""
946
 
947
- #: ../cerber-load.php:3364
948
  msgid "unspecified"
949
  msgstr ""
950
 
951
- #: ../cerber-load.php:3367
952
  msgid "Number of lockouts is increasing"
953
  msgstr ""
954
 
955
- #: ../cerber-load.php:3369
956
  msgid "Number of active lockouts"
957
  msgstr ""
958
 
959
- #: ../cerber-load.php:3370
960
  #, php-format
961
  msgid "Last lockout was added: %s for IP %s"
962
  msgstr ""
963
 
964
- #: ../cerber-load.php:3372
965
  msgid "View activity for this IP"
966
  msgstr ""
967
 
968
- #: ../cerber-load.php:3373
969
  msgid "View lockouts in dashboard"
970
  msgstr ""
971
 
972
- #: ../cerber-load.php:3376 ../cerber-load.php:3378
973
  msgid "A new version of WP Cerber is available to install"
974
  msgstr ""
975
 
976
- #: ../cerber-load.php:3377
977
  msgid "Hi!"
978
  msgstr ""
979
 
980
- #: ../cerber-load.php:3380 ../cerber-load.php:3391
981
  msgid "Website"
982
  msgstr ""
983
 
984
- #: ../cerber-load.php:3383 ../cerber-load.php:3384
985
  msgid "The WP Cerber security plugin has been deactivated"
986
  msgstr ""
987
 
988
- #: ../cerber-load.php:3386
989
  msgid "Not logged in"
990
  msgstr ""
991
 
992
- #: ../cerber-load.php:3392
993
  msgid "By user"
994
  msgstr ""
995
 
996
- #: ../cerber-load.php:3393
997
  msgid "From IP address"
998
  msgstr ""
999
 
1000
- #: ../cerber-load.php:3396
1001
  msgid "From country"
1002
  msgstr ""
1003
 
1004
- #: ../cerber-load.php:3400
1005
  msgid "The WP Cerber security plugin is now active"
1006
  msgstr ""
1007
 
1008
- #: ../cerber-load.php:3401 ../cerber-load.php:4099
1009
  msgid "WP Cerber is now active and has started protecting your site"
1010
  msgstr ""
1011
 
1012
- #: ../cerber-load.php:3409
1013
  msgid "New Custom login URL"
1014
  msgstr ""
1015
 
1016
- #: ../cerber-load.php:3413 ../cerber-load.php:3414
1017
  msgid "A new activity has been recorded"
1018
  msgstr ""
1019
 
1020
- #: ../cerber-load.php:3419
1021
  msgid "Weekly report"
1022
  msgstr ""
1023
 
1024
- #: ../cerber-load.php:3422
1025
  msgid "To change reporting settings visit"
1026
  msgstr ""
1027
 
1028
- #: ../cerber-load.php:3448
1029
  msgid "Your login page:"
1030
  msgstr ""
1031
 
1032
- #: ../cerber-load.php:3452
1033
  msgid "Your license is valid until"
1034
  msgstr ""
1035
 
1036
- #: ../cerber-load.php:3455
1037
  msgid "This message was sent by"
1038
  msgstr ""
1039
 
1040
- #: ../cerber-load.php:3476
1041
  #, php-format
1042
  msgid "Your last sign-in was %s from %s"
1043
  msgstr ""
1044
 
1045
- #: ../cerber-load.php:3551
1046
  msgid "Weekly Report"
1047
  msgstr ""
1048
 
1049
- #: ../cerber-load.php:3563
1050
  msgid "Activity details"
1051
  msgstr ""
1052
 
1053
- #: ../cerber-load.php:3577
1054
  msgid "Attempts to log in with non-existent username"
1055
  msgstr ""
1056
 
1057
- #: ../cerber-load.php:3868
1058
  msgid "User"
1059
  msgstr ""
1060
 
1061
- #: ../cerber-load.php:3876
1062
  msgid "Search string"
1063
  msgstr ""
1064
 
1065
- #: ../cerber-load.php:3897
1066
  msgid "To unsubscribe click here"
1067
  msgstr ""
1068
 
1069
- #: ../cerber-load.php:4054
1070
  #, php-format
1071
  msgid "The WP Cerber requires PHP %s or higher. You are running"
1072
  msgstr ""
1073
 
1074
- #: ../cerber-load.php:4058
1075
  #, php-format
1076
  msgid "The WP Cerber requires WordPress %s or higher. You are running"
1077
  msgstr ""
1078
 
1079
- #: ../cerber-load.php:4067
1080
  msgid "Can't activate WP Cerber due to a database error."
1081
  msgstr ""
1082
 
1083
- #: ../cerber-load.php:4100
1084
  msgid "Your IP address is added to the"
1085
  msgstr ""
1086
 
1087
- #: ../cerber-load.php:4107 ../settings.php:401
1088
  msgid "Main Settings"
1089
  msgstr ""
1090
 
1091
- #: ../cerber-load.php:4108 ../settings.php:404 ../cerber-tools.php:92 ../cerber-
1092
  #: tools.php:101 ../cerber-tools.php:182
1093
  msgid "Access Lists"
1094
  msgstr ""
1095
 
1096
- #: ../cerber-load.php:4110 ../settings.php:406
1097
  msgid "Hardening"
1098
  msgstr ""
1099
 
1100
- #: ../cerber-load.php:4111 ../settings.php:78 ../settings.php:102 ../settings.php:
1101
- #: 411
1102
  msgid "Notifications"
1103
  msgstr ""
1104
 
1105
- #: ../cerber-load.php:4112
1106
  msgid "Import settings"
1107
  msgstr ""
1108
 
1109
- #: ../settings.php:70
1110
  msgid "Plugin initialization"
1111
  msgstr ""
1112
 
1113
- #: ../settings.php:71
1114
  msgid "Load security engine"
1115
  msgstr ""
1116
 
1117
- #: ../settings.php:71
1118
  msgid "Legacy mode"
1119
  msgstr ""
1120
 
1121
- #: ../settings.php:71
1122
  msgid "Standard mode"
1123
  msgstr ""
1124
 
1125
- #: ../settings.php:73
1126
  msgid "Limit login attempts"
1127
  msgstr ""
1128
 
1129
- #: ../settings.php:74
1130
  msgid "Attempts"
1131
  msgstr ""
1132
 
1133
- #: ../settings.php:75
1134
  msgid "Lockout duration"
1135
  msgstr ""
1136
 
1137
- #: ../settings.php:75 ../settings.php:101
1138
  msgid "minutes"
1139
  msgstr ""
1140
 
1141
- #: ../settings.php:76
1142
  msgid "Aggressive lockout"
1143
  msgstr ""
1144
 
1145
- #: ../settings.php:77
 
 
 
 
1146
  msgid "Apply limit login rules to IP addresses in the White IP Access List"
1147
  msgstr ""
1148
 
1149
- #: ../settings.php:79
1150
  msgid "Site connection"
1151
  msgstr ""
1152
 
1153
- #: ../settings.php:81
1154
  msgid "Proactive security rules"
1155
  msgstr ""
1156
 
1157
- #: ../settings.php:82
1158
  msgid "Block subnet"
1159
  msgstr ""
1160
 
1161
- #: ../settings.php:82
1162
  msgid "Always block entire subnet Class C of intruders IP"
1163
  msgstr ""
1164
 
1165
- #: ../settings.php:83
1166
  msgid "Non-existent users"
1167
  msgstr ""
1168
 
1169
- #: ../settings.php:83
1170
  msgid "Immediately block IP when attempting to login with a non-existent username"
1171
  msgstr ""
1172
 
1173
- #: ../settings.php:84
1174
  msgid "Redirect dashboard requests"
1175
  msgstr ""
1176
 
1177
- #: ../settings.php:84
1178
  msgid ""
1179
  "Disable automatic redirecting to the login page when /wp-admin/ is requested "
1180
  "by an unauthorized request"
1181
  msgstr ""
1182
 
1183
- #: ../settings.php:85
1184
  msgid "Request wp-login.php"
1185
  msgstr ""
1186
 
1187
- #: ../settings.php:85
1188
  msgid "Immediately block IP after any request to wp-login.php"
1189
  msgstr ""
1190
 
1191
- #: ../settings.php:86
1192
  msgid "Display 404 page"
1193
  msgstr ""
1194
 
1195
- #: ../settings.php:86
1196
  msgid "Use 404 template from the active theme"
1197
  msgstr ""
1198
 
1199
- #: ../settings.php:86
1200
  msgid "Display simple 404 page"
1201
  msgstr ""
1202
 
1203
- #: ../settings.php:88
1204
  msgid "Custom login page"
1205
  msgstr ""
1206
 
1207
- #: ../settings.php:89
1208
  msgid "Custom login URL"
1209
  msgstr ""
1210
 
1211
- #: ../settings.php:94
1212
  msgid "Custom login URL may contain only letters, numbers, dashes and underscores"
1213
  msgstr ""
1214
 
1215
- #: ../settings.php:95
1216
  msgid "must not overlap with the existing pages or posts slug"
1217
  msgstr ""
1218
 
1219
- #: ../settings.php:97
1220
  msgid "Disable wp-login.php"
1221
  msgstr ""
1222
 
1223
- #: ../settings.php:97
1224
  msgid "Block direct access to wp-login.php and return HTTP 404 Not Found Error"
1225
  msgstr ""
1226
 
1227
- #: ../settings.php:100
1228
  msgid "Threshold"
1229
  msgstr ""
1230
 
1231
- #: ../settings.php:101
1232
  msgid "Duration"
1233
  msgstr ""
1234
 
1235
- #: ../settings.php:102
1236
  msgid "Send notification to admin email"
1237
  msgstr ""
1238
 
1239
- #: ../settings.php:102 ../settings.php:539 ../settings.php:661
1240
  msgid "Click to send test"
1241
  msgstr ""
1242
 
1243
- #: ../settings.php:105 ../settings.php:337
1244
  msgid "Keep records for"
1245
  msgstr ""
1246
 
1247
- #: ../settings.php:105 ../settings.php:179 ../settings.php:341
1248
  msgid "days"
1249
  msgstr ""
1250
 
1251
- #: ../settings.php:106
1252
  msgid "Cerber Lab connection"
1253
  msgstr ""
1254
 
1255
- #: ../settings.php:106
1256
  msgid "Send malicious IP addresses to the Cerber Lab"
1257
  msgstr ""
1258
 
1259
- #: ../settings.php:107
1260
  msgid "Cerber Lab protocol"
1261
  msgstr ""
1262
 
1263
- #: ../settings.php:108
1264
  msgid "Use file"
1265
  msgstr ""
1266
 
1267
- #: ../settings.php:108
1268
  msgid "Write failed login attempts to the file"
1269
  msgstr ""
1270
 
1271
- #: ../settings.php:110
1272
  msgid "Preferences"
1273
  msgstr ""
1274
 
1275
- #: ../settings.php:111
1276
  msgid "Drill down IP"
1277
  msgstr ""
1278
 
1279
- #: ../settings.php:111
1280
  msgid "Retrieve extra WHOIS information for IP"
1281
  msgstr ""
1282
 
1283
- #: ../settings.php:112
1284
  msgid "Date format"
1285
  msgstr ""
1286
 
1287
- #: ../settings.php:112
1288
  #, php-format
1289
  msgid "if empty, the default format %s will be used"
1290
  msgstr ""
1291
 
1292
- #: ../settings.php:119
1293
  msgid "Hardening WordPress"
1294
  msgstr ""
1295
 
1296
- #: ../settings.php:120
1297
  msgid "Stop user enumeration"
1298
  msgstr ""
1299
 
1300
- #: ../settings.php:120
1301
  msgid "Block access to user pages like /?author=n and user data via REST API"
1302
  msgstr ""
1303
 
1304
- #: ../settings.php:121
1305
  msgid "Protect admin scripts"
1306
  msgstr ""
1307
 
1308
- #: ../settings.php:121
1309
  msgid "Block unauthorized access to load-scripts.php and load-styles.php"
1310
  msgstr ""
1311
 
1312
- #: ../settings.php:122
1313
  msgid "Disable XML-RPC"
1314
  msgstr ""
1315
 
1316
- #: ../settings.php:122
1317
  msgid "Block access to the XML-RPC server (including Pingbacks and Trackbacks)"
1318
  msgstr ""
1319
 
1320
- #: ../settings.php:123
1321
  msgid "Disable feeds"
1322
  msgstr ""
1323
 
1324
- #: ../settings.php:123
1325
  msgid "Block access to the RSS, Atom and RDF feeds"
1326
  msgstr ""
1327
 
1328
- #: ../settings.php:124
1329
  msgid "Disable REST API"
1330
  msgstr ""
1331
 
1332
- #: ../settings.php:124
1333
  msgid "Block access to the WordPress REST API except the following"
1334
  msgstr ""
1335
 
1336
- #: ../settings.php:125
1337
  msgid "Allow REST API for logged in users"
1338
  msgstr ""
1339
 
1340
- #: ../settings.php:132
1341
  msgid ""
1342
  "Specify REST API namespaces to be allowed if REST API is disabled. One "
1343
  "string per line."
1344
  msgstr ""
1345
 
1346
- #: ../settings.php:142
1347
  msgid "User related settings"
1348
  msgstr ""
1349
 
1350
- #: ../settings.php:143
1351
  msgid "Registration limit"
1352
  msgstr ""
1353
 
1354
- #: ../settings.php:144
1355
  msgid "Prohibited usernames"
1356
  msgstr ""
1357
 
1358
- #: ../settings.php:150
1359
  msgid ""
1360
  "Usernames from this list are not allowed to log in or register. Any IP "
1361
  "address, have tried to use any of these usernames, will be immediately "
1362
  "blocked. Use comma to separate logins."
1363
  msgstr ""
1364
 
1365
- #: ../settings.php:150
1366
  msgid "To specify a REGEX pattern wrap a pattern in two forward slashes."
1367
  msgstr ""
1368
 
1369
- #: ../settings.php:152
1370
  msgid "User session expire"
1371
  msgstr ""
1372
 
1373
- #: ../settings.php:152
1374
  msgid "in minutes (leave empty to use default WP value)"
1375
  msgstr ""
1376
 
1377
- #: ../settings.php:153
1378
  msgid "Sort users in dashboard"
1379
  msgstr ""
1380
 
1381
- #: ../settings.php:153
1382
  msgid "by date of registration"
1383
  msgstr ""
1384
 
1385
- #: ../settings.php:160
1386
  msgid "Cerber antispam engine"
1387
  msgstr ""
1388
 
1389
- #: ../settings.php:161
1390
  msgid "Comment form"
1391
  msgstr ""
1392
 
1393
- #: ../settings.php:161
1394
  msgid "Protect comment form with bot detection engine"
1395
  msgstr ""
1396
 
1397
- #: ../settings.php:162 ../settings.php:187
1398
  msgid "Registration form"
1399
  msgstr ""
1400
 
1401
- #: ../settings.php:162
1402
  msgid "Protect registration form with bot detection engine"
1403
  msgstr ""
1404
 
1405
- #: ../settings.php:163
1406
  msgid "Other forms"
1407
  msgstr ""
1408
 
1409
- #: ../settings.php:163
1410
  msgid "Protect all forms on the website with bot detection engine"
1411
  msgstr ""
1412
 
1413
- #: ../settings.php:165
1414
  msgid "Adjust antispam engine"
1415
  msgstr ""
1416
 
1417
- #: ../settings.php:166
1418
  msgid "Safe mode"
1419
  msgstr ""
1420
 
1421
- #: ../settings.php:166
1422
  msgid "Use less restrictive policies (allow AJAX)"
1423
  msgstr ""
1424
 
1425
- #: ../settings.php:167
1426
  msgid "Disable bot detection engine for logged in users"
1427
  msgstr ""
1428
 
1429
- #: ../settings.php:168
1430
  msgid "Query whitelist"
1431
  msgstr ""
1432
 
1433
- #: ../settings.php:174
1434
  msgid ""
1435
  "Enter a part of query string or query path to exclude a request from "
1436
  "inspection by the engine. One item per line."
1437
  msgstr ""
1438
 
1439
- #: ../settings.php:174 ../settings.php:273
1440
  msgid "To specify a REGEX pattern, enclose a whole line in two braces."
1441
  msgstr ""
1442
 
1443
- #: ../settings.php:177
1444
  msgid "Comment processing"
1445
  msgstr ""
1446
 
1447
- #: ../settings.php:178
1448
  msgid "If a spam comment detected"
1449
  msgstr ""
1450
 
1451
- #: ../settings.php:178
1452
  msgid "Deny it completely"
1453
  msgstr ""
1454
 
1455
- #: ../settings.php:178
1456
  msgid "Mark it as spam"
1457
  msgstr ""
1458
 
1459
- #: ../settings.php:179
1460
  msgid "Trash spam comments"
1461
  msgstr ""
1462
 
1463
- #: ../settings.php:179
1464
  msgid "Move spam comments to trash after"
1465
  msgstr ""
1466
 
1467
- #: ../settings.php:182
1468
  msgid "reCAPTCHA settings"
1469
  msgstr ""
1470
 
1471
- #: ../settings.php:183
1472
  msgid "Site key"
1473
  msgstr ""
1474
 
1475
- #: ../settings.php:184
1476
  msgid "Secret key"
1477
  msgstr ""
1478
 
1479
- #: ../settings.php:185
1480
  msgid "Invisible reCAPTCHA"
1481
  msgstr ""
1482
 
1483
- #: ../settings.php:185
1484
  msgid "Enable invisible reCAPTCHA"
1485
  msgstr ""
1486
 
1487
- #: ../settings.php:185
1488
  msgid ""
1489
  "(do not enable it unless you get and enter the Site and Secret keys for the "
1490
  "invisible version)"
1491
  msgstr ""
1492
 
1493
- #: ../settings.php:187
1494
  msgid "Enable reCAPTCHA for WordPress registration form"
1495
  msgstr ""
1496
 
1497
- #: ../settings.php:188
1498
  msgid "Enable reCAPTCHA for WooCommerce registration form"
1499
  msgstr ""
1500
 
1501
- #: ../settings.php:190
1502
  msgid "Lost password form"
1503
  msgstr ""
1504
 
1505
- #: ../settings.php:190
1506
  msgid "Enable reCAPTCHA for WordPress lost password form"
1507
  msgstr ""
1508
 
1509
- #: ../settings.php:191
1510
  msgid "Enable reCAPTCHA for WooCommerce lost password form"
1511
  msgstr ""
1512
 
1513
- #: ../settings.php:193
1514
  msgid "Login form"
1515
  msgstr ""
1516
 
1517
- #: ../settings.php:193
1518
  msgid "Enable reCAPTCHA for WordPress login form"
1519
  msgstr ""
1520
 
1521
- #: ../settings.php:194
1522
  msgid "Enable reCAPTCHA for WooCommerce login form"
1523
  msgstr ""
1524
 
1525
- #: ../settings.php:196
1526
  msgid "Enable reCAPTCHA for WordPress comment form"
1527
  msgstr ""
1528
 
1529
- #: ../settings.php:197
1530
  msgid "Disable reCAPTCHA for logged in users"
1531
  msgstr ""
1532
 
1533
- #: ../settings.php:199
1534
  msgid "Limit attempts"
1535
  msgstr ""
1536
 
1537
- #: ../settings.php:199
1538
  #, php-format
1539
  msgid "Lock out IP address for %s minutes after %s failed attempts within %s minutes"
1540
  msgstr ""
1541
 
1542
- #: ../settings.php:205
1543
  msgid "Email notifications"
1544
  msgstr ""
1545
 
1546
- #: ../settings.php:208 ../settings.php:243
1547
  msgid "Email Address"
1548
  msgstr ""
1549
 
1550
- #: ../settings.php:212 ../settings.php:248 ../settings.php:305
1551
  msgid "Use comma to specify multiple values"
1552
  msgstr ""
1553
 
1554
- #: ../settings.php:217
1555
  #, php-format
1556
  msgid "if empty, the admin email %s will be used"
1557
  msgstr ""
1558
 
1559
- #: ../settings.php:220
1560
  msgid "Notification limit"
1561
  msgstr ""
1562
 
1563
- #: ../settings.php:220
1564
  msgid "notification letters allowed per hour (0 means unlimited)"
1565
  msgstr ""
1566
 
1567
- #: ../settings.php:226
1568
  msgid "Push notifications"
1569
  msgstr ""
1570
 
1571
- #: ../settings.php:233
1572
  msgid "All connected devices"
1573
  msgstr ""
1574
 
1575
- #: ../settings.php:234
1576
  msgid "No devices found"
1577
  msgstr ""
1578
 
1579
- #: ../settings.php:236
1580
  msgid "Not available"
1581
  msgstr ""
1582
 
1583
- #: ../settings.php:240
1584
  msgid "Weekly reports"
1585
  msgstr ""
1586
 
1587
- #: ../settings.php:241
1588
  msgid "Enable reporting"
1589
  msgstr ""
1590
 
1591
- #: ../settings.php:253
1592
  msgid "if empty, email from notification settings will be used"
1593
  msgstr ""
1594
 
1595
- #: ../settings.php:261
1596
  msgid "Inspection"
1597
  msgstr ""
1598
 
1599
- #: ../settings.php:262
1600
  msgid "Enable traffic inspection"
1601
  msgstr ""
1602
 
1603
- #: ../settings.php:267
1604
  msgid "Request whitelist"
1605
  msgstr ""
1606
 
1607
- #: ../settings.php:273
1608
  msgid ""
1609
  "Enter a request URI to exclude the request from inspection. One item per "
1610
  "line."
1611
  msgstr ""
1612
 
1613
- #: ../settings.php:276
1614
  msgid "Logging"
1615
  msgstr ""
1616
 
1617
- #: ../settings.php:277
1618
  msgid "Logging mode"
1619
  msgstr ""
1620
 
1621
- #: ../settings.php:283
1622
  msgid "Logging disabled"
1623
  msgstr ""
1624
 
1625
- #: ../settings.php:284
1626
  msgid "Smart"
1627
  msgstr ""
1628
 
1629
- #: ../settings.php:285
1630
  msgid "All traffic"
1631
  msgstr ""
1632
 
1633
- #: ../settings.php:289
1634
  msgid "Ignore crawlers"
1635
  msgstr ""
1636
 
1637
- #: ../settings.php:294
1638
  msgid "Save request fields"
1639
  msgstr ""
1640
 
1641
- #: ../settings.php:299
1642
  msgid "Mask these form fields"
1643
  msgstr ""
1644
 
1645
- #: ../settings.php:310
1646
  msgid "Save request headers"
1647
  msgstr ""
1648
 
1649
- #: ../settings.php:316
1650
  msgid "Save $_SERVER"
1651
  msgstr ""
1652
 
1653
- #: ../settings.php:322
1654
  msgid "Save request cookies"
1655
  msgstr ""
1656
 
1657
- #: ../settings.php:329
1658
  msgid "Page generation time threshold"
1659
  msgstr ""
1660
 
1661
- #: ../settings.php:334
1662
  msgid "milliseconds"
1663
  msgstr ""
1664
 
1665
- #: ../settings.php:351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1666
  msgid "Make your protection smarter!"
1667
  msgstr ""
1668
 
1669
- #: ../settings.php:355
1670
  msgid ""
1671
  "Please enable Permalinks to use this feature. Set Permalink Settings to "
1672
  "something other than Default."
1673
  msgstr ""
1674
 
1675
- #: ../settings.php:358
1676
  msgid "Be careful about enabling these options."
1677
  msgstr ""
1678
 
1679
- #: ../settings.php:358
1680
  msgid "If you forget your Custom login URL, you will be unable to log in."
1681
  msgstr ""
1682
 
1683
- #: ../settings.php:362
1684
  msgid ""
1685
  "In the Citadel mode nobody is able to log in except IPs from the White IP "
1686
  "Access List. Active user sessions will not be affected."
1687
  msgstr ""
1688
 
1689
- #: ../settings.php:365
1690
  msgid "These settings do not affect hosts from the "
1691
  msgstr ""
1692
 
1693
- #: ../settings.php:368
1694
  msgid ""
1695
  "Before you can start using reCAPTCHA, you have to obtain Site key and Secret "
1696
  "key on the Google website"
1697
  msgstr ""
1698
 
1699
- #: ../settings.php:399
1700
  msgid "Lockouts"
1701
  msgstr ""
1702
 
1703
- #: ../settings.php:408
1704
  msgid "Users"
1705
  msgstr ""
1706
 
1707
- #: ../settings.php:520 ../settings.php:642
1708
  #, php-format
1709
  msgid "%s allowed retries in %s minutes"
1710
  msgstr ""
1711
 
1712
- #: ../settings.php:525 ../settings.php:647
1713
  #, php-format
1714
  msgid "%s allowed registrations in %s minutes from one IP"
1715
  msgstr ""
1716
 
1717
- #: ../settings.php:530 ../settings.php:652
1718
  #, php-format
1719
  msgid "Increase lockout duration to %s hours after %s lockouts in the last %s hours"
1720
  msgstr ""
1721
 
1722
- #: ../settings.php:537 ../settings.php:659
1723
  msgid "Notify admin if the number of active lockouts above"
1724
  msgstr ""
1725
 
1726
- #: ../settings.php:542 ../settings.php:664
1727
  #, php-format
1728
  msgid "Enable after %s failed login attempts in last %s minutes"
1729
  msgstr ""
1730
 
1731
- #: ../settings.php:750
1732
  msgid "Sunday"
1733
  msgstr ""
1734
 
1735
- #: ../settings.php:751
1736
  msgid "Monday"
1737
  msgstr ""
1738
 
1739
- #: ../settings.php:752
1740
  msgid "Tuesday"
1741
  msgstr ""
1742
 
1743
- #: ../settings.php:753
1744
  msgid "Wednesday"
1745
  msgstr ""
1746
 
1747
- #: ../settings.php:754
1748
  msgid "Thursday"
1749
  msgstr ""
1750
 
1751
- #: ../settings.php:755
1752
  msgid "Friday"
1753
  msgstr ""
1754
 
1755
- #: ../settings.php:756
1756
  msgid "Saturday"
1757
  msgstr ""
1758
 
1759
  #. translators: preposition of time
1760
- #: ../settings.php:766
1761
  msgctxt "preposition of time"
1762
  msgid "at"
1763
  msgstr ""
1764
 
1765
- #: ../settings.php:782
1766
  msgid "Click to send now"
1767
  msgstr ""
1768
 
1769
- #: ../settings.php:794
1770
  msgid "Plugin initialization mode has not been changed"
1771
  msgstr ""
1772
 
1773
- #: ../settings.php:814 ../settings.php:815
1774
  msgid "Attention! You have changed the login URL! The new login URL is"
1775
  msgstr ""
1776
 
1777
- #: ../settings.php:816 ../settings.php:817
1778
  msgid ""
1779
  "If you use a caching plugin, you have to add your new login URL to the list "
1780
  "of pages not to cache."
1781
  msgstr ""
1782
 
1783
- #: ../settings.php:895 ../settings.php:907
1784
  msgid "<strong>ERROR</strong>: please enter a valid email address."
1785
  msgstr ""
1786
 
@@ -1861,6 +1920,106 @@ msgstr ""
1861
  msgid "Antispam and bot detection settings"
1862
  msgstr ""
1863
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1864
  #. Description of the plugin
1865
  msgid ""
1866
  "This is a standard boot module for WP Cerber Security & Antispam plugin. It "
5
  "Project-Id-Version: WP Cerber\n"
6
  "Report-Msgid-Bugs-To: \n"
7
  "POT-Creation-Date: Tue Sep 08 2015 21:38:11 GMT+0300\n"
8
+ "POT-Revision-Date: Wed Jun 13 2018 12:10:43 GMT+0300\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
24
  "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
25
  "X-Generator: Loco - https://localise.biz/"
26
 
27
+ #: ../dashboard.php:52 ../settings.php:446
28
  msgid "WP Cerber Security"
29
  msgstr ""
30
 
31
  #. Name of the plugin
32
+ #: ../dashboard.php:52 ../dashboard.php:80
33
  msgid "WP Cerber"
34
  msgstr ""
35
 
37
  msgid "Cerber Dashboard"
38
  msgstr ""
39
 
40
+ #: ../dashboard.php:54 ../dashboard.php:1252 ../dashboard.php:1893 ../settings.
41
+ #: php:451
42
  msgid "Dashboard"
43
  msgstr ""
44
 
46
  msgid "Cerber Traffic Inspector"
47
  msgstr ""
48
 
49
+ #: ../dashboard.php:56 ../dashboard.php:1238 ../dashboard.php:2639
50
  msgid "Traffic Inspector"
51
  msgstr ""
52
 
54
  msgid "Cerber Security Rules"
55
  msgstr ""
56
 
57
+ #: ../dashboard.php:60 ../dashboard.php:2299
58
  msgid "Security Rules"
59
  msgstr ""
60
 
61
+ #: ../dashboard.php:64 ../cerber-scanner.php:67
62
+ msgid "Site Integrity"
63
+ msgstr ""
64
+
65
+ #: ../dashboard.php:67
66
  msgid "Cerber antispam settings"
67
  msgstr ""
68
 
69
+ #: ../dashboard.php:67 ../dashboard.php:1255 ../cerber-load.php:4153 ../settings.
70
+ #: php:197
71
  msgid "Antispam"
72
  msgstr ""
73
 
74
+ #: ../dashboard.php:68
75
  msgid "Cerber tools"
76
  msgstr ""
77
 
78
+ #: ../dashboard.php:68 ../cerber-tools.php:43
79
  msgid "Tools"
80
  msgstr ""
81
 
82
+ #: ../dashboard.php:126 ../dashboard.php:199
83
  msgid "Remove"
84
  msgstr ""
85
 
86
+ #: ../dashboard.php:133 ../dashboard.php:699 ../dashboard.php:2969 ../cerber-load.
87
+ #: php:3909
88
  msgid "IP"
89
  msgstr ""
90
 
91
+ #: ../dashboard.php:134 ../dashboard.php:700
92
  msgid "Hostname"
93
  msgstr ""
94
 
95
+ #: ../dashboard.php:135 ../dashboard.php:701
96
  msgid "Country"
97
  msgstr ""
98
 
99
+ #: ../dashboard.php:136
100
  msgid "Expires"
101
  msgstr ""
102
 
103
+ #: ../dashboard.php:137 ../cerber-load.php:3394
104
  msgid "Reason"
105
  msgstr ""
106
 
107
+ #: ../dashboard.php:138
108
  msgid "Action"
109
  msgstr ""
110
 
111
+ #: ../dashboard.php:152
112
  #, php-format
113
  msgid "Showing last %d records from %d"
114
  msgstr ""
115
 
116
+ #: ../dashboard.php:154
117
  msgid "Hint"
118
  msgstr ""
119
 
120
+ #: ../dashboard.php:154
121
  msgid "To view activity, click on the IP"
122
  msgstr ""
123
 
124
+ #: ../dashboard.php:158
125
  msgid "No lockouts at the moment. The sky is clear."
126
  msgstr ""
127
 
128
+ #: ../dashboard.php:171 ../dashboard.php:674 ../dashboard.php:877 ../dashboard.
129
+ #: php:1233 ../dashboard.php:2794 ../cerber-load.php:4144 ../settings.php:423
 
130
  msgid "White IP Access List"
131
  msgstr ""
132
 
133
+ #: ../dashboard.php:171
134
  msgid "These IPs will never be locked out"
135
  msgstr ""
136
 
137
+ #: ../dashboard.php:173 ../dashboard.php:675 ../dashboard.php:880 ../dashboard.
138
+ #: php:1234 ../dashboard.php:2795
139
  msgid "Black IP Access List"
140
  msgstr ""
141
 
142
+ #: ../dashboard.php:173
143
  msgid "Nobody can log in or register from these IPs"
144
  msgstr ""
145
 
146
+ #: ../dashboard.php:180
147
  msgid "Your IP"
148
  msgstr ""
149
 
150
+ #: ../dashboard.php:198 ../dashboard.php:890 ../dashboard.php:921 ../dashboard.
151
+ #: php:1019
152
  msgid "Check for activity"
153
  msgstr ""
154
 
155
+ #: ../dashboard.php:205
156
  msgid "List is empty"
157
  msgstr ""
158
 
159
+ #: ../dashboard.php:209
160
  msgid "IP address, IPv4 address range or subnet"
161
  msgstr ""
162
 
163
+ #: ../dashboard.php:210
164
  msgid "Add IP to the list"
165
  msgstr ""
166
 
167
+ #: ../dashboard.php:211
168
  msgid "Optional comment for this entry"
169
  msgstr ""
170
 
171
+ #: ../dashboard.php:236 ../dashboard.php:248
172
  msgid "Incorrect IP address or IP range"
173
  msgstr ""
174
 
175
+ #: ../dashboard.php:242
176
  #, php-format
177
  msgid "Address %s was added to White IP Access List"
178
  msgstr ""
179
 
180
+ #: ../dashboard.php:252
181
  msgid "You cannot add your IP address or network"
182
  msgstr ""
183
 
184
+ #: ../dashboard.php:256
185
  #, php-format
186
  msgid "Address %s was added to Black IP Access List"
187
  msgstr ""
188
 
189
+ #: ../dashboard.php:353 ../dashboard.php:2724 ../whois.php:223 ../whois.php:254 ..
190
+ #: /common.php:881 ../common.php:1160
191
  msgid "Unknown"
192
  msgstr ""
193
 
194
+ #: ../dashboard.php:395
195
  msgid "unknown"
196
  msgstr ""
197
 
198
+ #: ../dashboard.php:420
199
  msgid "Email has been sent to"
200
  msgstr ""
201
 
202
+ #: ../dashboard.php:423
203
  msgid "Unable to send email to"
204
  msgstr ""
205
 
206
+ #: ../dashboard.php:429
207
  #, php-format
208
  msgid "Lockout for %s was removed"
209
  msgstr ""
210
 
211
+ #: ../dashboard.php:445 ../dashboard.php:1717
212
  msgid "Settings saved"
213
  msgstr ""
214
 
215
+ #: ../dashboard.php:538
216
  msgid "IP address"
217
  msgstr ""
218
 
219
+ #: ../dashboard.php:538 ../dashboard.php:702 ../dashboard.php:2967
220
  msgid "Date"
221
  msgstr ""
222
 
223
+ #: ../dashboard.php:538 ../dashboard.php:703
224
  msgid "Event"
225
  msgstr ""
226
 
227
+ #: ../dashboard.php:538 ../dashboard.php:704 ../dashboard.php:2972
228
  msgid "Local User"
229
  msgstr ""
230
 
231
+ #: ../dashboard.php:538
232
  msgid "User login"
233
  msgstr ""
234
 
235
+ #: ../dashboard.php:538
236
  msgid "User ID"
237
  msgstr ""
238
 
239
+ #: ../dashboard.php:538 ../dashboard.php:705 ../cerber-load.php:3917
240
  msgid "Username used"
241
  msgstr ""
242
 
243
+ #: ../dashboard.php:679 ../dashboard.php:883 ../dashboard.php:2799 ../common.php:
244
+ #: 852
245
  msgid "Locked out"
246
  msgstr ""
247
 
248
+ #: ../dashboard.php:723
249
  msgid "Export"
250
  msgstr ""
251
 
252
+ #: ../dashboard.php:727
253
  msgid "No activity has been logged."
254
  msgstr ""
255
 
256
+ #: ../dashboard.php:733
257
  msgid "All events"
258
  msgstr ""
259
 
260
+ #: ../dashboard.php:742
261
  msgid "Search for IP or username"
262
  msgstr ""
263
 
264
+ #: ../dashboard.php:742
265
  msgid "Filter"
266
  msgstr ""
267
 
268
+ #: ../dashboard.php:917
269
  msgid "Abuse email:"
270
  msgstr ""
271
 
272
+ #: ../dashboard.php:921
273
  msgid "Network:"
274
  msgstr ""
275
 
276
+ #: ../dashboard.php:935
277
  msgid "Add network to the Black List"
278
  msgstr ""
279
 
280
+ #: ../dashboard.php:940
281
  msgid "Add IP to the Black List"
282
  msgstr ""
283
 
284
+ #: ../dashboard.php:1003
285
  msgid "Last seen"
286
  msgstr ""
287
 
288
+ #: ../dashboard.php:1013 ../dashboard.php:1098
289
  msgid "Registered"
290
  msgstr ""
291
 
292
+ #: ../dashboard.php:1095
293
  msgid "Comments"
294
  msgstr ""
295
 
296
+ #: ../dashboard.php:1096
297
  msgid "Last login"
298
  msgstr ""
299
 
300
+ #: ../dashboard.php:1097
301
  msgid "Failed login attempts"
302
  msgstr ""
303
 
304
+ #: ../dashboard.php:1129 ../dashboard.php:1216
305
  msgid "Never"
306
  msgstr ""
307
 
308
+ #: ../dashboard.php:1168
309
  msgid "You"
310
  msgstr ""
311
 
312
+ #: ../dashboard.php:1186
313
  msgid "Cerber Quick View"
314
  msgstr ""
315
 
316
+ #: ../dashboard.php:1220 ../dashboard.php:1241
317
  msgid "active"
318
  msgstr ""
319
 
320
+ #: ../dashboard.php:1220
321
  msgid "deactivate"
322
  msgstr ""
323
 
324
+ #: ../dashboard.php:1222
325
  msgid "not active"
326
  msgstr ""
327
 
328
+ #: ../dashboard.php:1223 ../dashboard.php:1237
329
  msgid "disabled"
330
  msgstr ""
331
 
332
+ #: ../dashboard.php:1228
333
  msgid "failed attempts"
334
  msgstr ""
335
 
336
+ #: ../dashboard.php:1228 ../dashboard.php:1229
337
  msgid "in 24 hours"
338
  msgstr ""
339
 
340
+ #: ../dashboard.php:1228 ../dashboard.php:1229
341
  msgid "view all"
342
  msgstr ""
343
 
344
+ #: ../dashboard.php:1229
345
  msgid "lockouts"
346
  msgstr ""
347
 
348
+ #: ../dashboard.php:1231
349
  msgid "Lockouts at the moment"
350
  msgstr ""
351
 
352
+ #: ../dashboard.php:1232
353
  msgid "Last lockout"
354
  msgstr ""
355
 
356
+ #: ../dashboard.php:1233 ../dashboard.php:1234 ../dashboard.php:1873
357
  msgid "entry"
358
  msgid_plural "entries"
359
  msgstr[0] ""
360
  msgstr[1] ""
361
 
362
+ #: ../dashboard.php:1235 ../settings.php:100
363
  msgid "Citadel mode"
364
  msgstr ""
365
 
366
+ #: ../dashboard.php:1237
367
  msgid "enabled"
368
  msgstr ""
369
 
370
+ #: ../dashboard.php:1241
371
  msgid "no connection"
372
  msgstr ""
373
 
374
+ #: ../dashboard.php:1253 ../dashboard.php:1544 ../cerber-load.php:3900 ..
375
+ #: /settings.php:105 ../settings.php:453
376
  msgid "Activity"
377
  msgstr ""
378
 
379
+ #: ../dashboard.php:1254
380
  msgid "Traffic"
381
  msgstr ""
382
 
383
+ #: ../dashboard.php:1384 ../settings.php:80
384
  msgid "My site is behind a reverse proxy"
385
  msgstr ""
386
 
387
+ #: ../dashboard.php:1523
388
  msgid "in the last 24 hours"
389
  msgstr ""
390
 
391
+ #: ../dashboard.php:1529 ../dashboard.php:1559
392
  msgid "View all"
393
  msgstr ""
394
 
395
+ #: ../dashboard.php:1537 ../common.php:804
396
  msgid "User registered"
397
  msgstr ""
398
 
399
+ #: ../dashboard.php:1538
400
  msgid "All suspicious activity"
401
  msgstr ""
402
 
403
+ #: ../dashboard.php:1560
404
  msgid "Recently locked out IP addresses"
405
  msgstr ""
406
 
407
+ #: ../dashboard.php:1585
408
  msgid "Confused about some settings?"
409
  msgstr ""
410
 
411
+ #: ../dashboard.php:1586
412
  msgid "You can easily load default recommended settings using button below"
413
  msgstr ""
414
 
415
+ #: ../dashboard.php:1588
416
  msgid "Load default settings"
417
  msgstr ""
418
 
419
+ #: ../dashboard.php:1590
420
  msgid "Are you sure?"
421
  msgstr ""
422
 
423
+ #: ../dashboard.php:1596
424
  msgid "doesn't affect Custom login URL and Access Lists"
425
  msgstr ""
426
 
427
+ #: ../dashboard.php:1597 ../cerber-load.php:3426 ../cerber-load.php:4146
428
  msgid "Getting Started Guide"
429
  msgstr ""
430
 
431
+ #: ../dashboard.php:1700
432
  msgid "Attention! Citadel mode is now active. Nobody is able to log in."
433
  msgstr ""
434
 
435
+ #: ../dashboard.php:1701
436
  msgid "Deactivate"
437
  msgstr ""
438
 
439
+ #: ../dashboard.php:1702 ../dashboard.php:2170
440
  msgid "View Activity"
441
  msgstr ""
442
 
443
+ #: ../dashboard.php:1803
444
  msgid "Subscribe"
445
  msgstr ""
446
 
447
+ #: ../dashboard.php:1804 ../cerber-tools.php:273
448
  msgid "Unsubscribe"
449
  msgstr ""
450
 
451
+ #: ../dashboard.php:1832
452
  msgid "You've subscribed"
453
  msgstr ""
454
 
455
+ #: ../dashboard.php:1835
456
  msgid "You've unsubscribed"
457
  msgstr ""
458
 
459
+ #: ../dashboard.php:1894
460
  msgid "Main settings"
461
  msgstr ""
462
 
463
+ #: ../dashboard.php:2304
464
  msgid "Countries"
465
  msgstr ""
466
 
467
+ #: ../dashboard.php:2367
468
  #, php-format
469
  msgid "Permitted for one country"
470
  msgid_plural "Permitted for %d countries"
471
  msgstr[0] ""
472
  msgstr[1] ""
473
 
474
+ #: ../dashboard.php:2370
475
  #, php-format
476
  msgid "Not permitted for one country"
477
  msgid_plural "Not permitted for %d countries"
478
  msgstr[0] ""
479
  msgstr[1] ""
480
 
481
+ #: ../dashboard.php:2378
482
  msgid "No rule"
483
  msgstr ""
484
 
485
+ #: ../dashboard.php:2434
486
  msgid "Start typing here to find a country"
487
  msgstr ""
488
 
489
+ #: ../dashboard.php:2517
490
  msgid "Click on a country name to add it to the list of selected countries"
491
  msgstr ""
492
 
493
+ #: ../dashboard.php:2521
494
  #, php-format
495
  msgctxt "to is a marker of infinitive, e.g. \"to use it\""
496
  msgid "Selected countries are permitted to %s, other countries are not permitted to"
497
  msgstr ""
498
 
499
+ #: ../dashboard.php:2524
500
  #, php-format
501
  msgctxt "to is a marker of infinitive, e.g. \"to use it\""
502
  msgid "Selected countries are not permitted to %s, other countries are permitted to"
503
  msgstr ""
504
 
505
+ #: ../dashboard.php:2541
506
  msgid "Submit forms"
507
  msgstr ""
508
 
509
+ #: ../dashboard.php:2542
510
  msgid "Post comments"
511
  msgstr ""
512
 
513
+ #: ../dashboard.php:2543
514
  msgid "Log in to the website"
515
  msgstr ""
516
 
517
+ #: ../dashboard.php:2544
518
  msgid "Register on the website"
519
  msgstr ""
520
 
521
+ #: ../dashboard.php:2545
522
  msgid "Use XML-RPC"
523
  msgstr ""
524
 
525
+ #: ../dashboard.php:2546
526
  msgid "Use REST API"
527
  msgstr ""
528
 
529
+ #: ../dashboard.php:2590
530
  msgid "Security rules have been updated"
531
  msgstr ""
532
 
533
+ #: ../dashboard.php:2644
534
  msgid "Live traffic"
535
  msgstr ""
536
 
537
+ #: ../dashboard.php:2645 ../cerber-tools.php:91 ../cerber-tools.php:100 ../cerber-
538
+ #: scanner.php:73
539
  msgid "Settings"
540
  msgstr ""
541
 
542
+ #: ../dashboard.php:2646 ../settings.php:471 ../cerber-tools.php:51 ../cerber-
543
+ #: scanner.php:74
544
  msgid "Help"
545
  msgstr ""
546
 
547
+ #: ../dashboard.php:2968
548
  msgid "Request"
549
  msgstr ""
550
 
551
+ #: ../dashboard.php:2970
552
  msgid "Host Info"
553
  msgstr ""
554
 
555
+ #: ../dashboard.php:2971
556
  msgid "User Agent"
557
  msgstr ""
558
 
559
+ #: ../dashboard.php:2988
560
  msgid "No requests have been logged."
561
  msgstr ""
562
 
563
+ #: ../dashboard.php:2996
564
  msgid "All requests"
565
  msgstr ""
566
 
567
+ #: ../dashboard.php:2997 ../settings.php:168
568
  msgid "Logged in users"
569
  msgstr ""
570
 
571
+ #: ../dashboard.php:2998
572
  msgid "Not logged in visitors"
573
  msgstr ""
574
 
575
+ #: ../dashboard.php:2999
576
  msgid "Form submissions"
577
  msgstr ""
578
 
579
+ #: ../dashboard.php:3000
580
  msgid "Page Not Found"
581
  msgstr ""
582
 
583
+ #: ../dashboard.php:3001
584
  msgid "REST API"
585
  msgstr ""
586
 
587
+ #: ../dashboard.php:3002
588
  msgid "XML-RPC"
589
  msgstr ""
590
 
591
+ #: ../dashboard.php:3006
592
  msgid "Longer than"
593
  msgstr ""
594
 
595
+ #: ../dashboard.php:3019
596
  msgid "Refresh"
597
  msgstr ""
598
 
599
+ #: ../dashboard.php:3239
600
  msgid "Any"
601
  msgstr ""
602
 
603
+ #: ../dashboard.php:3281
604
  msgid "Advanced search"
605
  msgstr ""
606
 
624
  msgid "Gregory"
625
  msgstr ""
626
 
627
+ #: ../common.php:112
628
  msgid "Check for requests"
629
  msgstr ""
630
 
631
+ #: ../common.php:146
632
  msgid "Malicious activities mitigated"
633
  msgstr ""
634
 
635
+ #: ../common.php:149
636
  msgid "Spam comments denied"
637
  msgstr ""
638
 
639
+ #: ../common.php:150
640
  msgid "Spam form submissions denied"
641
  msgstr ""
642
 
643
+ #: ../common.php:151
644
  msgid "Malicious IP addresses detected"
645
  msgstr ""
646
 
647
+ #: ../common.php:152
648
  msgid "Lockouts occurred"
649
  msgstr ""
650
 
651
+ #: ../common.php:206 ../common.php:263 ../common.php:268 ../common.php:273 ..
652
+ #: /cerber-load.php:668 ../cerber-load.php:680 ../cerber-load.php:687 ../cerber-
653
+ #: load.php:934 ../cerber-load.php:1153 ../cerber-load.php:1159 ../cerber-load.
654
+ #: php:1164 ../cerber-load.php:1169 ../cerber-load.php:1175 ../cerber-load.php:
655
+ #: 1182 ../cerber-load.php:1283 ../cerber-load.php:1420 ../settings.php:851 ..
656
+ #: /settings.php:922
657
  msgid "ERROR:"
658
  msgstr ""
659
 
660
+ #: ../common.php:803
661
  msgid "User created"
662
  msgstr ""
663
 
664
+ #: ../common.php:805
665
  msgid "Logged in"
666
  msgstr ""
667
 
668
+ #: ../common.php:806
669
  msgid "Logged out"
670
  msgstr ""
671
 
672
+ #: ../common.php:807
673
  msgid "Login failed"
674
  msgstr ""
675
 
676
+ #: ../common.php:810
677
  msgid "IP blocked"
678
  msgstr ""
679
 
680
+ #: ../common.php:811
681
  msgid "Subnet blocked"
682
  msgstr ""
683
 
684
+ #: ../common.php:813
685
  msgid "Citadel activated!"
686
  msgstr ""
687
 
688
+ #: ../common.php:814
689
  msgid "Spam comment denied"
690
  msgstr ""
691
 
692
+ #: ../common.php:815
693
  msgid "Spam form submission denied"
694
  msgstr ""
695
 
696
+ #: ../common.php:816
697
  msgid "Form submission denied"
698
  msgstr ""
699
 
700
+ #: ../common.php:817
701
  msgid "Comment denied"
702
  msgstr ""
703
 
704
+ #: ../common.php:828
705
  msgid "Password changed"
706
  msgstr ""
707
 
708
+ #: ../common.php:829
709
  msgid "Password reset requested"
710
  msgstr ""
711
 
712
+ #: ../common.php:831
713
  msgid "reCAPTCHA verification failed"
714
  msgstr ""
715
 
716
+ #: ../common.php:832
717
  msgid "reCAPTCHA settings are incorrect"
718
  msgstr ""
719
 
720
+ #: ../common.php:833
721
  msgid "Request to the Google reCAPTCHA service failed"
722
  msgstr ""
723
 
724
+ #: ../common.php:835
725
  msgid "Attempt to access prohibited URL"
726
  msgstr ""
727
 
728
+ #: ../common.php:836 ../common.php:884
729
  msgid "Attempt to log in with non-existent username"
730
  msgstr ""
731
 
732
+ #: ../common.php:837 ../common.php:885
733
  msgid "Attempt to log in with prohibited username"
734
  msgstr ""
735
 
736
+ #: ../common.php:839
737
  msgid "Attempt to log in denied"
738
  msgstr ""
739
 
740
+ #: ../common.php:840
741
  msgid "Attempt to register denied"
742
  msgstr ""
743
 
744
+ #: ../common.php:841 ../common.php:889
745
  msgid "Probing for vulnerable PHP code"
746
  msgstr ""
747
 
748
+ #: ../common.php:842
749
  msgid "Attempt to upload executable file denied"
750
  msgstr ""
751
 
752
+ #: ../common.php:843
753
  msgid "File upload denied"
754
  msgstr ""
755
 
756
+ #: ../common.php:845
757
  msgid "Request to REST API denied"
758
  msgstr ""
759
 
760
+ #: ../common.php:846
761
  msgid "XML-RPC request denied"
762
  msgstr ""
763
 
764
+ #: ../common.php:850
765
  msgid "Bot detected"
766
  msgstr ""
767
 
768
+ #: ../common.php:851
769
  msgid "Citadel mode is active"
770
  msgstr ""
771
 
772
+ #: ../common.php:853
773
  msgid "IP blacklisted"
774
  msgstr ""
775
 
776
+ #: ../common.php:855
777
  msgid "Malicious activity detected"
778
  msgstr ""
779
 
780
+ #: ../common.php:856
781
  msgid "Blocked by country rule"
782
  msgstr ""
783
 
784
+ #: ../common.php:857
785
  msgid "Limit reached"
786
  msgstr ""
787
 
788
+ #: ../common.php:858
789
  msgid "Multiple suspicious activities"
790
  msgstr ""
791
 
792
+ #: ../common.php:859
793
+ msgid "Denied"
794
+ msgstr ""
795
+
796
+ #: ../common.php:882
797
  msgid "Limit on login attempts is reached"
798
  msgstr ""
799
 
800
+ #: ../common.php:883
801
  msgid "Attempt to access"
802
  msgstr ""
803
 
804
+ #: ../common.php:886
805
  msgid "Limit on failed reCAPTCHA verifications is reached"
806
  msgstr ""
807
 
808
+ #: ../common.php:887
809
  msgid "Bot activity is detected"
810
  msgstr ""
811
 
812
+ #: ../common.php:888
813
  msgid "Multiple suspicious activities were detected"
814
  msgstr ""
815
 
816
+ #: ../common.php:944
817
  #, php-format
818
  msgid "%s ago"
819
  msgstr ""
820
 
821
+ #: ../common.php:1078 ../settings.php:222
822
  msgid "New version is available"
823
  msgstr ""
824
 
825
+ #: ../common.php:1085
826
  #, php-format
827
  msgid "Update to version %s of WP Cerber"
828
  msgstr ""
829
 
830
+ #: ../common.php:1104
831
  msgid "Not specified"
832
  msgstr ""
833
 
834
+ #: ../common.php:1641
835
  msgid "Unable to create the directory"
836
  msgstr ""
837
 
838
+ #: ../common.php:1646
839
  msgid "Destination folder access denied"
840
  msgstr ""
841
 
842
+ #: ../common.php:1649
843
  msgid "File not found"
844
  msgstr ""
845
 
846
+ #: ../common.php:1652
847
  msgid "Unable to copy the file"
848
  msgstr ""
849
 
850
+ #: ../common.php:1658
851
  msgid "Unable to delete the file"
852
  msgstr ""
853
 
855
  msgid "Cool!"
856
  msgstr ""
857
 
858
+ #: ../cerber-lab.php:722
859
  msgid "Want to make WP Cerber even more powerful?"
860
  msgstr ""
861
 
862
+ #: ../cerber-lab.php:723
863
  msgid ""
864
  "Allow WP Cerber to send locked out malicious IP addresses to Cerber Lab. "
865
  "This helps the plugin team to develop new algorithms for WP Cerber that will "
867
  "everyday. You can disable the sending in the plugin settings at any time."
868
  msgstr ""
869
 
870
+ #: ../cerber-lab.php:724
871
  msgid "OK, nail them all"
872
  msgstr ""
873
 
874
+ #: ../cerber-lab.php:725
875
  msgid "NO, maybe later"
876
  msgstr ""
877
 
878
+ #: ../cerber-lab.php:726 ../settings.php:427
879
  msgid "Know more"
880
  msgstr ""
881
 
882
+ #: ../cerber-load.php:360
883
  msgid "You are not allowed to log in. Ask your administrator for assistance."
884
  msgstr ""
885
 
886
+ #: ../cerber-load.php:366
887
  #, php-format
888
  msgid "You have reached the login attempts limit. Please try again in %d minutes."
889
  msgstr ""
890
 
891
+ #: ../cerber-load.php:385
892
  #, php-format
893
  msgid "You have only one attempt remaining."
894
  msgid_plural "You have %d attempts remaining."
895
  msgstr[0] ""
896
  msgstr[1] ""
897
 
898
+ #: ../cerber-load.php:697
899
  msgid ""
900
  "Human verification failed. Please click the square box in the reCAPTCHA "
901
  "block below."
902
  msgstr ""
903
 
904
+ #: ../cerber-load.php:798
905
  msgid ""
906
  "> > > Translator of WP Cerber? To get the PRO license for free, drop your "
907
  "contacts here: https://wpcerber.com/contact/"
908
  msgstr ""
909
 
910
+ #: ../cerber-load.php:946
911
  #, php-format
912
  msgid ""
913
  "<strong>ERROR</strong>: The password you entered for the username %s is "
914
  "incorrect."
915
  msgstr ""
916
 
917
+ #: ../cerber-load.php:1154 ../cerber-load.php:1160 ../cerber-load.php:1176 ..
918
+ #: /cerber-load.php:1183
919
  msgid "You are not allowed to register."
920
  msgstr ""
921
 
922
+ #: ../cerber-load.php:1170
923
  msgid "Username is not allowed. Please choose another one."
924
  msgstr ""
925
 
926
+ #: ../cerber-load.php:1420
927
  msgid "Sorry, human verification failed."
928
  msgstr ""
929
 
930
+ #: ../cerber-load.php:3226
931
  msgid "We're sorry, you are not allowed to proceed"
932
  msgstr ""
933
 
934
+ #: ../cerber-load.php:3336
935
  msgid "WP Cerber notify"
936
  msgstr ""
937
 
938
+ #: ../cerber-load.php:3358
939
  msgid "Citadel mode is activated"
940
  msgstr ""
941
 
942
+ #: ../cerber-load.php:3360
943
  #, php-format
944
  msgid "Citadel mode is activated after %d failed login attempts in %d minutes."
945
  msgstr ""
946
 
947
+ #: ../cerber-load.php:3361
948
  #, php-format
949
  msgid "Last failed attempt was at %s from IP %s with user login: %s."
950
  msgstr ""
951
 
952
+ #: ../cerber-load.php:3362 ../cerber-load.php:3941
953
  msgid "View activity in dashboard"
954
  msgstr ""
955
 
956
+ #: ../cerber-load.php:3387
957
  msgid "unspecified"
958
  msgstr ""
959
 
960
+ #: ../cerber-load.php:3390
961
  msgid "Number of lockouts is increasing"
962
  msgstr ""
963
 
964
+ #: ../cerber-load.php:3392
965
  msgid "Number of active lockouts"
966
  msgstr ""
967
 
968
+ #: ../cerber-load.php:3393
969
  #, php-format
970
  msgid "Last lockout was added: %s for IP %s"
971
  msgstr ""
972
 
973
+ #: ../cerber-load.php:3395
974
  msgid "View activity for this IP"
975
  msgstr ""
976
 
977
+ #: ../cerber-load.php:3396
978
  msgid "View lockouts in dashboard"
979
  msgstr ""
980
 
981
+ #: ../cerber-load.php:3399 ../cerber-load.php:3401
982
  msgid "A new version of WP Cerber is available to install"
983
  msgstr ""
984
 
985
+ #: ../cerber-load.php:3400
986
  msgid "Hi!"
987
  msgstr ""
988
 
989
+ #: ../cerber-load.php:3403 ../cerber-load.php:3414
990
  msgid "Website"
991
  msgstr ""
992
 
993
+ #: ../cerber-load.php:3406 ../cerber-load.php:3407
994
  msgid "The WP Cerber security plugin has been deactivated"
995
  msgstr ""
996
 
997
+ #: ../cerber-load.php:3409
998
  msgid "Not logged in"
999
  msgstr ""
1000
 
1001
+ #: ../cerber-load.php:3415
1002
  msgid "By user"
1003
  msgstr ""
1004
 
1005
+ #: ../cerber-load.php:3416
1006
  msgid "From IP address"
1007
  msgstr ""
1008
 
1009
+ #: ../cerber-load.php:3419
1010
  msgid "From country"
1011
  msgstr ""
1012
 
1013
+ #: ../cerber-load.php:3423
1014
  msgid "The WP Cerber security plugin is now active"
1015
  msgstr ""
1016
 
1017
+ #: ../cerber-load.php:3424 ../cerber-load.php:4143
1018
  msgid "WP Cerber is now active and has started protecting your site"
1019
  msgstr ""
1020
 
1021
+ #: ../cerber-load.php:3432
1022
  msgid "New Custom login URL"
1023
  msgstr ""
1024
 
1025
+ #: ../cerber-load.php:3436 ../cerber-load.php:3437
1026
  msgid "A new activity has been recorded"
1027
  msgstr ""
1028
 
1029
+ #: ../cerber-load.php:3442
1030
  msgid "Weekly report"
1031
  msgstr ""
1032
 
1033
+ #: ../cerber-load.php:3445
1034
  msgid "To change reporting settings visit"
1035
  msgstr ""
1036
 
1037
+ #: ../cerber-load.php:3471
1038
  msgid "Your login page:"
1039
  msgstr ""
1040
 
1041
+ #: ../cerber-load.php:3475
1042
  msgid "Your license is valid until"
1043
  msgstr ""
1044
 
1045
+ #: ../cerber-load.php:3478
1046
  msgid "This message was sent by"
1047
  msgstr ""
1048
 
1049
+ #: ../cerber-load.php:3499
1050
  #, php-format
1051
  msgid "Your last sign-in was %s from %s"
1052
  msgstr ""
1053
 
1054
+ #: ../cerber-load.php:3574
1055
  msgid "Weekly Report"
1056
  msgstr ""
1057
 
1058
+ #: ../cerber-load.php:3586
1059
  msgid "Activity details"
1060
  msgstr ""
1061
 
1062
+ #: ../cerber-load.php:3600
1063
  msgid "Attempts to log in with non-existent username"
1064
  msgstr ""
1065
 
1066
+ #: ../cerber-load.php:3913
1067
  msgid "User"
1068
  msgstr ""
1069
 
1070
+ #: ../cerber-load.php:3921
1071
  msgid "Search string"
1072
  msgstr ""
1073
 
1074
+ #: ../cerber-load.php:3942
1075
  msgid "To unsubscribe click here"
1076
  msgstr ""
1077
 
1078
+ #: ../cerber-load.php:4098
1079
  #, php-format
1080
  msgid "The WP Cerber requires PHP %s or higher. You are running"
1081
  msgstr ""
1082
 
1083
+ #: ../cerber-load.php:4102
1084
  #, php-format
1085
  msgid "The WP Cerber requires WordPress %s or higher. You are running"
1086
  msgstr ""
1087
 
1088
+ #: ../cerber-load.php:4111
1089
  msgid "Can't activate WP Cerber due to a database error."
1090
  msgstr ""
1091
 
1092
+ #: ../cerber-load.php:4144
1093
  msgid "Your IP address is added to the"
1094
  msgstr ""
1095
 
1096
+ #: ../cerber-load.php:4151 ../settings.php:459
1097
  msgid "Main Settings"
1098
  msgstr ""
1099
 
1100
+ #: ../cerber-load.php:4152 ../settings.php:462 ../cerber-tools.php:92 ../cerber-
1101
  #: tools.php:101 ../cerber-tools.php:182
1102
  msgid "Access Lists"
1103
  msgstr ""
1104
 
1105
+ #: ../cerber-load.php:4154 ../settings.php:464
1106
  msgid "Hardening"
1107
  msgstr ""
1108
 
1109
+ #: ../cerber-load.php:4155 ../settings.php:79 ../settings.php:103 ../settings.php:
1110
+ #: 469
1111
  msgid "Notifications"
1112
  msgstr ""
1113
 
1114
+ #: ../cerber-load.php:4156
1115
  msgid "Import settings"
1116
  msgstr ""
1117
 
1118
+ #: ../settings.php:71
1119
  msgid "Plugin initialization"
1120
  msgstr ""
1121
 
1122
+ #: ../settings.php:72
1123
  msgid "Load security engine"
1124
  msgstr ""
1125
 
1126
+ #: ../settings.php:72
1127
  msgid "Legacy mode"
1128
  msgstr ""
1129
 
1130
+ #: ../settings.php:72
1131
  msgid "Standard mode"
1132
  msgstr ""
1133
 
1134
+ #: ../settings.php:74
1135
  msgid "Limit login attempts"
1136
  msgstr ""
1137
 
1138
+ #: ../settings.php:75
1139
  msgid "Attempts"
1140
  msgstr ""
1141
 
1142
+ #: ../settings.php:76
1143
  msgid "Lockout duration"
1144
  msgstr ""
1145
 
1146
+ #: ../settings.php:76 ../settings.php:102
1147
  msgid "minutes"
1148
  msgstr ""
1149
 
1150
+ #: ../settings.php:77
1151
  msgid "Aggressive lockout"
1152
  msgstr ""
1153
 
1154
+ #: ../settings.php:78 ../settings.php:269
1155
+ msgid "Use White IP Access List"
1156
+ msgstr ""
1157
+
1158
+ #: ../settings.php:78
1159
  msgid "Apply limit login rules to IP addresses in the White IP Access List"
1160
  msgstr ""
1161
 
1162
+ #: ../settings.php:80
1163
  msgid "Site connection"
1164
  msgstr ""
1165
 
1166
+ #: ../settings.php:82
1167
  msgid "Proactive security rules"
1168
  msgstr ""
1169
 
1170
+ #: ../settings.php:83
1171
  msgid "Block subnet"
1172
  msgstr ""
1173
 
1174
+ #: ../settings.php:83
1175
  msgid "Always block entire subnet Class C of intruders IP"
1176
  msgstr ""
1177
 
1178
+ #: ../settings.php:84
1179
  msgid "Non-existent users"
1180
  msgstr ""
1181
 
1182
+ #: ../settings.php:84
1183
  msgid "Immediately block IP when attempting to login with a non-existent username"
1184
  msgstr ""
1185
 
1186
+ #: ../settings.php:85
1187
  msgid "Redirect dashboard requests"
1188
  msgstr ""
1189
 
1190
+ #: ../settings.php:85
1191
  msgid ""
1192
  "Disable automatic redirecting to the login page when /wp-admin/ is requested "
1193
  "by an unauthorized request"
1194
  msgstr ""
1195
 
1196
+ #: ../settings.php:86
1197
  msgid "Request wp-login.php"
1198
  msgstr ""
1199
 
1200
+ #: ../settings.php:86
1201
  msgid "Immediately block IP after any request to wp-login.php"
1202
  msgstr ""
1203
 
1204
+ #: ../settings.php:87
1205
  msgid "Display 404 page"
1206
  msgstr ""
1207
 
1208
+ #: ../settings.php:87
1209
  msgid "Use 404 template from the active theme"
1210
  msgstr ""
1211
 
1212
+ #: ../settings.php:87
1213
  msgid "Display simple 404 page"
1214
  msgstr ""
1215
 
1216
+ #: ../settings.php:89
1217
  msgid "Custom login page"
1218
  msgstr ""
1219
 
1220
+ #: ../settings.php:90
1221
  msgid "Custom login URL"
1222
  msgstr ""
1223
 
1224
+ #: ../settings.php:95
1225
  msgid "Custom login URL may contain only letters, numbers, dashes and underscores"
1226
  msgstr ""
1227
 
1228
+ #: ../settings.php:96
1229
  msgid "must not overlap with the existing pages or posts slug"
1230
  msgstr ""
1231
 
1232
+ #: ../settings.php:98
1233
  msgid "Disable wp-login.php"
1234
  msgstr ""
1235
 
1236
+ #: ../settings.php:98
1237
  msgid "Block direct access to wp-login.php and return HTTP 404 Not Found Error"
1238
  msgstr ""
1239
 
1240
+ #: ../settings.php:101
1241
  msgid "Threshold"
1242
  msgstr ""
1243
 
1244
+ #: ../settings.php:102
1245
  msgid "Duration"
1246
  msgstr ""
1247
 
1248
+ #: ../settings.php:103
1249
  msgid "Send notification to admin email"
1250
  msgstr ""
1251
 
1252
+ #: ../settings.php:103 ../settings.php:597 ../settings.php:719
1253
  msgid "Click to send test"
1254
  msgstr ""
1255
 
1256
+ #: ../settings.php:106 ../settings.php:344
1257
  msgid "Keep records for"
1258
  msgstr ""
1259
 
1260
+ #: ../settings.php:106 ../settings.php:180 ../settings.php:348 ../settings.php:399
1261
  msgid "days"
1262
  msgstr ""
1263
 
1264
+ #: ../settings.php:107
1265
  msgid "Cerber Lab connection"
1266
  msgstr ""
1267
 
1268
+ #: ../settings.php:107
1269
  msgid "Send malicious IP addresses to the Cerber Lab"
1270
  msgstr ""
1271
 
1272
+ #: ../settings.php:108
1273
  msgid "Cerber Lab protocol"
1274
  msgstr ""
1275
 
1276
+ #: ../settings.php:109
1277
  msgid "Use file"
1278
  msgstr ""
1279
 
1280
+ #: ../settings.php:109
1281
  msgid "Write failed login attempts to the file"
1282
  msgstr ""
1283
 
1284
+ #: ../settings.php:111
1285
  msgid "Preferences"
1286
  msgstr ""
1287
 
1288
+ #: ../settings.php:112
1289
  msgid "Drill down IP"
1290
  msgstr ""
1291
 
1292
+ #: ../settings.php:112
1293
  msgid "Retrieve extra WHOIS information for IP"
1294
  msgstr ""
1295
 
1296
+ #: ../settings.php:113
1297
  msgid "Date format"
1298
  msgstr ""
1299
 
1300
+ #: ../settings.php:113
1301
  #, php-format
1302
  msgid "if empty, the default format %s will be used"
1303
  msgstr ""
1304
 
1305
+ #: ../settings.php:120
1306
  msgid "Hardening WordPress"
1307
  msgstr ""
1308
 
1309
+ #: ../settings.php:121
1310
  msgid "Stop user enumeration"
1311
  msgstr ""
1312
 
1313
+ #: ../settings.php:121
1314
  msgid "Block access to user pages like /?author=n and user data via REST API"
1315
  msgstr ""
1316
 
1317
+ #: ../settings.php:122
1318
  msgid "Protect admin scripts"
1319
  msgstr ""
1320
 
1321
+ #: ../settings.php:122
1322
  msgid "Block unauthorized access to load-scripts.php and load-styles.php"
1323
  msgstr ""
1324
 
1325
+ #: ../settings.php:123
1326
  msgid "Disable XML-RPC"
1327
  msgstr ""
1328
 
1329
+ #: ../settings.php:123
1330
  msgid "Block access to the XML-RPC server (including Pingbacks and Trackbacks)"
1331
  msgstr ""
1332
 
1333
+ #: ../settings.php:124
1334
  msgid "Disable feeds"
1335
  msgstr ""
1336
 
1337
+ #: ../settings.php:124
1338
  msgid "Block access to the RSS, Atom and RDF feeds"
1339
  msgstr ""
1340
 
1341
+ #: ../settings.php:125
1342
  msgid "Disable REST API"
1343
  msgstr ""
1344
 
1345
+ #: ../settings.php:125
1346
  msgid "Block access to the WordPress REST API except the following"
1347
  msgstr ""
1348
 
1349
+ #: ../settings.php:126
1350
  msgid "Allow REST API for logged in users"
1351
  msgstr ""
1352
 
1353
+ #: ../settings.php:133
1354
  msgid ""
1355
  "Specify REST API namespaces to be allowed if REST API is disabled. One "
1356
  "string per line."
1357
  msgstr ""
1358
 
1359
+ #: ../settings.php:143
1360
  msgid "User related settings"
1361
  msgstr ""
1362
 
1363
+ #: ../settings.php:144
1364
  msgid "Registration limit"
1365
  msgstr ""
1366
 
1367
+ #: ../settings.php:145
1368
  msgid "Prohibited usernames"
1369
  msgstr ""
1370
 
1371
+ #: ../settings.php:151
1372
  msgid ""
1373
  "Usernames from this list are not allowed to log in or register. Any IP "
1374
  "address, have tried to use any of these usernames, will be immediately "
1375
  "blocked. Use comma to separate logins."
1376
  msgstr ""
1377
 
1378
+ #: ../settings.php:151
1379
  msgid "To specify a REGEX pattern wrap a pattern in two forward slashes."
1380
  msgstr ""
1381
 
1382
+ #: ../settings.php:153
1383
  msgid "User session expire"
1384
  msgstr ""
1385
 
1386
+ #: ../settings.php:153
1387
  msgid "in minutes (leave empty to use default WP value)"
1388
  msgstr ""
1389
 
1390
+ #: ../settings.php:154
1391
  msgid "Sort users in dashboard"
1392
  msgstr ""
1393
 
1394
+ #: ../settings.php:154
1395
  msgid "by date of registration"
1396
  msgstr ""
1397
 
1398
+ #: ../settings.php:161
1399
  msgid "Cerber antispam engine"
1400
  msgstr ""
1401
 
1402
+ #: ../settings.php:162
1403
  msgid "Comment form"
1404
  msgstr ""
1405
 
1406
+ #: ../settings.php:162
1407
  msgid "Protect comment form with bot detection engine"
1408
  msgstr ""
1409
 
1410
+ #: ../settings.php:163 ../settings.php:188
1411
  msgid "Registration form"
1412
  msgstr ""
1413
 
1414
+ #: ../settings.php:163
1415
  msgid "Protect registration form with bot detection engine"
1416
  msgstr ""
1417
 
1418
+ #: ../settings.php:164
1419
  msgid "Other forms"
1420
  msgstr ""
1421
 
1422
+ #: ../settings.php:164
1423
  msgid "Protect all forms on the website with bot detection engine"
1424
  msgstr ""
1425
 
1426
+ #: ../settings.php:166
1427
  msgid "Adjust antispam engine"
1428
  msgstr ""
1429
 
1430
+ #: ../settings.php:167
1431
  msgid "Safe mode"
1432
  msgstr ""
1433
 
1434
+ #: ../settings.php:167
1435
  msgid "Use less restrictive policies (allow AJAX)"
1436
  msgstr ""
1437
 
1438
+ #: ../settings.php:168
1439
  msgid "Disable bot detection engine for logged in users"
1440
  msgstr ""
1441
 
1442
+ #: ../settings.php:169
1443
  msgid "Query whitelist"
1444
  msgstr ""
1445
 
1446
+ #: ../settings.php:175
1447
  msgid ""
1448
  "Enter a part of query string or query path to exclude a request from "
1449
  "inspection by the engine. One item per line."
1450
  msgstr ""
1451
 
1452
+ #: ../settings.php:175 ../settings.php:280
1453
  msgid "To specify a REGEX pattern, enclose a whole line in two braces."
1454
  msgstr ""
1455
 
1456
+ #: ../settings.php:178
1457
  msgid "Comment processing"
1458
  msgstr ""
1459
 
1460
+ #: ../settings.php:179
1461
  msgid "If a spam comment detected"
1462
  msgstr ""
1463
 
1464
+ #: ../settings.php:179
1465
  msgid "Deny it completely"
1466
  msgstr ""
1467
 
1468
+ #: ../settings.php:179
1469
  msgid "Mark it as spam"
1470
  msgstr ""
1471
 
1472
+ #: ../settings.php:180
1473
  msgid "Trash spam comments"
1474
  msgstr ""
1475
 
1476
+ #: ../settings.php:180
1477
  msgid "Move spam comments to trash after"
1478
  msgstr ""
1479
 
1480
+ #: ../settings.php:183
1481
  msgid "reCAPTCHA settings"
1482
  msgstr ""
1483
 
1484
+ #: ../settings.php:184
1485
  msgid "Site key"
1486
  msgstr ""
1487
 
1488
+ #: ../settings.php:185
1489
  msgid "Secret key"
1490
  msgstr ""
1491
 
1492
+ #: ../settings.php:186
1493
  msgid "Invisible reCAPTCHA"
1494
  msgstr ""
1495
 
1496
+ #: ../settings.php:186
1497
  msgid "Enable invisible reCAPTCHA"
1498
  msgstr ""
1499
 
1500
+ #: ../settings.php:186
1501
  msgid ""
1502
  "(do not enable it unless you get and enter the Site and Secret keys for the "
1503
  "invisible version)"
1504
  msgstr ""
1505
 
1506
+ #: ../settings.php:188
1507
  msgid "Enable reCAPTCHA for WordPress registration form"
1508
  msgstr ""
1509
 
1510
+ #: ../settings.php:189
1511
  msgid "Enable reCAPTCHA for WooCommerce registration form"
1512
  msgstr ""
1513
 
1514
+ #: ../settings.php:191
1515
  msgid "Lost password form"
1516
  msgstr ""
1517
 
1518
+ #: ../settings.php:191
1519
  msgid "Enable reCAPTCHA for WordPress lost password form"
1520
  msgstr ""
1521
 
1522
+ #: ../settings.php:192
1523
  msgid "Enable reCAPTCHA for WooCommerce lost password form"
1524
  msgstr ""
1525
 
1526
+ #: ../settings.php:194
1527
  msgid "Login form"
1528
  msgstr ""
1529
 
1530
+ #: ../settings.php:194
1531
  msgid "Enable reCAPTCHA for WordPress login form"
1532
  msgstr ""
1533
 
1534
+ #: ../settings.php:195
1535
  msgid "Enable reCAPTCHA for WooCommerce login form"
1536
  msgstr ""
1537
 
1538
+ #: ../settings.php:197
1539
  msgid "Enable reCAPTCHA for WordPress comment form"
1540
  msgstr ""
1541
 
1542
+ #: ../settings.php:198
1543
  msgid "Disable reCAPTCHA for logged in users"
1544
  msgstr ""
1545
 
1546
+ #: ../settings.php:200
1547
  msgid "Limit attempts"
1548
  msgstr ""
1549
 
1550
+ #: ../settings.php:200
1551
  #, php-format
1552
  msgid "Lock out IP address for %s minutes after %s failed attempts within %s minutes"
1553
  msgstr ""
1554
 
1555
+ #: ../settings.php:206
1556
  msgid "Email notifications"
1557
  msgstr ""
1558
 
1559
+ #: ../settings.php:209 ../settings.php:244
1560
  msgid "Email Address"
1561
  msgstr ""
1562
 
1563
+ #: ../settings.php:213 ../settings.php:249 ../settings.php:312
1564
  msgid "Use comma to specify multiple values"
1565
  msgstr ""
1566
 
1567
+ #: ../settings.php:218
1568
  #, php-format
1569
  msgid "if empty, the admin email %s will be used"
1570
  msgstr ""
1571
 
1572
+ #: ../settings.php:221
1573
  msgid "Notification limit"
1574
  msgstr ""
1575
 
1576
+ #: ../settings.php:221
1577
  msgid "notification letters allowed per hour (0 means unlimited)"
1578
  msgstr ""
1579
 
1580
+ #: ../settings.php:227
1581
  msgid "Push notifications"
1582
  msgstr ""
1583
 
1584
+ #: ../settings.php:234
1585
  msgid "All connected devices"
1586
  msgstr ""
1587
 
1588
+ #: ../settings.php:235
1589
  msgid "No devices found"
1590
  msgstr ""
1591
 
1592
+ #: ../settings.php:237
1593
  msgid "Not available"
1594
  msgstr ""
1595
 
1596
+ #: ../settings.php:241
1597
  msgid "Weekly reports"
1598
  msgstr ""
1599
 
1600
+ #: ../settings.php:242
1601
  msgid "Enable reporting"
1602
  msgstr ""
1603
 
1604
+ #: ../settings.php:254
1605
  msgid "if empty, email from notification settings will be used"
1606
  msgstr ""
1607
 
1608
+ #: ../settings.php:262
1609
  msgid "Inspection"
1610
  msgstr ""
1611
 
1612
+ #: ../settings.php:263
1613
  msgid "Enable traffic inspection"
1614
  msgstr ""
1615
 
1616
+ #: ../settings.php:274
1617
  msgid "Request whitelist"
1618
  msgstr ""
1619
 
1620
+ #: ../settings.php:280
1621
  msgid ""
1622
  "Enter a request URI to exclude the request from inspection. One item per "
1623
  "line."
1624
  msgstr ""
1625
 
1626
+ #: ../settings.php:283
1627
  msgid "Logging"
1628
  msgstr ""
1629
 
1630
+ #: ../settings.php:284
1631
  msgid "Logging mode"
1632
  msgstr ""
1633
 
1634
+ #: ../settings.php:290
1635
  msgid "Logging disabled"
1636
  msgstr ""
1637
 
1638
+ #: ../settings.php:291
1639
  msgid "Smart"
1640
  msgstr ""
1641
 
1642
+ #: ../settings.php:292
1643
  msgid "All traffic"
1644
  msgstr ""
1645
 
1646
+ #: ../settings.php:296
1647
  msgid "Ignore crawlers"
1648
  msgstr ""
1649
 
1650
+ #: ../settings.php:301
1651
  msgid "Save request fields"
1652
  msgstr ""
1653
 
1654
+ #: ../settings.php:306
1655
  msgid "Mask these form fields"
1656
  msgstr ""
1657
 
1658
+ #: ../settings.php:317
1659
  msgid "Save request headers"
1660
  msgstr ""
1661
 
1662
+ #: ../settings.php:323
1663
  msgid "Save $_SERVER"
1664
  msgstr ""
1665
 
1666
+ #: ../settings.php:329
1667
  msgid "Save request cookies"
1668
  msgstr ""
1669
 
1670
+ #: ../settings.php:336
1671
  msgid "Page generation time threshold"
1672
  msgstr ""
1673
 
1674
+ #: ../settings.php:341
1675
  msgid "milliseconds"
1676
  msgstr ""
1677
 
1678
+ #: ../settings.php:357
1679
+ msgid "Scanner settings"
1680
+ msgstr ""
1681
+
1682
+ #: ../settings.php:358
1683
+ msgid "Custom signatures"
1684
+ msgstr ""
1685
+
1686
+ #: ../settings.php:364
1687
+ msgid ""
1688
+ "Specify custom PHP code signatures. One item per line. To specify a REGEX "
1689
+ "pattern, enclose a whole line in two braces."
1690
+ msgstr ""
1691
+
1692
+ #: ../settings.php:366
1693
+ msgid "Unwanted file extensions"
1694
+ msgstr ""
1695
+
1696
+ #: ../settings.php:372
1697
+ msgid ""
1698
+ "Specify file extensions to search for. Full scan only. Use comma to separate "
1699
+ "items."
1700
+ msgstr ""
1701
+
1702
+ #: ../settings.php:374
1703
+ msgid "Directories to exclude"
1704
+ msgstr ""
1705
+
1706
+ #: ../settings.php:380
1707
+ msgid ""
1708
+ "Specify directories to exclude from scanning. One item per line. Use with "
1709
+ "caution."
1710
+ msgstr ""
1711
+
1712
+ #: ../settings.php:382
1713
+ msgid "Scan temporary directory"
1714
+ msgstr ""
1715
+
1716
+ #: ../settings.php:388
1717
+ msgid "Scan session directory"
1718
+ msgstr ""
1719
+
1720
+ #: ../settings.php:394
1721
+ msgid "Delete quarantined files after"
1722
+ msgstr ""
1723
+
1724
+ #: ../settings.php:409
1725
  msgid "Make your protection smarter!"
1726
  msgstr ""
1727
 
1728
+ #: ../settings.php:413
1729
  msgid ""
1730
  "Please enable Permalinks to use this feature. Set Permalink Settings to "
1731
  "something other than Default."
1732
  msgstr ""
1733
 
1734
+ #: ../settings.php:416
1735
  msgid "Be careful about enabling these options."
1736
  msgstr ""
1737
 
1738
+ #: ../settings.php:416
1739
  msgid "If you forget your Custom login URL, you will be unable to log in."
1740
  msgstr ""
1741
 
1742
+ #: ../settings.php:420
1743
  msgid ""
1744
  "In the Citadel mode nobody is able to log in except IPs from the White IP "
1745
  "Access List. Active user sessions will not be affected."
1746
  msgstr ""
1747
 
1748
+ #: ../settings.php:423
1749
  msgid "These settings do not affect hosts from the "
1750
  msgstr ""
1751
 
1752
+ #: ../settings.php:426
1753
  msgid ""
1754
  "Before you can start using reCAPTCHA, you have to obtain Site key and Secret "
1755
  "key on the Google website"
1756
  msgstr ""
1757
 
1758
+ #: ../settings.php:457
1759
  msgid "Lockouts"
1760
  msgstr ""
1761
 
1762
+ #: ../settings.php:466
1763
  msgid "Users"
1764
  msgstr ""
1765
 
1766
+ #: ../settings.php:578 ../settings.php:700
1767
  #, php-format
1768
  msgid "%s allowed retries in %s minutes"
1769
  msgstr ""
1770
 
1771
+ #: ../settings.php:583 ../settings.php:705
1772
  #, php-format
1773
  msgid "%s allowed registrations in %s minutes from one IP"
1774
  msgstr ""
1775
 
1776
+ #: ../settings.php:588 ../settings.php:710
1777
  #, php-format
1778
  msgid "Increase lockout duration to %s hours after %s lockouts in the last %s hours"
1779
  msgstr ""
1780
 
1781
+ #: ../settings.php:595 ../settings.php:717
1782
  msgid "Notify admin if the number of active lockouts above"
1783
  msgstr ""
1784
 
1785
+ #: ../settings.php:600 ../settings.php:722
1786
  #, php-format
1787
  msgid "Enable after %s failed login attempts in last %s minutes"
1788
  msgstr ""
1789
 
1790
+ #: ../settings.php:808
1791
  msgid "Sunday"
1792
  msgstr ""
1793
 
1794
+ #: ../settings.php:809
1795
  msgid "Monday"
1796
  msgstr ""
1797
 
1798
+ #: ../settings.php:810
1799
  msgid "Tuesday"
1800
  msgstr ""
1801
 
1802
+ #: ../settings.php:811
1803
  msgid "Wednesday"
1804
  msgstr ""
1805
 
1806
+ #: ../settings.php:812
1807
  msgid "Thursday"
1808
  msgstr ""
1809
 
1810
+ #: ../settings.php:813
1811
  msgid "Friday"
1812
  msgstr ""
1813
 
1814
+ #: ../settings.php:814
1815
  msgid "Saturday"
1816
  msgstr ""
1817
 
1818
  #. translators: preposition of time
1819
+ #: ../settings.php:824
1820
  msgctxt "preposition of time"
1821
  msgid "at"
1822
  msgstr ""
1823
 
1824
+ #: ../settings.php:840
1825
  msgid "Click to send now"
1826
  msgstr ""
1827
 
1828
+ #: ../settings.php:852
1829
  msgid "Plugin initialization mode has not been changed"
1830
  msgstr ""
1831
 
1832
+ #: ../settings.php:872 ../settings.php:873
1833
  msgid "Attention! You have changed the login URL! The new login URL is"
1834
  msgstr ""
1835
 
1836
+ #: ../settings.php:874 ../settings.php:875
1837
  msgid ""
1838
  "If you use a caching plugin, you have to add your new login URL to the list "
1839
  "of pages not to cache."
1840
  msgstr ""
1841
 
1842
+ #: ../settings.php:953 ../settings.php:965
1843
  msgid "<strong>ERROR</strong>: please enter a valid email address."
1844
  msgstr ""
1845
 
1920
  msgid "Antispam and bot detection settings"
1921
  msgstr ""
1922
 
1923
+ #: ../cerber-scanner.php:72
1924
+ msgid "Security Scanner"
1925
+ msgstr ""
1926
+
1927
+ #: ../cerber-scanner.php:135
1928
+ msgid "Start Quick Scan"
1929
+ msgstr ""
1930
+
1931
+ #: ../cerber-scanner.php:136
1932
+ msgid "Start Full Scan"
1933
+ msgstr ""
1934
+
1935
+ #: ../cerber-scanner.php:137
1936
+ msgid "Stop Scanning"
1937
+ msgstr ""
1938
+
1939
+ #: ../cerber-scanner.php:138
1940
+ msgid "Continues Scanning"
1941
+ msgstr ""
1942
+
1943
+ #: ../cerber-scanner.php:162
1944
+ msgid "Delete"
1945
+ msgstr ""
1946
+
1947
+ #: ../cerber-scanner.php:1639
1948
+ msgid "Verified"
1949
+ msgstr ""
1950
+
1951
+ #: ../cerber-scanner.php:1640
1952
+ msgid "Integrity data not found"
1953
+ msgstr ""
1954
+
1955
+ #: ../cerber-scanner.php:1641
1956
+ msgid "Unable to check the integrity of the plugin due to a network error"
1957
+ msgstr ""
1958
+
1959
+ #: ../cerber-scanner.php:1642
1960
+ msgid "Unable to check the integrity of WordPress files due to a network error"
1961
+ msgstr ""
1962
+
1963
+ #: ../cerber-scanner.php:1643
1964
+ msgid "Unable to check the integrity of the theme due to a network error"
1965
+ msgstr ""
1966
+
1967
+ #: ../cerber-scanner.php:1645
1968
+ msgid "Local file doesn't exist"
1969
+ msgstr ""
1970
+
1971
+ #: ../cerber-scanner.php:1647 ../cerber-scanner.php:4518
1972
+ msgid "Unable to open file"
1973
+ msgstr ""
1974
+
1975
+ #: ../cerber-scanner.php:1648
1976
+ msgid "Content has been modified"
1977
+ msgstr ""
1978
+
1979
+ #: ../cerber-scanner.php:1650
1980
+ msgid "Suspicious code found"
1981
+ msgstr ""
1982
+
1983
+ #: ../cerber-scanner.php:1651
1984
+ msgid "Potentially malicious code found"
1985
+ msgstr ""
1986
+
1987
+ #: ../cerber-scanner.php:1652
1988
+ msgid "Unattended suspicious file"
1989
+ msgstr ""
1990
+
1991
+ #: ../cerber-scanner.php:1653
1992
+ msgid "Executable code found"
1993
+ msgstr ""
1994
+
1995
+ #: ../cerber-scanner.php:1655
1996
+ msgid "Unwanted extension"
1997
+ msgstr ""
1998
+
1999
+ #: ../cerber-scanner.php:2609
2000
+ msgid "Custom signature found"
2001
+ msgstr ""
2002
+
2003
+ #: ../cerber-scanner.php:3595
2004
+ msgid "Files to scan"
2005
+ msgstr ""
2006
+
2007
+ #: ../cerber-scanner.php:3603
2008
+ msgid "Critical issues"
2009
+ msgstr ""
2010
+
2011
+ #: ../cerber-scanner.php:3607
2012
+ msgid "Issues total"
2013
+ msgstr ""
2014
+
2015
+ #: ../cerber-scanner.php:3963
2016
+ msgid "The directory is not writable"
2017
+ msgstr ""
2018
+
2019
+ #: ../cerber-scanner.php:3981
2020
+ msgid "Unable to create WP CERBER directory"
2021
+ msgstr ""
2022
+
2023
  #. Description of the plugin
2024
  msgid ""
2025
  "This is a standard boot module for WP Cerber Security & Antispam plugin. It "
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
- === Cerber Security & Antispam ===
2
  Contributors: gioni
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SR8RJXFU35EW8
4
- Tags: security, login, custom login url, antispam, limit login attempts, firewall, recaptcha, captcha, activity, log, logging, whitelist, blacklist, access list
5
  Requires at least: 4.5
6
  Requires PHP: 5.4
7
  Tested up to: 4.9
8
- Stable tag: 6.7.5
9
  License: GPLv2
10
 
11
- Protection against hacker attacks and bots. Restrict access with IP access lists, track user and bot activity. reCAPTCHA. Limit login attempts.
12
 
13
  == Description ==
14
 
@@ -17,6 +17,7 @@ Restricts access with the Black IP Access List and the White IP Access List.
17
  Tracks user and intruder activity with powerful email, mobile and desktop notifications.
18
  Stop spam: activates Cerber antispam engine and Google reCAPTCHA for protecting registration, contact and comments forms.
19
  Hardening WordPress with a set of security rules and comprehensive algorithms.
 
20
 
21
  **Features you will love**
22
 
@@ -26,6 +27,7 @@ Hardening WordPress with a set of security rules and comprehensive algorithms.
26
  * Create **Custom login URL** ([rename wp-login.php](https://wpcerber.com/how-to-rename-wp-login-php/)).
27
  * Cerber antispam engine for protecting any contact form. Automatically detects and moves spam comments to trash or deny it completely.
28
  * Log users, bots, hacker and other suspicious activities.
 
29
  * Cool notifications with powerful event filters.
30
  * Hide wp-login.php, wp-signup.php and wp-register.php from possible attacks.
31
  * Hide wp-admin (dashboard) when a user isn't logged in.
@@ -61,6 +63,10 @@ You will be able to create a **Black IP Access List** or **White IP Access List*
61
 
62
  Moreover, you can create your Custom login page and forget about automatic attacks to the default wp-login.php, which takes your attention and consumes a lot of server resources. If an attacker tries to access wp-login.php they will be blocked and get a 404 Error response.
63
 
 
 
 
 
64
  = Log, filter out and export activities =
65
 
66
  WP Cerber tracks time, IP addresses and usernames for successful and failed login attempts, logins, logouts, password changes, blocked IP and actions taken by itself. You can export them to a CSV file.
1
+ === Cerber Security, Antispam & Malware Scan ===
2
  Contributors: gioni
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SR8RJXFU35EW8
4
+ Tags: security, malware scanner, antispam, firewall, limit login attempts, custom login url, login, recaptcha, captcha, activity, log, logging, whitelist, blacklist, access list
5
  Requires at least: 4.5
6
  Requires PHP: 5.4
7
  Tested up to: 4.9
8
+ Stable tag: 7.0
9
  License: GPLv2
10
 
11
+ Protection against hacker attacks and bots. Malware scanner & integrity checker. Monitor user activity. Antispam reCAPTCHA. Limit login attempts.
12
 
13
  == Description ==
14
 
17
  Tracks user and intruder activity with powerful email, mobile and desktop notifications.
18
  Stop spam: activates Cerber antispam engine and Google reCAPTCHA for protecting registration, contact and comments forms.
19
  Hardening WordPress with a set of security rules and comprehensive algorithms.
20
+ Malware scanner & integrity checker.
21
 
22
  **Features you will love**
23
 
27
  * Create **Custom login URL** ([rename wp-login.php](https://wpcerber.com/how-to-rename-wp-login-php/)).
28
  * Cerber antispam engine for protecting any contact form. Automatically detects and moves spam comments to trash or deny it completely.
29
  * Log users, bots, hacker and other suspicious activities.
30
+ * Scan and verify the integrity of all WordPress files, plugins and themes.
31
  * Cool notifications with powerful event filters.
32
  * Hide wp-login.php, wp-signup.php and wp-register.php from possible attacks.
33
  * Hide wp-admin (dashboard) when a user isn't logged in.
63
 
64
  Moreover, you can create your Custom login page and forget about automatic attacks to the default wp-login.php, which takes your attention and consumes a lot of server resources. If an attacker tries to access wp-login.php they will be blocked and get a 404 Error response.
65
 
66
+ = Malware scanner & integrity checker. =
67
+
68
+ The main purpose of the scanner is to provide a handy diagnostic tool to monitor all files on a website, verify the integrity of WordPress, plugins, themes and to detect and remove malware. [Read more about malware scanner](https://wpcerber.com/wordpress-security-scanner/).
69
+
70
  = Log, filter out and export activities =
71
 
72
  WP Cerber tracks time, IP addresses and usernames for successful and failed login attempts, logins, logouts, password changes, blocked IP and actions taken by itself. You can export them to a CSV file.
settings.php CHANGED
@@ -41,6 +41,7 @@ define('CERBER_OPT_U','cerber-users');
41
  define('CERBER_OPT_C','cerber-recaptcha');
42
  define('CERBER_OPT_N','cerber-notifications');
43
  define('CERBER_OPT_T','cerber-traffic');
 
44
 
45
  /**
46
  * A set of Cerber setting (WP options)
@@ -49,7 +50,7 @@ define('CERBER_OPT_T','cerber-traffic');
49
  */
50
 
51
  function cerber_get_setting_list() {
52
- return array( CERBER_OPT, CERBER_OPT_H, CERBER_OPT_U, CERBER_OPT_C, CERBER_OPT_N, CERBER_OPT_T );
53
  }
54
 
55
  /*
@@ -74,14 +75,14 @@ function cerber_settings_init(){
74
  add_settings_field('attempts',__('Attempts','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'attempts','type'=>'attempts'));
75
  add_settings_field('lockout',__('Lockout duration','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'lockout','type'=>'text','label'=>__('minutes','wp-cerber'),'size'=>3));
76
  add_settings_field('aggressive',__('Aggressive lockout','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'aggressive','type'=>'aggressive'));
77
- add_settings_field('limitwhite',__('White IP Access List','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'limitwhite','type'=>'checkbox','label'=>__('Apply limit login rules to IP addresses in the White IP Access List','wp-cerber')));
78
  add_settings_field('notify',__('Notifications','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'type'=>'notify','option'=>'notify'));
79
  add_settings_field('proxy',__('Site connection','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'proxy','type'=>'checkbox','label'=>__('My site is behind a reverse proxy','wp-cerber')));
80
 
81
  add_settings_section('proactive', __('Proactive security rules','wp-cerber'), 'cerber_sapi_section', 'cerber-' . $tab);
82
  add_settings_field('subnet',__('Block subnet','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'subnet','type'=>'checkbox','label'=>__('Always block entire subnet Class C of intruders IP','wp-cerber')));
83
  add_settings_field('nonusers',__('Non-existent users','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'nonusers','type'=>'checkbox','label'=>__('Immediately block IP when attempting to login with a non-existent username','wp-cerber')));
84
- add_settings_field('noredirect',__('Redirect dashboard requests','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'noredirect','type'=>'checkbox','label'=>__('Disable automatic redirecting to the login page when /wp-admin/ is requested by an unauthorized request','wp-cerber')));
85
  add_settings_field('wplogin',__('Request wp-login.php','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'wplogin','type'=>'checkbox','label'=>__('Immediately block IP after any request to wp-login.php','wp-cerber')));
86
  add_settings_field('page404',__('Display 404 page','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab, 'option'=>'page404', 'type'=>'select', 'set' => array(__('Use 404 template from the active theme','wp-cerber'), __('Display simple 404 page','wp-cerber'))));
87
 
@@ -264,6 +265,12 @@ function cerber_settings_init(){
264
  'setting' => 'tienabled',
265
  'type' => 'checkbox',
266
  ) );
 
 
 
 
 
 
267
  add_settings_field( 'tiwhite', __( 'Request whitelist', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_T, 'tmain',
268
  array( 'group' => $group,
269
  'setting' => 'tiwhite',
@@ -341,6 +348,57 @@ function cerber_settings_init(){
341
  'label' => __( 'days', 'wp-cerber' ),
342
  'size' => 4
343
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  }
345
  /*
346
  Generate HTML for each sections on a settings page
@@ -524,7 +582,7 @@ function cerberus_field_show($args){
524
  case 'reglimit':
525
  $html=sprintf(__('%s allowed registrations in %s minutes from one IP','wp-cerber'),
526
  '<input type="text" id="reglimit-num" name="cerber-'.$args['group'].'[reglimit_num]" value="'.$settings['reglimit_num'].'" size="3" maxlength="3" />',
527
- '<input type="text" id="reglimit-min" name="cerber-'.$args['group'].'[reglimit_min]" value="'.$settings['reglimit_min'].'" size="3" maxlength="3" />');
528
  break;
529
  case 'aggressive':
530
  $html=sprintf(__('Increase lockout duration to %s hours after %s lockouts in the last %s hours','wp-cerber'),
@@ -978,6 +1036,25 @@ function cerber_sanitize_t($new, $old, $option) {
978
 
979
  return $new;
980
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
  /**
982
  * Let's sanitize them all
983
  * @since 4.1
@@ -1158,7 +1235,7 @@ function cerber_get_defaults($field = null) {
1158
  'nofeeds' => 0,
1159
  'norest' => 0,
1160
  'restauth' => 0,
1161
- 'restwhite' => '',
1162
  'hashauthor' => 0,
1163
  'cleanhead' => 1,
1164
  ),
@@ -1208,6 +1285,7 @@ function cerber_get_defaults($field = null) {
1208
  ),
1209
  CERBER_OPT_T => array(
1210
  'tienabled' => '1',
 
1211
  'tiwhite' => '',
1212
  'timode' => '1',
1213
  'tinocrabs' => '1',
@@ -1218,7 +1296,15 @@ function cerber_get_defaults($field = null) {
1218
  'ticandy' => 0,
1219
  'tithreshold' => '',
1220
  'tikeeprec' => 7,
1221
- )
 
 
 
 
 
 
 
 
1222
  );
1223
  if ( $field ) {
1224
  foreach ( $all_defaults as $option ) {
41
  define('CERBER_OPT_C','cerber-recaptcha');
42
  define('CERBER_OPT_N','cerber-notifications');
43
  define('CERBER_OPT_T','cerber-traffic');
44
+ define('CERBER_OPT_S','cerber-scanner');
45
 
46
  /**
47
  * A set of Cerber setting (WP options)
50
  */
51
 
52
  function cerber_get_setting_list() {
53
+ return array( CERBER_OPT, CERBER_OPT_H, CERBER_OPT_U, CERBER_OPT_C, CERBER_OPT_N, CERBER_OPT_T, CERBER_OPT_S );
54
  }
55
 
56
  /*
75
  add_settings_field('attempts',__('Attempts','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'attempts','type'=>'attempts'));
76
  add_settings_field('lockout',__('Lockout duration','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'lockout','type'=>'text','label'=>__('minutes','wp-cerber'),'size'=>3));
77
  add_settings_field('aggressive',__('Aggressive lockout','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'aggressive','type'=>'aggressive'));
78
+ add_settings_field('limitwhite',__('Use White IP Access List','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'limitwhite','type'=>'checkbox','label'=>__('Apply limit login rules to IP addresses in the White IP Access List','wp-cerber')));
79
  add_settings_field('notify',__('Notifications','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'type'=>'notify','option'=>'notify'));
80
  add_settings_field('proxy',__('Site connection','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'cerber',array('group'=>$tab,'option'=>'proxy','type'=>'checkbox','label'=>__('My site is behind a reverse proxy','wp-cerber')));
81
 
82
  add_settings_section('proactive', __('Proactive security rules','wp-cerber'), 'cerber_sapi_section', 'cerber-' . $tab);
83
  add_settings_field('subnet',__('Block subnet','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'subnet','type'=>'checkbox','label'=>__('Always block entire subnet Class C of intruders IP','wp-cerber')));
84
  add_settings_field('nonusers',__('Non-existent users','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'nonusers','type'=>'checkbox','label'=>__('Immediately block IP when attempting to login with a non-existent username','wp-cerber')));
85
+ add_settings_field('noredirect',__('Disable dashboard redirection','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'noredirect','type'=>'checkbox','label'=>__('Disable automatic redirection to the login page when /wp-admin/ is requested by an unauthorized request','wp-cerber')));
86
  add_settings_field('wplogin',__('Request wp-login.php','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab,'option'=>'wplogin','type'=>'checkbox','label'=>__('Immediately block IP after any request to wp-login.php','wp-cerber')));
87
  add_settings_field('page404',__('Display 404 page','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'proactive',array('group'=>$tab, 'option'=>'page404', 'type'=>'select', 'set' => array(__('Use 404 template from the active theme','wp-cerber'), __('Display simple 404 page','wp-cerber'))));
88
 
265
  'setting' => 'tienabled',
266
  'type' => 'checkbox',
267
  ) );
268
+ // Do not inspect whitelisted IPs
269
+ add_settings_field( 'tiipwhite', __( 'Use White IP Access List', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_T, 'tmain',
270
+ array( 'group' => $group,
271
+ 'setting' => 'tiipwhite',
272
+ 'type' => 'checkbox',
273
+ ) );
274
  add_settings_field( 'tiwhite', __( 'Request whitelist', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_T, 'tmain',
275
  array( 'group' => $group,
276
  'setting' => 'tiwhite',
348
  'label' => __( 'days', 'wp-cerber' ),
349
  'size' => 4
350
  ) );
351
+
352
+ // Security Scanner -----------------------------------------------------------------------------
353
+
354
+ $group = 'scanner'; // 'cerber-scanner' settings
355
+ register_setting( 'cerberus-' . $group, CERBER_OPT_S );
356
+
357
+ add_settings_section( 'smain', __( 'Scanner settings', 'wp-cerber' ), 'cerber_sapi_section', CERBER_OPT_S );
358
+ add_settings_field( 'scan_cpt', __( 'Custom signatures', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_S, 'smain',
359
+ array( 'group' => $group,
360
+ 'setting' => 'scan_cpt',
361
+ 'type' => 'textarea',
362
+ 'delimiter' => "\n",
363
+ 'list' => true,
364
+ 'label' => __( 'Specify custom PHP code signatures. One item per line. To specify a REGEX pattern, enclose a whole line in two braces.', 'wp-cerber' ) . ' <a target="_blank" href="https://wpcerber.com/malware-scanner-settings/">Read more</a>'
365
+ ) );
366
+ add_settings_field( 'scan_uext', __( 'Unwanted file extensions', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_S, 'smain',
367
+ array( 'group' => $group,
368
+ 'setting' => 'scan_uext',
369
+ 'type' => 'textarea',
370
+ 'delimiter' => ",",
371
+ 'list' => true,
372
+ 'label' => __( 'Specify file extensions to search for. Full scan only. Use comma to separate items.', 'wp-cerber' )
373
+ ) );
374
+ add_settings_field( 'scan_exclude', __( 'Directories to exclude', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_S, 'smain',
375
+ array( 'group' => $group,
376
+ 'setting' => 'scan_exclude',
377
+ 'type' => 'textarea',
378
+ 'delimiter' => "\n",
379
+ 'list' => true,
380
+ 'label' => __( 'Specify directories to exclude from scanning. One item per line. Use with caution.', 'wp-cerber' )
381
+ ) );
382
+ add_settings_field( 'scan_tmp', __( 'Scan temporary directory', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_S, 'smain',
383
+ array(
384
+ 'group' => $group,
385
+ 'setting' => 'scan_tmp',
386
+ 'type' => 'checkbox',
387
+ ) );
388
+ add_settings_field( 'scan_sess', __( 'Scan session directory', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_S, 'smain',
389
+ array(
390
+ 'group' => $group,
391
+ 'setting' => 'scan_sess',
392
+ 'type' => 'checkbox',
393
+ ) );
394
+ add_settings_field( 'scan_qcleanup', __( 'Delete quarantined files after', 'wp-cerber' ), 'cerber_field_show', CERBER_OPT_S, 'smain',
395
+ array(
396
+ 'group' => $group,
397
+ 'setting' => 'scan_qcleanup',
398
+ 'type' => 'text',
399
+ 'label' => __( 'days', 'wp-cerber' ),
400
+ 'size' => 3
401
+ ) );
402
  }
403
  /*
404
  Generate HTML for each sections on a settings page
582
  case 'reglimit':
583
  $html=sprintf(__('%s allowed registrations in %s minutes from one IP','wp-cerber'),
584
  '<input type="text" id="reglimit-num" name="cerber-'.$args['group'].'[reglimit_num]" value="'.$settings['reglimit_num'].'" size="3" maxlength="3" />',
585
+ '<input type="text" id="reglimit-min" name="cerber-'.$args['group'].'[reglimit_min]" value="'.$settings['reglimit_min'].'" size="4" maxlength="4" />');
586
  break;
587
  case 'aggressive':
588
  $html=sprintf(__('Increase lockout duration to %s hours after %s lockouts in the last %s hours','wp-cerber'),
1036
 
1037
  return $new;
1038
  }
1039
+
1040
+ /*
1041
+ Sanitizing/checking user input for Security Scanner settings
1042
+ */
1043
+ add_filter( 'pre_update_option_' . CERBER_OPT_S, 'cerber_sanitize_s', 10, 3 );
1044
+ function cerber_sanitize_s( $new, $old, $option ) {
1045
+
1046
+ $list = cerber_text2array( $new['scan_exclude'], "\n" );
1047
+ $list = array_filter( $list, function ( $item ) {
1048
+ return @is_dir( $item );
1049
+ } );
1050
+ $new['scan_exclude'] = $list;
1051
+
1052
+ $new['scan_cpt'] = cerber_text2array( $new['scan_cpt'], "\n" );
1053
+ $new['scan_uext'] = cerber_text2array( $new['scan_uext'], "," );
1054
+
1055
+ return $new;
1056
+ }
1057
+
1058
  /**
1059
  * Let's sanitize them all
1060
  * @since 4.1
1235
  'nofeeds' => 0,
1236
  'norest' => 0,
1237
  'restauth' => 0,
1238
+ 'restwhite' => 'oembed',
1239
  'hashauthor' => 0,
1240
  'cleanhead' => 1,
1241
  ),
1285
  ),
1286
  CERBER_OPT_T => array(
1287
  'tienabled' => '1',
1288
+ 'tiipwhite' => 0,
1289
  'tiwhite' => '',
1290
  'timode' => '1',
1291
  'tinocrabs' => '1',
1296
  'ticandy' => 0,
1297
  'tithreshold' => '',
1298
  'tikeeprec' => 7,
1299
+ ),
1300
+ CERBER_OPT_S => array(
1301
+ 'scan_cpt' => '',
1302
+ 'scan_uext' => '',
1303
+ 'scan_exclude' => '',
1304
+ 'scan_tmp' => '1',
1305
+ 'scan_sess' => '1',
1306
+ 'scan_qcleanup' => '30',
1307
+ )
1308
  );
1309
  if ( $field ) {
1310
  foreach ( $all_defaults as $option ) {
whois.php CHANGED
@@ -167,7 +167,9 @@ function cerber_parse_whois_data($txt){
167
  *
168
  */
169
  function make_whois_request($server, $ip) {
170
- if (!$f = fsockopen( $server, 43, $errno, $errstr, WHOIS_IO_TIMEOUT )) return array('error'=>$errstr.' (WHOIS: '.$server.').');
 
 
171
  #Set the timeout for answering
172
  if (!stream_set_timeout($f,WHOIS_IO_TIMEOUT)) return array('error'=>'WHOIS: Unable to set IO timeout.');
173
  #Send the IP address to the whois server
167
  *
168
  */
169
  function make_whois_request($server, $ip) {
170
+ if ( ! $f = @fsockopen( $server, 43, $errno, $errstr, WHOIS_IO_TIMEOUT ) ) {
171
+ return array( 'error' => 'Network error: ' . $errstr . ' (WHOIS server: ' . $server . ').' );
172
+ }
173
  #Set the timeout for answering
174
  if (!stream_set_timeout($f,WHOIS_IO_TIMEOUT)) return array('error'=>'WHOIS: Unable to set IO timeout.');
175
  #Send the IP address to the whois server
wp-cerber.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
- Plugin Name: WP Cerber Security & Antispam
4
  Plugin URI: https://wpcerber.com
5
  Description: Protects WordPress against brute force attacks, bots and hackers. Antispam protection with the Cerber antispam engine and reCAPTCHA. Comprehensive control of user and bot activity. Restrict login by IP access lists. Limit login attempts. Know more: <a href="https://wpcerber.com">wpcerber.com</a>.
6
  Author: Gregory
7
  Author URI: https://wpcerber.com
8
- Version: 6.7.5
9
  Text Domain: wp-cerber
10
  Domain Path: /languages
11
  Network: true
@@ -31,7 +31,7 @@
31
 
32
  */
33
 
34
- define( 'CERBER_VER', '6.7.5' );
35
 
36
  function cerber_plugin_file() {
37
  return __FILE__;
@@ -46,7 +46,12 @@ function cerber_plugin_data() {
46
  }
47
 
48
  function cerber_plugin_dir_url() {
49
- return plugin_dir_url( __FILE__ );
 
 
 
 
 
50
  }
51
 
52
  function cerber_get_plugins_dir() {
1
  <?php
2
  /*
3
+ Plugin Name: WP Cerber Security, Antispam & Malware Scan
4
  Plugin URI: https://wpcerber.com
5
  Description: Protects WordPress against brute force attacks, bots and hackers. Antispam protection with the Cerber antispam engine and reCAPTCHA. Comprehensive control of user and bot activity. Restrict login by IP access lists. Limit login attempts. Know more: <a href="https://wpcerber.com">wpcerber.com</a>.
6
  Author: Gregory
7
  Author URI: https://wpcerber.com
8
+ Version: 7.0
9
  Text Domain: wp-cerber
10
  Domain Path: /languages
11
  Network: true
31
 
32
  */
33
 
34
+ define( 'CERBER_VER', '7.0' );
35
 
36
  function cerber_plugin_file() {
37
  return __FILE__;
46
  }
47
 
48
  function cerber_plugin_dir_url() {
49
+ static $ret = null;
50
+ if ( $ret === null ) {
51
+ $ret = plugin_dir_url( __FILE__ );
52
+ }
53
+
54
+ return $ret;
55
  }
56
 
57
  function cerber_get_plugins_dir() {