PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 3.0.3
Wordfence Security – Firewall, Malware Scan, and Login Security v3.0.3
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 13 years ago .htaccess 14 years ago Diff.php 13 years ago IPTraf.php 13 years ago diffResult.php 13 years ago email_genericAlert.php 13 years ago email_newIssues.php 14 years ago email_unlockRequest.php 14 years ago menu_activity.php 14 years ago menu_blockedIPs.php 13 years ago menu_options.php 13 years ago menu_scan.php 13 years ago sysinfo.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 wfConfig.php 13 years ago wfCrawl.php 13 years ago wfDB.php 13 years ago wfDict.php 14 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 13 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
182 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 HTTPHeaders text,
56 KEY k1(ctime),
57 KEY k2(IP, ctime)
58 ) default charset=latin1",
59 "wfIssues" => "(
60 id int UNSIGNED NOT NULL auto_increment PRIMARY KEY,
61 time int UNSIGNED NOT NULL,
62 status varchar(10) NOT NULL,
63 type varchar(20) NOT NULL,
64 severity tinyint UNSIGNED NOT NULL,
65 ignoreP char(32) NOT NULL,
66 ignoreC char(32) NOT NULL,
67 shortMsg varchar(255) NOT NULL,
68 longMsg text,
69 data text
70 ) default charset=utf8",
71 "wfLeechers" => "(
72 eMin int UNSIGNED NOT NULL,
73 IP int UNSIGNED NOT NULL,
74 hits int UNSIGNED NOT NULL,
75 PRIMARY KEY k1(eMin, IP)
76 ) default charset=latin1",
77 "wfLockedOut" => "(
78 IP int UNSIGNED PRIMARY KEY,
79 blockedTime int UNSIGNED NOT NULL,
80 reason varchar(255) NOT NULL,
81 lastAttempt int UNSIGNED default 0,
82 blockedHits int UNSIGNED default 0
83 ) default charset=utf8",
84 "wfLocs" => "(
85 IP int UNSIGNED NOT NULL PRIMARY KEY,
86 ctime int UNSIGNED NOT NULL,
87 failed tinyint UNSIGNED NOT NULL,
88 city varchar(255) default '',
89 region varchar(255) default '',
90 countryName varchar(255) default '',
91 countryCode char(2) default '',
92 lat float(10,7) default 0,
93 lon float(10,7) default 0
94 ) default charset=utf8",
95 "wfLogins" => "(
96 id int UNSIGNED auto_increment PRIMARY KEY,
97 ctime DOUBLE(17,6) UNSIGNED NOT NULL,
98 fail tinyint UNSIGNED NOT NULL,
99 action varchar(40) NOT NULL,
100 username varchar(255) NOT NULL,
101 userID int UNSIGNED NOT NULL,
102 IP int UNSIGNED NOT NULL,
103 UA text,
104 KEY k1(IP, fail)
105 ) default charset=utf8",
106 "wfReverseCache" => "(
107 IP int UNSIGNED PRIMARY KEY,
108 host varchar(255) NOT NULL,
109 lastUpdate int UNSIGNED NOT NULL
110 ) default charset=latin1",
111 "wfScanners" => "(
112 eMin int UNSIGNED NOT NULL,
113 IP int UNSIGNED NOT NULL,
114 hits smallint UNSIGNED NOT NULL,
115 PRIMARY KEY k1(eMin, IP)
116 ) default charset=latin1",
117 "wfThrottleLog" => "(
118 IP int UNSIGNED NOT NULL PRIMARY KEY,
119 startTime int UNSIGNED NOT NULL,
120 endTime int UNSIGNED NOT NULL,
121 timesThrottled int UNSIGNED NOT NULL,
122 lastReason varchar(255) NOT NULL,
123 KEY k2(endTime)
124 ) default charset=utf8",
125 "wfStatus" => "(
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 'wfFileQueue' => "(
148 id int UNSIGNED NOT NULL auto_increment PRIMARY KEY,
149 filename text
150 ) default charset=utf8"
151 );
152 private $db = false;
153 private $prefix = 'wp_';
154 public function __construct($dbhost = false, $dbuser = false, $dbpassword = false, $dbname = false){
155 if($dbhost){ //for testing
156 $this->db = new wfDB(false, $dbhost, $dbuser, $dbpassword, $dbname);
157 $this->prefix = 'wp_';
158 } else {
159 global $wpdb;
160 $this->db = new wfDB();
161 $this->prefix = $wpdb->base_prefix;
162 }
163 }
164 public function dropAll(){
165 foreach($this->tables as $table => $def){
166 $this->db->query("drop table if exists " . $this->prefix . $table);
167 }
168 }
169 public function createAll(){
170 foreach($this->tables as $table => $def){
171 $this->db->query("create table IF NOT EXISTS " . $this->prefix . $table . " " . $def);
172 }
173 }
174 public function create($table){
175 $this->db->query("create table IF NOT EXISTS " . $this->prefix . $table . " " . $this->tables[$table]);
176 }
177 public function drop($table){
178 $this->db->query("drop table if exists " . $this->prefix . $table);
179 }
180 }
181 ?>
182