More strict ownership asserts
[mirrors/Programs.git] / php / skripty / rada_crack.php
1 <?php
2 $start = 0;
3 $stop = 9999;
4 $length = 4;
5
6 $rada = "";
7 $notfoundlast = -3;
8 $error = 1;
9
10 while($error) {
11
12 for($i=$start;$i<=$stop;$i++) {
13 //$i = base_convert($i, 10, 2);
14 if(strpos($rada, $i) == 0) {
15 $rada = "$rada"."$i";
16 //echo($i);
17 }
18 }
19
20 for($i=0;$i<(strlen($rada)-$length);$i++) {
21 $sub = substr($rada, $i, $length);
22 for($x=0;$x<$length;$x++) {
23 $rada[($i+$x)] = "R";
24
25 }
26 $rada = str_replace($sub, "", $rada);
27
28 $replace="";
29 for($x=0;$x<$length;$x++) {
30 $replace = $replace."R";
31 }
32
33 $rada = str_replace($replace, $sub, $rada);
34 }
35
36 //echo($rada);
37
38 //Test
39 //echo("\n\n");
40 $error = 0;
41 $notfound = 0;
42 for($i=$start;$i<=$stop;$i++) {
43 if(!eregi($i, $rada)) {
44 //echo("Not found: $i\n");
45 $rada = $rada.$i;
46 $error = 1;
47 $notfound++;
48 }
49 }
50 echo("Not found total: $notfound\n");
51 if($notfoundlast == $notfound) { $error = 0; }
52 $notfoundlast = $notfound;
53 }
54
55 for($i=$start;$i<=$stop;$i++) {
56 if(!eregi($i, $rada)) {
57 $rada = $rada.$i;
58 }
59 }
60
61 echo("\n\n".$rada);
62 //system("pause");
This page took 0.893477 seconds and 4 git commands to generate.