PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 5.2.7
Wordfence Security – Firewall, Malware Scan, and Login Security v5.2.7
8.2.2 8.2.1 8.2.0 3.7.1 3.7.2 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.9.1 4.0.1 4.0.2 4.0.3 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.1 5.1.2 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.1 5.3.10 5.3.11 5.3.12 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 6.0.1 6.0.10 6.0.11 6.0.12 6.0.14 6.0.15 6.0.16 6.0.17 6.0.18 6.0.19 6.0.2 6.0.20 6.0.21 6.0.22 6.0.23 6.0.24 6.0.25 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.1 6.1.10 6.1.11 6.1.12 6.1.14 6.1.15 6.1.16 6.1.17 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.1.9 6.2.0 6.2.1 6.2.10 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.3.0 6.3.1 6.3.10 6.3.11 6.3.12 6.3.14 6.3.15 6.3.16 6.3.17 6.3.18 6.3.19 6.3.2 6.3.20 6.3.21 6.3.22 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1.0 7.1.1 7.1.10 7.1.11 7.1.12 7.1.14 7.1.15 7.1.16 7.1.17 7.1.18 7.1.19 7.1.2 7.1.20 7.1.3 7.1.4 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.10.0 7.10.1 7.10.2 7.10.3 7.10.4 7.10.5 7.10.6 7.10.7 7.11.0 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.11.6 7.11.7 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.4.0 7.4.1 7.4.10 7.4.11 7.4.12 7.4.14 7.4.2 7.4.3 trunk 7.4.4 1.1 7.4.5 1.2 7.4.6 1.3 7.4.7 1.3.1 7.4.8 1.3.2 7.4.9 1.3.3 7.5.0 1.4.2 7.5.1 1.4.3 7.5.10 1.4.4 7.5.11 1.4.5 7.5.2 1.4.6 7.5.3 1.4.7 7.5.4 1.4.8 7.5.5 1.5.1 7.5.6 1.5.2 7.5.7 1.5.3 7.5.8 1.5.4 7.5.9 1.5.5 7.6.0 1.5.6 7.6.1 2.0.1 7.6.2 2.0.2 7.7.0 2.0.3 7.7.1 2.0.5 7.8.0 2.0.6 7.8.1 2.0.7 7.8.2 2.1.0 7.9.0 2.1.1 7.9.1 2.1.2 7.9.2 2.1.3 7.9.3 2.1.4 8.0.0 2.1.5 8.0.1 3.0.2 8.0.2 3.0.3 8.0.3 3.0.4 8.0.4 3.0.5 8.0.5 3.0.6 8.1.0 3.0.7 8.1.1 3.0.8 8.1.2 3.0.9 8.1.3 3.1.0 8.1.4 3.1.1 v1.4.1 3.1.2 3.1.4 3.1.6 3.2.1 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.1 3.4.4 3.4.5 3.5.1 3.5.2 3.6.1 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
wordfence / lib / wfSchema.php
wordfence / lib Last commit date
Diff 14 years ago whois 12 years ago .htaccess 14 years ago Diff.php 14 years ago GeoIP.dat 11 years ago IPTraf.php 11 years ago conntest.php 11 years ago dashboard.php 11 years ago diffResult.php 11 years ago email_genericAlert.php 11 years ago email_newIssues.php 11 years ago email_unlockRequest.php 11 years ago menuHeader.php 11 years ago menu_activity.php 11 years ago menu_blockedIPs.php 11 years ago menu_countryBlocking.php 11 years ago menu_options.php 11 years ago menu_rangeBlocking.php 11 years ago menu_scan.php 11 years ago menu_scanSchedule.php 11 years ago menu_sitePerf.php 11 years ago menu_sitePerfStats.php 11 years ago menu_twoFactor.php 11 years ago menu_whois.php 11 years ago pageTitle.php 13 years ago schedWeekEntry.php 12 years ago sysinfo.php 11 years ago unknownFiles.php 11 years ago viewFullActivityLog.php 11 years ago wf503.php 12 years ago wfAPI.php 11 years ago wfAction.php 14 years ago wfArray.php 13 years ago wfBrowscap.php 11 years ago wfBrowscapCache.php 11 years ago wfBulkCountries.php 13 years ago wfCache.php 11 years ago wfConfig.php 11 years ago wfCountryMap.php 13 years ago wfCrawl.php 11 years ago wfDB.php 11 years ago wfDict.php 14 years ago wfGeoIP.php 13 years ago wfIssues.php 11 years ago wfLockedOut.php 13 years ago wfLog.php 11 years ago wfRate.php 14 years ago wfScan.php 11 years ago wfScanEngine.php 11 years ago wfSchema.php 11 years ago wfUnlockMsg.php 11 years ago wfUtils.php 11 years ago wfViewResult.php 11 years ago wordfenceClass.php 11 years ago wordfenceConstants.php 11 years ago wordfenceHash.php 11 years ago wordfenceScanner.php 11 years ago wordfenceURLHoover.php 11 years ago
wfSchema.php
216 lines
1 <?php
2 require_once('wfDB.php');
3 class wfSchema {
4 private $tables = array(
5 "wfBadLeechers" => "(
6 eMin int UNSIGNED NOT NULL,
7 IP int UNSIGNED NOT NULL,
8 hits int UNSIGNED NOT NULL,
9 PRIMARY KEY k1(eMin, IP)
10 ) default charset=latin1",
11 "wfVulnScanners" => "(
12 IP int UNSIGNED PRIMARY KEY,
13 ctime int UNSIGNED NOT NULL,
14 hits int UNSIGNED NOT NULL
15 )",
16 "wfBlocks" => "(
17 IP int UNSIGNED PRIMARY KEY,
18 blockedTime int UNSIGNED NOT NULL,
19 reason varchar(255) NOT NULL,
20 lastAttempt int UNSIGNED default 0,
21 blockedHits int UNSIGNED default 0,
22 wfsn tinyint UNSIGNED default 0,
23 permanent tinyint UNSIGNED default 0,
24 KEY k1(wfsn)
25 ) default charset=utf8",
26 "wfConfig" => "(
27 name varchar(100) PRIMARY KEY NOT NULL,
28 val longblob
29 ) default charset=utf8",
30 "wfCrawlers" => "(
31 IP INT UNSIGNED NOT NULL,
32 patternSig binary(16) NOT NULL,
33 status char(8) NOT NULL,
34 lastUpdate int UNSIGNED NOT NULL,
35 PTR varchar(255) default '',
36 PRIMARY KEY k1(IP, patternSig)
37 ) default charset=latin1",
38 "wfFileChanges" => "(
39 filenameHash char(64) NOT NULL PRIMARY KEY,
40 file varchar(1000) NOT NULL,
41 md5 char(32) NOT NULL
42 ) default charset=utf8",
43 "wfHits" => "(
44 id int UNSIGNED auto_increment PRIMARY KEY,
45 ctime DOUBLE(17,6) UNSIGNED NOT NULL,
46 IP int UNSIGNED NOT NULL,
47 jsRun tinyint default 0,
48 is404 tinyint NOT NULL,
49 isGoogle tinyint NOT NULL,
50 userID int UNSIGNED NOT NULL,
51 newVisit tinyint UNSIGNED NOT NULL,
52 URL text,
53 referer text,
54 UA text,
55 KEY k1(ctime),
56 KEY k2(IP, ctime)
57 ) default charset=latin1",
58 "wfIssues" => "(
59 id int UNSIGNED NOT NULL auto_increment PRIMARY KEY,
60 time int UNSIGNED NOT NULL,
61 status varchar(10) NOT NULL,
62 type varchar(20) NOT NULL,
63 severity tinyint UNSIGNED NOT NULL,
64 ignoreP char(32) NOT NULL,
65 ignoreC char(32) NOT NULL,
66 shortMsg varchar(255) NOT NULL,
67 longMsg text,
68 data text
69 ) default charset=utf8",
70 "wfLeechers" => "(
71 eMin int UNSIGNED NOT NULL,
72 IP int UNSIGNED NOT NULL,
73 hits int UNSIGNED NOT NULL,
74 PRIMARY KEY k1(eMin, IP)
75 ) default charset=latin1",
76 "wfLockedOut" => "(
77 IP int UNSIGNED PRIMARY KEY,
78 blockedTime int UNSIGNED NOT NULL,
79 reason varchar(255) NOT NULL,
80 lastAttempt int UNSIGNED default 0,
81 blockedHits int UNSIGNED default 0
82 ) default charset=utf8",
83 "wfLocs" => "(
84 IP int UNSIGNED NOT NULL PRIMARY KEY,
85 ctime int UNSIGNED NOT NULL,
86 failed tinyint UNSIGNED NOT NULL,
87 city varchar(255) default '',
88 region varchar(255) default '',
89 countryName varchar(255) default '',
90 countryCode char(2) default '',
91 lat float(10,7) default 0,
92 lon float(10,7) default 0
93 ) default charset=utf8",
94 "wfLogins" => "(
95 id int UNSIGNED auto_increment PRIMARY KEY,
96 ctime DOUBLE(17,6) UNSIGNED NOT NULL,
97 fail tinyint UNSIGNED NOT NULL,
98 action varchar(40) NOT NULL,
99 username varchar(255) NOT NULL,
100 userID int UNSIGNED NOT NULL,
101 IP int UNSIGNED NOT NULL,
102 UA text,
103 KEY k1(IP, fail)
104 ) default charset=utf8",
105 "wfReverseCache" => "(
106 IP int UNSIGNED PRIMARY KEY,
107 host varchar(255) NOT NULL,
108 lastUpdate int UNSIGNED NOT NULL
109 ) default charset=latin1",
110 "wfScanners" => "(
111 eMin int UNSIGNED NOT NULL,
112 IP int UNSIGNED NOT NULL,
113 hits smallint UNSIGNED NOT NULL,
114 PRIMARY KEY k1(eMin, IP)
115 ) default charset=latin1",
116 "wfThrottleLog" => "(
117 IP int UNSIGNED NOT NULL PRIMARY KEY,
118 startTime int UNSIGNED NOT NULL,
119 endTime int UNSIGNED NOT NULL,
120 timesThrottled int UNSIGNED NOT NULL,
121 lastReason varchar(255) NOT NULL,
122 KEY k2(endTime)
123 ) default charset=utf8",
124 "wfStatus" => "(
125 id bigint UNSIGNED NOT NULL auto_increment PRIMARY KEY,
126 ctime DOUBLE(17,6) UNSIGNED NOT NULL,
127 level tinyint UNSIGNED NOT NULL,
128 type char(5) NOT NULL,
129 msg varchar(1000) NOT NULL,
130 KEY k1(ctime),
131 KEY k2(type)
132 ) default charset=utf8",
133 'wfNet404s' => "(
134 sig binary(16) NOT NULL PRIMARY KEY,
135 ctime int UNSIGNED NOT NULL,
136 URI varchar(1000) NOT NULL,
137 KEY k1(ctime)
138 ) default charset=utf8",
139 'wfHoover' => "(
140 id int UNSIGNED auto_increment PRIMARY KEY,
141 owner text,
142 host text,
143 path text,
144 hostKey binary(4),
145 KEY k2(hostKey)
146 ) default charset=utf8",
147 'wfFileMods' => "(
148 filenameMD5 binary(16) NOT NULL PRIMARY KEY,
149 filename varchar(1000) NOT NULL,
150 knownFile tinyint UNSIGNED NOT NULL,
151 oldMD5 binary(16) NOT NULL,
152 newMD5 binary(16) NOT NULL
153 ) default charset=utf8",
154 'wfBlocksAdv' => "(
155 id int UNSIGNED NOT NULL auto_increment PRIMARY KEY,
156 blockType char(2) NOT NULL,
157 blockString varchar(255) NOT NULL,
158 ctime int UNSIGNED NOT NULL,
159 reason varchar(255) NOT NULL,
160 totalBlocked int UNSIGNED default 0,
161 lastBlocked int UNSIGNED default 0
162 ) default charset=utf8"
163 /*
164 'wfPerfLog' => "(
165 id int UNSIGNED NOT NULL auto_increment PRIMARY KEY,
166 IP int UNSIGNED NOT NULL,
167 userID int UNSIGNED NOT NULL,
168 UA varchar(1000) NOT NULL,
169 URL varchar(1000) NOT NULL,
170 ctime int UNSIGNED NOT NULL,
171 fetchStart int UNSIGNED NOT NULL,
172 domainLookupStart int UNSIGNED NOT NULL,
173 domainLookupEnd int UNSIGNED NOT NULL,
174 connectStart int UNSIGNED NOT NULL,
175 connectEnd int UNSIGNED NOT NULL,
176 requestStart int UNSIGNED NOT NULL,
177 responseStart int UNSIGNED NOT NULL,
178 responseEnd int UNSIGNED NOT NULL,
179 domReady int UNSIGNED NOT NULL,
180 loaded int UNSIGNED NOT NULL,
181 KEY k1(ctime)
182 ) default charset=utf8"
183 */
184 );
185 private $db = false;
186 private $prefix = 'wp_';
187 public function __construct($dbhost = false, $dbuser = false, $dbpassword = false, $dbname = false){
188 /*
189 if($dbhost){ //for testing
190 $this->db = new wfDB(false, $dbhost, $dbuser, $dbpassword, $dbname);
191 $this->prefix = 'wp_';
192 } else {
193 */
194 global $wpdb;
195 $this->db = new wfDB();
196 $this->prefix = $wpdb->base_prefix;
197 }
198 public function dropAll(){
199 foreach($this->tables as $table => $def){
200 $this->db->queryWrite("drop table if exists " . $this->prefix . $table);
201 }
202 }
203 public function createAll(){
204 foreach($this->tables as $table => $def){
205 $this->db->queryWrite("create table IF NOT EXISTS " . $this->prefix . $table . " " . $def);
206 }
207 }
208 public function create($table){
209 $this->db->queryWrite("create table IF NOT EXISTS " . $this->prefix . $table . " " . $this->tables[$table]);
210 }
211 public function drop($table){
212 $this->db->queryWrite("drop table if exists " . $this->prefix . $table);
213 }
214 }
215 ?>
216