-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrack.php
90 lines (71 loc) · 2.44 KB
/
crack.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
<?php
set_time_limit(0);
include 'function.php';
$lang = get_language();
$str = $_POST['string'];
$array_hash = hash_algos();
$nb_result = 0;
class result
{
public $name;
public $hash_type;
public function result($str, $hash_type)
{
$this->str = $str;
$this->hash_type = $hash_type;
}
}
$mysqli = mysqli_connect($host, $login, $pass, $db);
for ($i = 0; $i < count($array_hash); $i++) {
if ($_POST[$array_hash[$i]] == 1) {
$query = 'SELECT `string` FROM `cracktool` WHERE `'.$array_hash[$i]."`='".$str."'";
$result = mysqli_query($mysqli, $query);
if (mysqli_num_rows($result) > 0) {
$nb_result++;
$array_mysql = mysqli_fetch_assoc($result);
$result_crack[$nb_result] = new result($array_mysql['string'], $array_hash[$i]);
}
}
}
if ($nb_result > 0) {
echo '<p>
'.get_text('crack of', $lang).' <span id="red">'.$str.'</span> (';
for ($i = 0; $i < count($array_hash); $i++) {
if ($_POST[$array_hash[$i]] == 1) {
echo ' '.$array_hash[$i].' ';
}
}
echo ')
</p>
<table>
<tr> <th>'.get_text('string', $lang).'</th> <td> </td> <th>'.get_text('hash type', $lang).'</th> </tr>
<tr> <td></td> <td></td> <td></td> </tr>';
for ($i = 1; $i < count($result_crack) + 1; $i++) {
echo '<tr> <td>'.$result_crack[$i]->str.'</td> <td> </td> <td>'.$result_crack[$i]->hash_type.'</td> </tr>';
}
echo '</table>';
$query = "INSERT INTO `history` (`string`,`action`) VALUES ('".$str."','crack_succeed')";
mysqli_query($mysqli, $query);
} else {
echo '<p>
'.get_text('crack of', $lang).' <span id="red">'.$str.'</span> (';
for ($i = 0; $i < count($array_hash); $i++) {
if ($_POST[$array_hash[$i]] == 1) {
echo ' '.$array_hash[$i].' ';
}
}
echo ')
<br /><br />
'.get_text('no solution', $lang).'
<br /><br />
'.get_text('msg email', $lang).'
<br />
<input type="hidden" id="zone_crack_email_hash" value="'.$str.'"/>
email: <input type="text" id="zone_crack_email" size="40" maxlength="128" onkeyup="behavior_zone_crack_email();"/>
<input type="button" id="zone_crack_btn_email" value="OK" disabled="disabled" onclick="behavior_zone_crack_btn_email();" />
</p>';
$query = "INSERT INTO `history` (`string`,`action`) VALUES ('".$str."','crack_failed')";
mysqli_query($mysqli, $query);
}
mysqli_close($mysqli);