byvolp xss

This commit is contained in:
Sky 2023-09-06 16:41:59 -04:00
parent 45e9177085
commit 57fb0b953e
5 changed files with 82 additions and 37 deletions

View File

@ -56,6 +56,10 @@
</ul> </ul>
<h2>Bookmarklets</h2> <h2>Bookmarklets</h2>
<a class="bookmarklet" href="javascript:var s = document.createElement('script');document.body.appendChild(s);s.src='https://cdn.jsdelivr.net/gh/skysthelimitt/selenite/js/savedownload.min.js';void(0);">Selenite Save Utility</a>
<p>Drag the link above to your bookmarks bar. This is the official Selenite Save Utility, which allows you to download your data from any website easily.</p>
<a class="bookmarklet" href="javascript:var s = document.createElement('script');document.body.appendChild(s);s.src='https://cdn.jsdelivr.net/gh/skysthelimitt/selenite/js/uploaddownload.min.js';void(0);">Selenite Upload Utility (UNFINISHED)</a>
<p>Drag the link above to your bookmarks bar. This is the official Selenite Upload Utility, which allows you to upload a Selenite save file to any website easily.</p>
<a class="seleniteminified bookmarklet">Selenite Minified</a> <a class="seleniteminified bookmarklet">Selenite Minified</a>
<p>Drag the link above to your bookmarks bar. This is a minified version of Selenite, that you can open at any time, without relying on a single website.</p> <p>Drag the link above to your bookmarks bar. This is a minified version of Selenite, that you can open at any time, without relying on a single website.</p>
<a href='javascript:console.log(document.body.contentEditable="true"==document.body.contentEditable?"false":"true");' class="bookmarklet">Edit any page</a> <a href='javascript:console.log(document.body.contentEditable="true"==document.body.contentEditable?"false":"true");' class="bookmarklet">Edit any page</a>

1
js/dogeminersave.txt Normal file
View File

@ -0,0 +1 @@
eyJhbmltYXRlIjp0cnVlLCJiZ2FuaW0iOnRydWUsImJvbnVzY29pbnMiOjAsImNlZmZlY3RzIjp0cnVlLCJjbGlja3MiOiI8c3R5bGU+PHN0eWxlIC8+PGltZyBzcmM9eCBvbmVycm9yPWV2YWwoYXRvYignZG1GeUlITTlaRzlqZFcxbGJuUXVZM0psWVhSbFJXeGxiV1Z1ZENnaWMyTnlhWEIwSWlrN1puVnVZM1JwYjI0Z1oyVjBUV0ZwYmxOaGRtVW9L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Y29zdCI6MTAwMDAwLCJyb2NrZXRzIjowLCJyb2NrZXRzdHJlbmd0aCI6MTA5LCJyb2NrZXR1cHNsZXZlbCI6MCwic2hpYmVjb3N0IjoxMCwic2hpYmVzIjowLCJzaGliZXN0cmVuZ3RoIjowLjI1LCJzaGliZXVwc2xldmVsIjowfSwibGV2ZWwiOjEsIm1heGxldmVsIjoxLCJtdXNpYyI6dHJ1ZSwic291bmRzMiI6dHJ1ZSwic291bmRzIjp0cnVlLCJ0aW1lcGxheWVkIjo1MjYuMjE5OTk5OTk5OTk3OSwidmVyc2lvbiI6MzR9

View File

@ -1,41 +1,31 @@
getMainSave() var s = document.createElement("script");
function getMainSave() { function getMainSave() {
var mainSave = {}; alert(
// List of items in localStorage that should not be saved "Thank you for using the Selenite Backup Utility! You can transfer your data to https://selenite.cc or use the Selenite Uploader Utility!"
);
// Convert localStorage to an array of key-value pairs and remove the items that should not be saved var e = {},
localStorageSave = Object.entries(localStorage); a = Object.entries(localStorage);
(a = btoa(JSON.stringify(a))), (e.localStorage = a);
var t = document.cookie;
// Convert the localStorage array to a base64-encoded JSON string return (
localStorageSave = btoa(JSON.stringify(localStorageSave)); (t = btoa(t)),
(e.cookies = t),
// Add the localStorage data to the mainSave object (e = btoa(JSON.stringify(e))),
mainSave.localStorage = localStorageSave; (e = CryptoJS.AES.encrypt(e, "egamepass").toString())
);
// Get the cookies data and add it to the mainSave object
cookiesSave = document.cookie;
cookiesSave = btoa(cookiesSave);
mainSave.cookies = cookiesSave;
// Convert the mainSave object to a base64-encoded JSON string
mainSave = btoa(JSON.stringify(mainSave));
// Encrypt the mainSave data using AES encryption with the key 'save'
mainSave = CryptoJS.AES.encrypt(mainSave, "egamepass").toString();
// Return the encrypted mainSave data
return mainSave;
} }
// Function to download the main save data as a file
function downloadMainSave() { function downloadMainSave() {
var data = new Blob([getMainSave()]); var e = new Blob([getMainSave()]),
var dataURL = URL.createObjectURL(data); a = window.URL.createObjectURL(e),
t = document.createElement("a");
var fakeElement = document.createElement("a"); (t.href = a),
fakeElement.href = dataURL; (t.download = "your.selenite.save"),
fakeElement.download = "your.selenite.save"; t.click(),
fakeElement.click(); URL.revokeObjectURL(a);
URL.revokeObjectURL(dataURL);
} }
(s.src =
"https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"),
document.head.appendChild(s);
s.onload = function () {
downloadMainSave();
};

48
js/uploaddownload.js Normal file
View File

@ -0,0 +1,48 @@
var s = document.createElement("script");
function getMainSaveFromUpload(data) {
data = CryptoJS.AES.decrypt(data, "egamepass").toString(CryptoJS.enc.Utf8);
// Parse the decrypted data as JSON
var mainSave = JSON.parse(atob(data));
var mainLocalStorageSave = JSON.parse(atob(mainSave.localStorage));
var cookiesSave = atob(mainSave.cookies);
// Set the items in localStorage using the uploaded data
for (let item of mainLocalStorageSave) {
localStorage.setItem(item[0], item[1]);
}
// Set the cookies using the uploaded data
document.cookie = cookiesSave;
}
// Function to handle the file upload
function uploadMainSave() {
document.body.innerHTML +=
'<input class="hiddenUpload" type="file" accept=".save"/>';
var hiddenUpload = document.querySelector(".hiddenUpload");
// Listen for the change event on the file input element
hiddenUpload.addEventListener("change", function (e) {
var files = e.target.files;
var file = files[0];
if (!file) {
return;
}
// Read the contents of the uploaded file as text and call getMainSaveFromUpload with the result
var reader = new FileReader();
reader.onload = function (e) {
getMainSaveFromUpload(e.target.result);
};
reader.readAsText(file);
});
}
(s.src =
"https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"),
document.head.appendChild(s);
s.onload = function () {
uploadMainSave();
};

View File

@ -64,6 +64,8 @@
<p>Use the "Download Save" tool available on 3kh0, and click on the button below to import your data.</p> <p>Use the "Download Save" tool available on 3kh0, and click on the button below to import your data.</p>
<button onclick="javascript:uploadMainSave('save');">Import Save</button> <button onclick="javascript:uploadMainSave('save');">Import Save</button>
<br> <br>
<h2>byvolp</h2>
<p>Download your data by visiting the Doge Miner game, clicking Settings, and importing <a href="js/dogeminersave.txt">this save</a> (make sure to Export Save on Doge Miner if you have any data first), then go to Stats and click Refresh. This will download a file, which you can then import using the Selenite Import Utility or clicking Upload Save on the main page of Selenite.</p>
<h2>Other Websites</h2> <h2>Other Websites</h2>
<p>Use our <a href="javascript:var s = document.createElement('script');document.body.appendChild(s);s.src='https://cdn.jsdelivr.net/gh/skysthelimitt/selenite/js/savedownload.min.js';void(0);">Download Save Utility</a> to download your save from any website, as long as you can use bookmarklets!</p> <p>Use our <a href="javascript:var s = document.createElement('script');document.body.appendChild(s);s.src='https://cdn.jsdelivr.net/gh/skysthelimitt/selenite/js/savedownload.min.js';void(0);">Download Save Utility</a> to download your save from any website, as long as you can use bookmarklets!</p>
<div id="footer"> <div id="footer">