-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
490 lines (462 loc) · 20.4 KB
/
index.html
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!DOCTYPE html>
<html lang="en">
<head>
<title>PokemonGo-Map Launcher Generator</title>
<meta charset="utf-8">
<!-- Metadata -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="PokemonGo-Map Launcher Generator">
<meta name="keywords" content="Pokémon Go, pogo, pokemon map, pokemon map launcher">
<meta name="author" content="neskk">
<link type="text/css" rel="stylesheet" href="styles.css">
<!-- CSS and External JavaScript -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!--
<script src="jquery.csv.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.2/jsgrid.min.css" />
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.2/jsgrid-theme.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.2/jsgrid.min.js"></script>
-->
</head>
<body>
<h2>PokemonGo-Map Launcher Generator</h2>
<p> </p>
<div class="container">
<div class="row">
<div class="col-md-12">
<h4>Description</h4>
<p>This generator will output several Unix bash script files (.sh) that are able to launch instances of PokemonGo-Map. If you're using PokeAlert as a webhook server then a script will also be created to launch those instances.</p>
</div>
</div>
<form id="form-config" class="form-horizontal" action="actions.php" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-xs-12 col-md-6">
<h4>Paths</h4>
<div class="form-group">
<label for="path-base" class="col-sm-4 control-label">Base Path</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-base" name="path-base" placeholder="~" value="~">
</div>
</div>
<div class="form-group">
<label for="path-pogomap" class="col-sm-4 control-label">PokemonGo-Map Path</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-pogomap" name="path-pogomap" placeholder="PokemonGo-Map" value="PokemonGo-Map">
</div>
</div>
<div class="form-group">
<label for="path-pokealarm" class="col-sm-4 control-label">PokeAlert Path</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-pokealarm" name="path-pokealarm" placeholder="PokeAlarm" value="PokeAlarm">
</div>
</div>
<div class="form-group">
<label for="path-spclustering" class="col-sm-4 control-label">Spawnpoint Clustering Tool</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-spclustering" name="path-spclustering" placeholder="PokemonGo-Map/Tools/Spawnpoint-Clustering" value="PokemonGo-Map/Tools/Spawnpoint-Clustering">
</div>
</div>
<div class="form-group">
<label for="path-spawnpoints" class="col-sm-4 control-label">Spawnpoint Dumps</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-spawnpoints" name="path-spawnpoints" placeholder="spawnpoints" value="spawnpoints">
</div>
</div>
<div class="form-group">
<label for="path-accounts" class="col-sm-4 control-label">Account Dumps</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-accounts" name="path-accounts" placeholder="accounts" value="accounts">
</div>
</div>
<div class="form-group">
<label for="path-proxies" class="col-sm-4 control-label">Proxy List Dumps</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="path-proxies" name="path-proxies" placeholder="proxies" value="proxies">
</div>
</div>
<h4>Screen Session Names</h4>
<div class="form-group">
<label for="screen-servers" class="col-sm-4 control-label">Servers</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="screen-servers" name="screen-servers" placeholder="servers" value="servers">
</div>
</div>
<div class="form-group">
<label for="screen-scanners" class="col-sm-4 control-label">Scanners</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="screen-scanners" name="screen-scanners" placeholder="scanners" value="scanners">
</div>
</div>
<div class="form-group">
<label for="screen-alarms" class="col-sm-4 control-label">Alarms</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="screen-alarms" name="screen-alarms" placeholder="alarms" value="alarms">
</div>
</div>
<div class="form-group">
<label for="screen-dump-sp" class="col-sm-4 control-label">Dump Spawnpoints</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="screen-dump-sp" name="screen-dump-sp" placeholder="dump-sp" value="dump-sp">
</div>
</div>
<h4>MySQL Config</h4>
<div class="form-group">
<label for="mysql-host" class="col-sm-4 control-label">Hostname</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="mysql-host" name="mysql-host" placeholder="localhost" value="localhost">
</div>
</div>
<div class="form-group">
<label for="mysql-database" class="col-sm-4 control-label">Database</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="mysql-database" name="mysql-database" placeholder="pogomap" value="pogomap">
</div>
</div>
<div class="form-group">
<label for="mysql-username" class="col-sm-4 control-label">Username</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="mysql-username" name="mysql-username" placeholder="pogomap" value="pogomap">
</div>
</div>
<div class="form-group">
<label for="mysql-password" class="col-sm-4 control-label">Password</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="mysql-password" name="mysql-password" placeholder="p455w0rd" value="p455w0rd">
</div>
</div>
<h4>Account Rotation Settings</h4>
<div class="form-group">
<label for="workforce-ratio" class="col-sm-4 control-label">Workforce Ratio to trigger ASI</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="workforce-ratio" name="workforce-ratio" placeholder="2" value="2">
</div>
</div>
<div class="form-group">
<label for="account-search-interval" class="col-sm-4 control-label">Account Search Interval</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="account-search-interval" name="account-search-interval" placeholder="28800" value="28800">
</div>
</div>
<div class="form-group">
<label for="account-rest-interval" class="col-sm-4 control-label">Account Rest Interval</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="account-rest-interval" name="account-rest-interval" placeholder="7200" value="7200">
</div>
</div>
</div>
<div class="col-xs-12 col-md-6">
<h4>CSV File Imports</h4>
<div class="form-group">
<label for="file-accounts" class="col-sm-4 control-label">Accounts</label>
<div class="col-sm-8">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="file" class="form-control" id="file-accounts" name="file-accounts" accept=".csv">
<p class="help-block">CSV syntax: service,username,password,banned</p>
</div>
</div>
<div class="form-group">
<label for="file-alarms" class="col-sm-4 control-label">Alarms</label>
<div class="col-sm-8">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="file" class="form-control" id="file-alarms" name="file-alarms" accept=".csv">
<p class="help-block">CSV syntax: enabled,address,port,location,name</p>
</div>
</div>
<div class="form-group">
<label for="file-instances" class="col-sm-4 control-label">Instances</label>
<div class="col-sm-8">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="file" class="form-control" id="file-instances" name="file-instances" accept=".csv">
<p class="help-block">CSV syntax: enabled,modes,location,name,st,sd,num_workers,num_accs,webhook</p>
</div>
</div>
<div class="form-group">
<label for="file-proxies" class="col-sm-4 control-label">SOCKS5 Proxies</label>
<div class="col-sm-8">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input type="file" class="form-control" id="file-proxies" name="file-proxies" accept=".csv, .txt">
<p class="help-block">One proxy per line - ip:port</p>
</div>
</div>
<h4>Output Filenames</h4>
<div class="form-group">
<label for="output-servers" class="col-sm-4 control-label">Servers</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output-servers" name="output-servers" placeholder="launch-servers.sh" value="launch-servers.sh">
</div>
</div>
<div class="form-group">
<label for="output-scanners" class="col-sm-4 control-label">Scanners</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output-scanners" name="output-scanners" placeholder="launch-scanners.sh" value="launch-scanners.sh">
</div>
</div>
<div class="form-group">
<label for="output-alarms" class="col-sm-4 control-label">Alarms</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output-alarms" name="output-alarms" placeholder="launch-alarms.sh" value="launch-alarms.sh">
</div>
</div>
<div class="form-group">
<label for="output-dump-sp" class="col-sm-4 control-label">Dump Spawnpoints</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output-dump-sp" name="output-dump-sp" placeholder="dump-spawnpoints.sh" value="dump-spawnpoints.sh">
</div>
</div>
<div class="form-group">
<label for="output-pogo-captcha" class="col-sm-4 control-label">PoGo-Captcha</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="output-pogo-captcha" name="output-pogo-captcha" placeholder="pogo-captcha.txt" value="pogo-captcha.txt">
</div>
</div>
<h4>Configuration</h4>
<div class="form-group">
<label for="max-instances" class="col-sm-4 control-label">Instance Limit</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="max-instances" name="max-instances" placeholder="0" value="0">
</div>
</div>
<div class="form-group">
<label for="time-delay-worker" class="col-sm-4 control-label">Time delay per worker</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="time-delay-worker" name="time-delay-worker" placeholder="4" value="4">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="shuffle-accounts" name="shuffle-accounts" checked> Shuffle account list before assigning them
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="accounts-to-file" name="accounts-to-file" checked> Output accounts to a CSV file for each instance
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="sp-clustering" name="sp-clustering"> Use Spawnpoint Clustering
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="enable-proxies" name="enable-proxies"> Assign proxies to instances
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="shuffle-proxies" name="shuffle-proxies" checked> Shuffle proxy list before assigning them
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="proxies-to-file" name="proxies-to-file" checked> Output proxies to a text file for each instance
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" id="log-messages" name="log-messages"> Output debug information to log file
</label>
</div>
</div>
<label for="log-filename" class="col-sm-4 control-label">Debug log filename</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="log-filename" name="log-filename" placeholder="debug.log" value="debug.log">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<button type="submit" id="generate-launcher" class="btn btn-primary btn-md"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Generate Launcher</button>
<button type="button" id="download-launcher" class="btn btn-primary btn-md"><span class="glyphicon glyphicon-download" aria-hidden="true"></span> Download Launcher</button>
<br />
<div id="result-message" class="text-justify"></div>
</div>
</div>
</form>
</div>
<script>
$(function() {
$('#download-launcher').hide();
$('#download-launcher').click(function(e) {
window.open($(this).attr("href"));
$(this).hide();
});
});
$("#form-config").submit(function(e) {
$('#download-launcher').hide();
$('#result-message').empty();
var formData = new FormData($(this)[0]);
//prevent Default functionality
e.preventDefault();
//get the action-url of the form
var url = e.currentTarget.action;
//do your own request an handle the results
$.ajax({
url: url,
type: 'post',
dataType: 'json',
data: formData,
success: function(data) {
var message = data['message'].replace(/(?:\r\n|\r|\n)/g, '<br />');
var file_id = data['file'];
if(file_id != '') {
//$('#generate-launcher').hide();
var fileUrl = "download.php?id="+file_id;
$('#download-launcher').attr("href", fileUrl);
$('#download-launcher').show();
}
$('#result-message').html(message);
},
cache: false,
contentType: false,
processData: false
});
});
</script>
<script>
// http://stackoverflow.com/questions/34494032/loading-a-csv-file-into-an-html-table-using-javascript
// http://www.uselesscode.org/javascript/csv/demo/example-importing-exporting-csv.htm
// https://mindmup.github.io/editable-table/
/*
$(document).ready(function() {
// Bind to <input files>
if(isAPIAvailable()) {
$('#files').bind('change', handleFileSelect);
}
});
// TODO: provide error message
function isAPIAvailable() {
// Check for the various File API support.
if (window.File && window.FileReader && window.FileList && window.Blob) {
// Great success! All the File APIs are supported.
return true;
} else {
// source: File API availability - http://caniuse.com/#feat=fileapi
// source: <output> availability - http://html5doctor.com/the-output-element/
document.writeln('The HTML5 APIs used in this form are only available in the following browsers:<br />');
// 6.0 File API & 13.0 <output>
document.writeln(' - Google Chrome: 13.0 or later<br />');
// 3.6 File API & 6.0 <output>
document.writeln(' - Mozilla Firefox: 6.0 or later<br />');
// 10.0 File API & 10.0 <output>
document.writeln(' - Internet Explorer: Not supported (partial support expected in 10.0)<br />');
// ? File API & 5.1 <output>
document.writeln(' - Safari: Not supported<br />');
// ? File API & 9.2 <output>
document.writeln(' - Opera: Not supported');
return false;
}
}
function handleFileSelect(evt) {
var files = evt.target.files; // FileList object
var file = files[0];
// read the file metadata
var output = ''
output += '<span style="font-weight:bold;">' + escape(file.name) + '</span><br />\n';
output += ' - FileType: ' + (file.type || 'n/a') + '<br />\n';
output += ' - FileSize: ' + file.size + ' bytes<br />\n';
output += ' - LastModified: ' + (file.lastModifiedDate ? file.lastModifiedDate.toLocaleDateString() : 'n/a') + '<br />\n';
// read the file contents
printTable(file);
// post the results
$('#list').append(output);
}
function printTable(file) {
var reader = new FileReader();
reader.readAsText(file);
reader.onload = function(event){
var csv = event.target.result;
var data = $.csv.toArrays(csv);
var html = '';
for(var row in data) {
html += '<tr>\r\n';
for(var item in data[row]) {
html += '<td>' + data[row][item] + '</td>\r\n';
}
html += '</tr>\r\n';
}
$('#contents').html(html);
};
reader.onerror = function(){ alert('Unable to read ' + file.fileName); };
}
// TODO: called when generated
function exportData() {
var i, j, arr = [], csv,
rxIsInt = /^\d+$/,
rxIsFloat = /^\d*\.\d+$|^\d+\.\d*$/,
rxQuotedNumber = /^"\d+"$|"\.\d+"$|^"\d+\.\d*"$/,
rows = $('#grid tr');
// Walk the rows of the table and convert them into an array
rows.each( function() {
var row = [];
tds = $(this).find('td');
tds.each( function () {
var itm = $(this).text();
// Since everything in the table was conveted to text when inserted
// we have to convert it back to a number here before we pass it to
// arrayToCsv so it handles them correctly.
if(rxIsInt.test(itm)) {
itm = parseInt(itm, 10);
} else if (rxIsFloat.test(itm)) {
itm = parseFloat(itm, 10);
// convert '*null*' to null
} else if (itm === '*null*') {
itm = null;
// don't escape quote quoted numbers
// instead interpret them as strings containg numbers
} else if (rxQuotedNumber.test(itm)) {
itm = itm.replace(/"/g, '')
}
row.push(itm);
});
arr.push(row);
});
// Convert the array to csv
csv = $.csv.fromArrays(arr);
// display the generated csv in the textbox
//$('#inout').val(csv);
}
function addRow() {
var i,
tdCount = $('#grid tr:last>td').length,
row = '<tr>';
for (i = 0; i < tdCount; i += 1) {
row += '<td>*null*</td>';
}
row += '</tr>';
$('#grid tr:last').after(row);
}
// TODO: export file (save)
*/
</script>
</body>
</html>