class.bruteForce.php
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
*
* @date 15 Aug 2012,
* @package Login System
*
*/
Class Bruteforce {
/**
* @param int $brute_force_id,
* @param string $username,
* @param string $ip,
* @param int $attempts -> the number of attempts,
* @param int $timeout -> timeout in minutes,
* @param string $insert_datetime
*/
private
$brute_force_id,
$username,
$ip,
$attempts,
$timeout,
$insert_datetime = '0000-00-00 00:00:00';
/**
* @param int $id,
* @return void
*/
public function setBruteForceId($brute_force_id) {
$this->brute_force_id = (int) $brute_force_id;
}
/**
* @param int $username,
* @return void
*/
public function setUsername($username) {
$this->username = (string) $username;
}
/**
* @param string $ip,
* @return void
*/
public function setIp($ip) {
$this->ip = (string) $ip;
}
/**
* @param int $attempts,
* @return void
*/
public function setMaxAttempts($attempts) {
$this->attempts = (int) $attempts;
}
/**
* @param int $timeout,
* @return void
*/
public function setTimeout($timeout) {
$this->timeout = (int) $timeout;
}
/**
* @return int $id
*/
public function getBruteForceId() {
return (int) $this->brute_force_id;
}
/**
* @return int $username
*/
public function getUsername() {
$user = new User();
$user->setUsername($this->username);
return $user->getUsername();
}
/**
* @return string $ip
*/
public function getIp() {
return (string) $this->ip;
}
/**
* @return int $attempts
*/
public function getMaxAttempts() {
return (int) $this->attempts;
}
/**
* @return int $timeout
*/
public function getTimeout() {
return (int) $this->timeout;
}
/**
* @return $insert_datetime
*/
public function getInsertDatetime() {
return (string) preg_match($this->insert_datetime, '(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})') ? $this->insert_datetime : null;
}
}
?>
/**
*
* @date 15 Aug 2012,
* @package Login System
*
*/
Class Bruteforce {
/**
* @param int $brute_force_id,
* @param string $username,
* @param string $ip,
* @param int $attempts -> the number of attempts,
* @param int $timeout -> timeout in minutes,
* @param string $insert_datetime
*/
private
$brute_force_id,
$username,
$ip,
$attempts,
$timeout,
$insert_datetime = '0000-00-00 00:00:00';
/**
* @param int $id,
* @return void
*/
public function setBruteForceId($brute_force_id) {
$this->brute_force_id = (int) $brute_force_id;
}
/**
* @param int $username,
* @return void
*/
public function setUsername($username) {
$this->username = (string) $username;
}
/**
* @param string $ip,
* @return void
*/
public function setIp($ip) {
$this->ip = (string) $ip;
}
/**
* @param int $attempts,
* @return void
*/
public function setMaxAttempts($attempts) {
$this->attempts = (int) $attempts;
}
/**
* @param int $timeout,
* @return void
*/
public function setTimeout($timeout) {
$this->timeout = (int) $timeout;
}
/**
* @return int $id
*/
public function getBruteForceId() {
return (int) $this->brute_force_id;
}
/**
* @return int $username
*/
public function getUsername() {
$user = new User();
$user->setUsername($this->username);
return $user->getUsername();
}
/**
* @return string $ip
*/
public function getIp() {
return (string) $this->ip;
}
/**
* @return int $attempts
*/
public function getMaxAttempts() {
return (int) $this->attempts;
}
/**
* @return int $timeout
*/
public function getTimeout() {
return (int) $this->timeout;
}
/**
* @return $insert_datetime
*/
public function getInsertDatetime() {
return (string) preg_match($this->insert_datetime, '(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})') ? $this->insert_datetime : null;
}
}
?>