added tips to lamer.bash help
[mirrors/Programs.git] / php / skripty / rada_crack2.php
1 <?php
2 $start = 0;
3 $stop = 99;
4 $length = strlen($stop);
5 $base = 10;
6
7 //Banner
8 //echo("Please wait, while computing...\n\n");
9
10 //init
11 srand(time());
12 $rada = "";
13 $notfoundlast = -3;
14 $error = 1;
15 $origstop = $stop;
16
17 while($error) {
18
19 $stop = $origstop+rand(0,10);
20
21 for($i=$start;$i<=$stop;$i++) {
22 $bi = $i;
23 $i = base_convert($i, 10, $base);
24 if(strpos($rada, $i) == 0) {
25
26 if( $i[0] == $rada[strlen($rada)-1] ) {
27 $i = substr($i, 1);
28 $rada = $rada.$i;
29 } elseif( $rada[0] == $i[strlen($i)-1] ) {
30 $rada = substr($rada, 1);
31 $rada = $i.$rada;
32 } else {
33 if(rand(0,1)) {
34 $rada = $i.$rada;
35 } else {
36 $rada = $rada.$i;
37 }
38 }
39
40 //echo($i);
41 $i = $bi;
42 }
43 }
44
45 for($i=0;$i<(strlen($rada)-$length);$i++) {
46 $sub = substr($rada, $i, $length);
47 for($x=0;$x<$length;$x++) {
48 $rada[($i+$x)] = "R";
49
50 }
51 $rada = str_replace($sub, "", $rada);
52
53 $replace="";
54 for($x=0;$x<$length;$x++) {
55 $replace = $replace."R";
56 }
57
58 $rada = str_replace($replace, $sub, $rada);
59 }
60
61 //echo($rada);
62
63 //Test
64 //echo("\n\n");
65 $error = 0;
66 $notfound = 0;
67 for($i=$start;$i<=$stop;$i++) {
68 $bi = $i;
69 $i = base_convert($i, 10, $base);
70 if(!eregi($i, $rada)) {
71 //echo("Not found: $i\n");
72
73 if( $i[0] == $rada[strlen($rada)-1] ) {
74 $i = substr($i, 1);
75 $rada = $rada.$i;
76 } elseif( $rada[0] == $i[strlen($i)-1] ) {
77 $rada = substr($rada, 1);
78 $rada = $i.$rada;
79 } else {
80 if(rand(0,1)) {
81 $rada = $i.$rada;
82 } else {
83 $rada = $rada.$i;
84 }
85 }
86
87 $error = 1;
88 $notfound++;
89 }
90 $i = $bi;
91 }
92 //echo("Total not found: $notfound\n");
93 if($notfoundlast == $notfound) { $error = 0; }
94 $notfoundlast = $notfound;
95
96 }
97
98 for($i=$start;$i<=$stop;$i++) {
99 if(!eregi($i, $rada)) {
100 $rada = $rada.$i;
101 }
102 }
103
104 echo("\n\n");
105 echo($rada);
106 //system("pause");
107
108 /*
109 0-99:8970684924807965464133322998867361605944383525181110958785777637155047403128219391753027262000142345666906
110 :9084787636241342213919946403730181714887749279538935855325108368660504433128211675657061524298202326454759697280
111 :9594403292141101847565345422718137390898872605749946682585030241916233631528355170969780912038434861646767793100
112 */
This page took 0.431762 seconds and 4 git commands to generate.