PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 3.2.4
Wordfence Security – Firewall, Malware Scan, and Login Security v3.2.4
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 .htaccess 14 years ago Diff.php 14 years ago GeoIP.dat 13 years ago IPTraf.php 13 years ago diffResult.php 14 years ago email_genericAlert.php 14 years ago email_newIssues.php 14 years ago email_unlockRequest.php 14 years ago menu_activity.php 13 years ago menu_blockedIPs.php 13 years ago menu_countryBlocking.php 13 years ago menu_options.php 13 years ago menu_scan.php 13 years ago menu_scanSchedule.php 13 years ago schedWeekEntry.php 13 years ago sysinfo.php 14 years ago unknownFiles.php 13 years ago viewFullActivityLog.php 13 years ago wf503.php 13 years ago wfAPI.php 13 years ago wfAction.php 14 years ago wfArray.php 13 years ago wfBrowscap.php 14 years ago wfBrowscapCache.php 14 years ago wfBulkCountries.php 13 years ago wfConfig.php 13 years ago wfCountryMap.php 13 years ago wfCrawl.php 13 years ago wfDB.php 13 years ago wfDict.php 14 years ago wfGeoIP.php 13 years ago wfIssues.php 13 years ago wfLockedOut.php 14 years ago wfLog.php 13 years ago wfModTracker.php 14 years ago wfRate.php 14 years ago wfScanEngine.php 13 years ago wfSchema.php 13 years ago wfUnlockMsg.php 14 years ago wfUtils.php 13 years ago wfViewResult.php 14 years ago wordfenceClass.php 13 years ago wordfenceConstants.php 13 years ago wordfenceHash.php 13 years ago wordfenceScanner.php 13 years ago wordfenceURLHoover.php 13 years ago
wfSchema.php
181 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 ctime DOUBLE(17,6) UNSIGNED NOT NULL,
126 level tinyint UNSIGNED NOT NULL,
127 type char(5) NOT NULL,
128 msg varchar(1000) NOT NULL,
129 KEY k1(ctime),
130 KEY k2(type)
131 ) default charset=utf8",
132 'wfNet404s' => "(
133 sig binary(16) NOT NULL PRIMARY KEY,
134 ctime int UNSIGNED NOT NULL,
135 URI varchar(1000) NOT NULL,
136 KEY k1(ctime)
137 ) default charset=utf8",
138 'wfHoover' => "(
139 id int UNSIGNED auto_increment PRIMARY KEY,
140 owner text,
141 host text,
142 path text,
143 hostKey binary(4),
144 KEY k2(hostKey)
145 ) default charset=utf8",
146 'wfFileQueue' => "(
147 id int UNSIGNED NOT NULL auto_increment PRIMARY KEY,
148 filename text
149 ) default charset=utf8"
150 );
151 private $db = false;
152 private $prefix = 'wp_';
153 public function __construct($dbhost = false, $dbuser = false, $dbpassword = false, $dbname = false){
154 if($dbhost){ //for testing
155 $this->db = new wfDB(false, $dbhost, $dbuser, $dbpassword, $dbname);
156 $this->prefix = 'wp_';
157 } else {
158 global $wpdb;
159 $this->db = new wfDB();
160 $this->prefix = $wpdb->base_prefix;
161 }
162 }
163 public function dropAll(){
164 foreach($this->tables as $table => $def){
165 $this->db->query("drop table if exists " . $this->prefix . $table);
166 }
167 }
168 public function createAll(){
169 foreach($this->tables as $table => $def){
170 $this->db->query("create table IF NOT EXISTS " . $this->prefix . $table . " " . $def);
171 }
172 }
173 public function create($table){
174 $this->db->query("create table IF NOT EXISTS " . $this->prefix . $table . " " . $this->tables[$table]);
175 }
176 public function drop($table){
177 $this->db->query("drop table if exists " . $this->prefix . $table);
178 }
179 }
180 ?>
181