-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlarge_tile.php
266 lines (204 loc) · 6.78 KB
/
large_tile.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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<html>
<head>
<!-- CSS -->
<style type="text/css">
body{
background-color: black;
color: white;
}
#RollSelect{
width: 700px;
margin: 0 auto;
}
.roll {
float:left;
width: 80px;
height:100px; /* Added some room so the text fits underneath */
text-align: center;
margin-right:1em;
}
.roll p {
font-size: 1.0em; /* halfsize */
}
.roll img {
width: 80px;
height: 80px;
}
form{
display: inline;
}
</style>
<!-- JavaScript -->
<script type="text/javascript">
//sebkinne
$.fn.AJAXifyFormChecker = function(funct){
this.each(function(i,el){
var formData = new FormData();
var checkbox_array = new Array();
$("input,select,textarea",el).each(function(i,formEl){
if(formEl.type == "file"){
for(x=0; x<formEl.files.length; x++){
formData.append(formEl.name,formEl.files[x]);
}
}
else if(formEl.type == "checkbox"){
if(typeof checkbox_array[formEl.name] === "undefined"){
if(formEl.checked){
checkbox_array[formEl.name] = new Array();
checkbox_array[formEl.name].push(formEl.value);
}
}else{
if(formEl.checked){
checkbox_array[formEl.name].push(formEl.value);
}
}
}else{
formData.append(formEl.name, formEl.value);
}
});
if(Object.keys(checkbox_array).length != 0){
for (var key in checkbox_array) {
console.log(checkbox_array[key]);
formData.append(key,checkbox_array[key]);
}
}
$.ajax({
url: el.action,
data: formData,
cache: false,
contentType: false,
processData: false,
async: false,
type: el.method,
success: funct
});
});
return this;
}
//Infusion information link.
function infusionInfo(){
popup('<center><h3>RandomRoll</h3><br/>Version 1.3<br/>Made by Foxtrot<br/>Credits to petertfm for original base!<br/>Sebkinne for custom AJAX Forms!<br/>newbi3 for helping with the roll displayer.<br/><a href="https://forums.hak5.org/index.php?/topic/30594-support-randomroll/">RandomRoll Support Thread</a></font></center>');
}
//Start RandomRoll.
function startRandomRoll(){
notify('RandomRoll :: RandomRoll Started.');
}
function stopRandomRoll(){
notify('RandomRoll :: RandomRoll Stopped.');
}
// Rolls Rolls and More Rolls.
function rollsCheckBoxSubmit(data){
popup(data);
}
function rollSelectForm(data){
popup(data);
}
function removeAllRolls(){
notify('RandomRoll :: All Rolls Removed.');
}
function untickRolls(){
document.getElementById('checkbox').checked = false;
document.getElementById('checkbox1').checked = false;
document.getElementById('checkbox2').checked = false;
document.getElementById('checkbox3').checked = false;
document.getElementById('checkbox4').checked = false;
document.getElementById('checkbox5').checked = false;
document.getElementById('checkbox6').checked = false;
}
</script>
</head>
<body>
<!-- Needed Spacing -->
<center><a href="JAVASCRIPT:infusionInfo()">[Information]</a></center>
<br/>
<br/>
<!-- Control Area -->
<fieldset>
<legend>RandomRoll : Control</legend>
<center>
<!-- Toggle RandomRoll -->
<form class="formNoBreak" name="StartRandomRoll" action="/components/infusions/randomroll/functions.php" method="POST" onSubmit="$(this).AJAXifyFormChecker(startRandomRoll); return false;"><input type="submit" name="startRandomRollSubmit" value="Start RandomRoll"></form>
<form class="formNoBreak" name="StopRandomRoll" action="/components/infusions/randomroll/functions.php" method="POST" onSubmit="$(this).AJAXifyFormChecker(stopRandomRoll); return false;"><input type="submit" name="stopRandomRollSubmit" value="Stop RandomRoll"></form>
</center>
</fieldset>
<br/>
<br/>
<!-- Roll Area -->
<fieldset>
<legend>RandomRoll : Rolls</legend>
<center>
<div id="wrapper">
<form align="center" class="formNoBreak" name="rollsSelectForm" action="/components/infusions/randomroll/functions.php" method="POST" onSubmit="$(this).AJAXifyFormChecker(rollSelectForm); return false;">
<div class="RollSelect">
<div class="roll">
<input type="checkbox" id="checkbox" name="checkbox" value="rickroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/rickthumbnail.jpg" />
<p>RickRoll</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox1" name="checkbox" value="rcmroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/rcmthumbnail.jpg" />
<p>RCM</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox2" name="checkbox" value="nyanroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/nyanthumbnail.jpg" />
<p>Nyan Cat</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox3" name="checkbox" value="pbjtroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/pbjthumbnail.png" />
<p>PBJT</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox4" name="checkbox" value="trollroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/trollthumbnail.jpg" />
<p>Trolololol</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox5" name="checkbox" value="bsodroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/bsodthumbnail.jpg" />
<p>BSOD</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox6" name="checkbox" value="afroroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/afrothumbnail.png" />
<p>Afro</p>
</div>
<div class="roll">
<input type="checkbox" id="checkbox7" name="checkbox" value="nedryroll" />
<img src="/components/infusions/randomroll/assets/files/thumbnails/nedrythumbnail.jpg" />
<p>Nedry</p>
</div>
<!-- Submit Roll Selection -->
<input valign="middle" class="rollSubmit" type="submit" name="rollsCheckBoxSubmit" value="Apply Selected Rolls." />
</form>
<form align="center" class="formNoBreak" name="rollsRemove" action="/components/infusions/randomroll/functions.php" method="POST" onSubmit="$(this).AJAXifyFormChecker(removeAllRolls); return false;">
<input valign="middle" class="rollSubmit" type="submit" onClick="untickRolls()" name="rollsRemoveSubmit" value="Remove Rolls." />
</form>
</div>
</div>
<!-- Spacing -->
<br/><br/><br/><br/><br/><br/><br/>
</center>
</fieldset>
<br/>
<br/>
<!-- Logging Area -->
<fieldset>
<legend>Log Output</legend>
<div id="displayLog">
<?php
exec('pgrep dnsspoof', $running, $return);
if($return == 0) {
exec("cat /pineapple/components/infusions/randomroll/assets/files/dnsspoof.log", $output);
foreach($output as $line){
echo $line."<br />";
}
}
else {
echo("DNSSpoof has not been started from RandomRoll");
}
?>
</div>
</fieldset>