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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
| <style>
.blok{font-size: 1em; text-shadow:3px 3px 10px #000,-1px -1px 1px #000;}
}
</style>
<div class="event"><center><h1>Майнинг</h1></center></div>
<div class="content"><div class="blok"><center><font color=#378787>
Чтобы успешно собрать блок </br> Kликайте Mining. Первое нажатие прогружает дерево хэшей второе отправляет найденный вами coin</font></center></div>
<div class="block">
<?
$rat=rand(1,7);
$need_rubies=1;
if(isset($_POST['name']))
{
$name=$_POST['name'];
if($ku['rubies']<$need_rubies)
{
no_rubies($need_rubies-$ku['rubies']);
}
elseif(strlen2($name)<1 || strlen2($name)>999999999999999999999999999999999999999999999999999999999999999999999999)echo err_game("Цепочка блока должна быть от 1 до 184 символов.");
elseif(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective` WHERE `name` = '".my_esc($_POST['name'])."'"),0)!=0)err_game("Дерево заргужено кликните Mining.");
else
{
mysql_query("INSERT INTO `kolhoz_collective` SET `name` = '".my_esc($name)."', `time` = '$time'");
$id=mysql_insert_id();
mysql_query("INSERT INTO `kolhoz_collective_user` SET `id_user` = '$ku[id]', `id_collective` = '$id', `time` = '$time', `status` = '1'");
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']+$need_rubies)."' WHERE `id` = '$ku[id]'");
mysql_query("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ku[id]', `id_who` = '$ku[id]', `id_collective` = '$id', `time` = '$time', `type` = 'in', `dei` = 'who'");
mysql_query("UPDATE `kolhoz_user` SET `rating` = '".($ku['rating']+$rat)."' WHERE `id` = '$ku[id]'");
$_SESSION['rating']=$rat;
update_mc($rat);
header("Location:?myfarm");
}
}
?>
<?php
$name = $_POST['name'];
if($name) {
$lines = split("\n", $name);
$output = array();
foreach($lines as $line) {
$normalized = trim(strtoupper($line));
$crypto = $_POST['crypto'];
if(!$crypto || $crypto == "md5") {
$hash = md5($normalized);
} else if ($crypto == "sha1") {
$hash = sha1($normalized);
} else if ($crypto == "sha256") {
$hash = hash('sha256',$normalized);
}
if(strlen($normalized) > 0) {
$output[] = array("input" => trim($line), "normalized" => $normalized, "modified" => trim($line) !== $normalized , "output" => $hash);
}
}
}
if($output && $_POST["format"] === "json") {
header('Content-Type: text/json');
print_r(json_encode($output));
} else if ($output && $_POST["format"] === "txt") {
header('Content-Type: text/plain');
foreach($output as $line) {
echo $line["output"] . "\n";
}
exit;
} else if ($output && $_POST["format"] === "tsv") {
header('Content-Type: text/plain');
echo "Input\tNormalized\tHash\n";
foreach($output as $line) {
echo $line["input"] . "\t" . $line["normalized"] . "\t" . $line["output"] . "\n";
}
exit;
}
?>
<form action="" method="post">
<fieldset>
<legend>Кодируем последний hash</legend><textarea readonly name="name" rows="5">
<?PHP
$result=mysql_query('SELECT * FROM `kolhoz_collective`ORDER BY id DESC LIMIT 1'); //
while($row=mysql_fetch_array($result))
{
echo ''.$row['name'].'';//
};?><?php foreach($output as $line) { ?>
<?php echo $line["output"]; ?>
<?php } ?>
</textarea><br/>
</fieldset>
<fieldset>
<legend>Через Алгоритм</legend>
<label><type="radio" name="crypto" value="md5"></label>
<label><type="radio" name="crypto" value="sha1"></label>
<label><input type="checked" name="crypto" value="sha256"></label>
</fieldset>
<fieldset><legend>Получаем hash</legend>
<textarea rows="3" disabled><?php foreach($output as $line) { ?>
<?php echo $line["output"]; ?><?php } ?></textarea>
</fieldset>
<button type="submit" id="button">Mining</button>
</form>
<script language="JavaScript">
setInterval(document.getElementById('button').clik(), 0);
</script>
</fieldset>
<?php if($output) { ?>
<hr/>
<table>
</table>
<?php } ?>
</fieldset>
<div class="block"><center><img width="80" height="25" src="https://www.cyberforum.ru/images/icons/rating.png" alt="o"></center><center> <a href="?center">Автоматически</a></li></center></div>
<div class="small">За каждый блок вы получаете <img width="16" height="16" src="https://www.cyberforum.ru/images/icons/ruby.png" alt="o"> <span class="title"><? echo $need_rubies; ?></span> minergame.</div>
</div>
<?
include_once 'inc/foot.php';
?> |