addin web tooks
This commit is contained in:
@@ -0,0 +1,178 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>File to Base64 Converter</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: #f4f6f8;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||||
|
padding: 30px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 650px;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.drop-zone {
|
||||||
|
border: 2px dashed #0066ff;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 30px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #f0f7ff;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.2s ease, border-color 0.2s ease;
|
||||||
|
}
|
||||||
|
.drop-zone:hover, .drop-zone.dragover {
|
||||||
|
background-color: #e1effe;
|
||||||
|
border-color: #0052cc;
|
||||||
|
}
|
||||||
|
.drop-zone p {
|
||||||
|
color: #555;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
.drop-zone input[type="file"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.output-group {
|
||||||
|
margin-top: 25px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.output-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background-color: #0066ff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
transition: background 0.2s ease;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
background-color: #0052cc;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 180px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
resize: vertical;
|
||||||
|
background-color: #fafafa;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2>File to Base64 Converter</h2>
|
||||||
|
|
||||||
|
<div class="drop-zone" id="dropZone">
|
||||||
|
<p><strong>Click to browse</strong> or drag & drop a file here</p>
|
||||||
|
<input type="file" id="fileInput">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-group" id="outputGroup">
|
||||||
|
<div class="output-header">
|
||||||
|
<label for="base64Output">Base64 Data URL String:</label>
|
||||||
|
<button id="copyBtn">Copy String</button>
|
||||||
|
</div>
|
||||||
|
<textarea id="base64Output" readonly></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const dropZone = document.getElementById('dropZone');
|
||||||
|
const fileInput = document.getElementById('fileInput');
|
||||||
|
const outputGroup = document.getElementById('outputGroup');
|
||||||
|
const base64Output = document.getElementById('base64Output');
|
||||||
|
const copyBtn = document.getElementById('copyBtn');
|
||||||
|
|
||||||
|
// Trigger file dialog on click
|
||||||
|
dropZone.addEventListener('click', () => fileInput.click());
|
||||||
|
|
||||||
|
// File input change handler
|
||||||
|
fileInput.addEventListener('change', (e) => {
|
||||||
|
if (e.target.files.length > 0) {
|
||||||
|
processFile(e.target.files[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Drag & Drop event handlers
|
||||||
|
dropZone.addEventListener('dragover', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
dropZone.classList.add('dragover');
|
||||||
|
});
|
||||||
|
|
||||||
|
['dragleave', 'dragend'].forEach(type => {
|
||||||
|
dropZone.addEventListener(type, () => dropZone.classList.remove('dragover'));
|
||||||
|
});
|
||||||
|
|
||||||
|
dropZone.addEventListener('drop', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
dropZone.classList.remove('dragover');
|
||||||
|
if (e.dataTransfer.files.length > 0) {
|
||||||
|
processFile(e.dataTransfer.files[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Read file as Data URL
|
||||||
|
function processFile(file) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = () => {
|
||||||
|
base64Output.value = reader.result;
|
||||||
|
outputGroup.style.display = 'block';
|
||||||
|
};
|
||||||
|
reader.onerror = (error) => {
|
||||||
|
alert('Error reading file: ' + error);
|
||||||
|
};
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy to clipboard
|
||||||
|
copyBtn.addEventListener('click', () => {
|
||||||
|
base64Output.select();
|
||||||
|
navigator.clipboard.writeText(base64Output.value)
|
||||||
|
.then(() => {
|
||||||
|
const originalText = copyBtn.innerText;
|
||||||
|
copyBtn.innerText = 'Copied!';
|
||||||
|
setTimeout(() => copyBtn.innerText = originalText, 2000);
|
||||||
|
})
|
||||||
|
.catch(err => alert('Failed to copy text: ' + err));
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Passgen</title>
|
||||||
|
<script>
|
||||||
|
var alphau = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
var alphal = "abcdefghijklmnopqrstuvwxyz";
|
||||||
|
var numbers = "0123456789";
|
||||||
|
var symbols = "`~!@#$%^&*()-=_+[]\{}|;':\",./<>?";
|
||||||
|
var space = " ";
|
||||||
|
var baseYear = 120000000000000000000000;
|
||||||
|
|
||||||
|
|
||||||
|
function $id(id) {
|
||||||
|
return document.getElementById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function secureRand(min,max,len) {
|
||||||
|
var str = "";
|
||||||
|
var rand = [];
|
||||||
|
var pos = 0;
|
||||||
|
|
||||||
|
while(rand.length<len) {
|
||||||
|
var buf = new Uint8Array(512);
|
||||||
|
window.crypto.getRandomValues(buf);
|
||||||
|
for(i=0;i<buf.length;i++) {
|
||||||
|
if(buf[i] >= min && buf[i] <= max) {
|
||||||
|
rand[pos] = buf[i];
|
||||||
|
pos++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rand.slice(0,len);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function generatepass(len,keys){
|
||||||
|
rlist='';
|
||||||
|
var srand = secureRand(0,keys.length,len);
|
||||||
|
for (i=0;i<len;i++) {
|
||||||
|
rlist+=keys.charAt(srand[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rlist;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function entropy(chars,len) {
|
||||||
|
return Math.round((Math.log(Math.pow(chars,len))/Math.log(2))*100)/100;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// chars = length of charset
|
||||||
|
//len = length of password
|
||||||
|
//base = total md5 tries per year
|
||||||
|
// TODO: Assumes power doubles every 18 months (Moore's law)
|
||||||
|
function yearsToCrack(chars,len,base) {
|
||||||
|
possible = Math.pow(chars,len);
|
||||||
|
return Math.round(possible/baseYear);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function generate() {
|
||||||
|
var len = $id('length').value;
|
||||||
|
var keylist = "";
|
||||||
|
if($id('alphal').checked) { keylist += alphal; }
|
||||||
|
if($id('alphau').checked) { keylist += alphau; }
|
||||||
|
if($id('symbols').checked) { keylist += symbols; }
|
||||||
|
if($id('numbers').checked) { keylist += numbers; }
|
||||||
|
if($id('space').checked) { keylist += space; }
|
||||||
|
|
||||||
|
$id('out').innerHTML = generatepass(len,keylist);
|
||||||
|
$id('entropy').innerHTML = entropy(keylist.length,len);
|
||||||
|
$id('years').innerHTML = yearsToCrack(keylist.length,len,baseYear);
|
||||||
|
}
|
||||||
|
window.onload = function(){generate();}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
* { font-family: verdana; }
|
||||||
|
h1 { margin-bottom: 5px; }
|
||||||
|
a:link { color: black; }
|
||||||
|
a:hover { text-decoration:none; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Passgen<sup><a href="javascript:alert('Passgen 0.2.8\nCryptographically secure password generator\n\nHere is how passgen protects you:\n* Uses a cryptographically secure random number generator to\ngenerate a properly random secure password\n* Nothing is ever sent to anyone! It all runs through your browser\n* Even visiting a website and loading pages from it is not needed\npassgen can run through a bookmarklet without even being online\n* Nothing is ever, ever stored or logged\n* The web page you got this from keeps no logs including IP logs or even a hit counter\n* The website you got this from is secured with TLS to ensure this bookmarklet was not tampered with in transit\n* This bookmarklet code is singed with PGP to guarantee it has not been tampered with by a hacker\n\nPrincess Pi - https://git.thecoven.info/PrincessPi');">?</a></sup></h1>
|
||||||
|
<input type="checkbox" id="alphal" onchange="generate()" checked> <label for="alphal">Lowercase Letters</label><br>
|
||||||
|
<input type="checkbox" id="alphau" onchange="generate()" checked> <label for="alphau">Uppercase Letters</label><br>
|
||||||
|
<input type="checkbox" id="numbers" onchange="generate()" checked> <label for="numbers">Numbers</label><br>
|
||||||
|
<input type="checkbox" id="symbols" onchange="generate()" checked> <label for="symbols">Symbols</label><br>
|
||||||
|
<input type="checkbox" id="space" onchange="generate()" checked> <label for="space">Space</label><br>
|
||||||
|
<label for="length">Length</label> <input type="text" id="length" size="4" value="23" onchange="generate()"><br>
|
||||||
|
<input type="button" value="Generate" onclick="generate()"> <input type="button" value="Close" onclick="window.close()">
|
||||||
|
<p><b>Password</b> <span id="out"></span></p>
|
||||||
|
<p><b>Strength<sup><a href="javascript:alert('Bits of entropy.\nlog2(characters^length)');">?</a></sup></b> <span id="entropy"></span> bits</p>
|
||||||
|
<p><b>Years to Crack<sup><a href="javascript:alert('Assumes all computing power on Earth being used collaboratively, doubling in power every 18 months.\nAlso assumes a weak, cryptologically broken hash, MD5. (EXCLUDES colissions in MD5)')">?</a></sup></b> <span id="years"></span></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>String Tools</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: #f4f6f8;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||||
|
padding: 30px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 650px;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.input-group {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
resize: vertical;
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
textarea:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #0066ff;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.output-card {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border: 1px solid #e9ecef;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.output-card.error {
|
||||||
|
border-color: #ffc9c9;
|
||||||
|
background-color: #fff5f5;
|
||||||
|
}
|
||||||
|
.output-card .title {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
color: #6c757d;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.output-card .value {
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
.value.error-text {
|
||||||
|
color: #d9534f;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2>String Tools</h2>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<label for="strInput">Enter your string below:</label>
|
||||||
|
<textarea id="strInput" placeholder="Type or paste something here..."></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card">
|
||||||
|
<div class="title">Character Count (Length)</div>
|
||||||
|
<div class="value" id="outLength">0</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card">
|
||||||
|
<div class="title">Uppercase</div>
|
||||||
|
<div class="value" id="outUpper">---</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card">
|
||||||
|
<div class="title">Lowercase</div>
|
||||||
|
<div class="value" id="outLower">---</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card">
|
||||||
|
<div class="title">URL Encoded</div>
|
||||||
|
<div class="value" id="outEncoded">---</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card" id="urlDecodedCard">
|
||||||
|
<div class="title">URL Decoded</div>
|
||||||
|
<div class="value" id="outDecoded">---</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card" id="b64EncCard">
|
||||||
|
<div class="title">Base64 Encoded</div>
|
||||||
|
<div class="value" id="outB64Enc">---</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="output-card" id="b64DecCard">
|
||||||
|
<div class="title">Base64 Decoded</div>
|
||||||
|
<div class="value" id="outB64Dec">---</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const strInput = document.getElementById('strInput');
|
||||||
|
const outLength = document.getElementById('outLength');
|
||||||
|
const outUpper = document.getElementById('outUpper');
|
||||||
|
const outLower = document.getElementById('outLower');
|
||||||
|
const outEncoded = document.getElementById('outEncoded');
|
||||||
|
const outDecoded = document.getElementById('outDecoded');
|
||||||
|
const urlDecodedCard = document.getElementById('urlDecodedCard');
|
||||||
|
|
||||||
|
const outB64Enc = document.getElementById('outB64Enc');
|
||||||
|
const b64EncCard = document.getElementById('b64EncCard');
|
||||||
|
const outB64Dec = document.getElementById('outB64Dec');
|
||||||
|
const b64DecCard = document.getElementById('b64DecCard');
|
||||||
|
|
||||||
|
// Helper functions to handle Unicode safely in Base64 (UTF-8 support)
|
||||||
|
function utf8ToBase64(str) {
|
||||||
|
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
||||||
|
return String.fromCharCode('0x' + p1);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64ToUtf8(str) {
|
||||||
|
return decodeURIComponent(atob(str).split('').map((c) => {
|
||||||
|
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||||
|
}).join(''));
|
||||||
|
}
|
||||||
|
|
||||||
|
strInput.addEventListener('input', () => {
|
||||||
|
const val = strInput.value;
|
||||||
|
|
||||||
|
if (val.length === 0) {
|
||||||
|
outLength.textContent = '0';
|
||||||
|
outUpper.textContent = '---';
|
||||||
|
outLower.textContent = '---';
|
||||||
|
outEncoded.textContent = '---';
|
||||||
|
outDecoded.textContent = '---';
|
||||||
|
outB64Enc.textContent = '---';
|
||||||
|
outB64Dec.textContent = '---';
|
||||||
|
|
||||||
|
urlDecodedCard.classList.remove('error');
|
||||||
|
b64EncCard.classList.remove('error');
|
||||||
|
b64DecCard.classList.remove('error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// String Length, Uppercase, Lowercase, URL Encoded
|
||||||
|
outLength.textContent = val.length;
|
||||||
|
outUpper.textContent = val.toUpperCase();
|
||||||
|
outLower.textContent = val.toLowerCase();
|
||||||
|
outEncoded.textContent = encodeURIComponent(val);
|
||||||
|
|
||||||
|
// URL Decoded
|
||||||
|
try {
|
||||||
|
outDecoded.textContent = decodeURIComponent(val);
|
||||||
|
outDecoded.classList.remove('error-text');
|
||||||
|
urlDecodedCard.classList.remove('error');
|
||||||
|
} catch (e) {
|
||||||
|
outDecoded.textContent = "Error: Invalid URL encoding sequence";
|
||||||
|
outDecoded.classList.add('error-text');
|
||||||
|
urlDecodedCard.classList.add('error');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Base64 Encoded
|
||||||
|
try {
|
||||||
|
outB64Enc.textContent = utf8ToBase64(val);
|
||||||
|
outB64Enc.classList.remove('error-text');
|
||||||
|
b64EncCard.classList.remove('error');
|
||||||
|
} catch (e) {
|
||||||
|
outB64Enc.textContent = "Error encoding to Base64";
|
||||||
|
outB64Enc.classList.add('error-text');
|
||||||
|
b64EncCard.classList.add('error');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Base64 Decoded
|
||||||
|
try {
|
||||||
|
outB64Dec.textContent = base64ToUtf8(val.trim());
|
||||||
|
outB64Dec.classList.remove('error-text');
|
||||||
|
b64DecCard.classList.remove('error');
|
||||||
|
} catch (e) {
|
||||||
|
outB64Dec.textContent = "Error: Invalid Base64 string";
|
||||||
|
outB64Dec.classList.add('error-text');
|
||||||
|
b64DecCard.classList.add('error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user