Compare commits
10 Commits
v1.0
..
9fec5e39b4
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fec5e39b4 | |||
| 657f515135 | |||
| 036c985592 | |||
| 8b28c70d15 | |||
| b7ee3498da | |||
| 6e0d004880 | |||
| ed26939af4 | |||
| 58a15ff9d0 | |||
| 7d5b95fb18 | |||
| 0abfd658b7 |
+2
-2
@@ -1,4 +1,4 @@
|
||||
webhook.txt
|
||||
tag.txt
|
||||
*/webhook.txt
|
||||
*/tag.txt
|
||||
*.tmp
|
||||
*.csv
|
||||
|
||||
@@ -98,7 +98,7 @@ script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/ge
|
||||
|
||||
### Clean up Windows!
|
||||
```powershell
|
||||
iwr https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random) -OutFile $env:TEMP\windows-repair-temp.ps1; powershell -NoProfile -ep Bypass -File $env:TEMP\windows-repair-temp.ps1
|
||||
iwr https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random) -OutFile $env:TEMP\windows-repair-temp.ps1; powershell -nop -ep Bypass -File $env:TEMP\windows-repair-temp.ps1
|
||||
```
|
||||
|
||||
todo:
|
||||
|
||||
@@ -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,205 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Passgen 0.2.9</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);
|
||||
}
|
||||
|
||||
|
||||
async function copyInputToClipboard(inputId, buttonElement) {
|
||||
const inputElement = document.getElementById(inputId);
|
||||
if (!inputElement) return;
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(inputElement.value);
|
||||
} catch (err) {
|
||||
inputElement.select();
|
||||
document.execCommand('copy');
|
||||
}
|
||||
|
||||
// Temporary button label change
|
||||
if (buttonElement) {
|
||||
const originalText = buttonElement.innerText;
|
||||
buttonElement.innerText = 'Copied!';
|
||||
setTimeout(() => {
|
||||
buttonElement.innerText = originalText;
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
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').value = 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: 'Courier New', Courier, monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
/* Base link styling */
|
||||
.has-tooltip {
|
||||
position: relative; /* Crucial for positioning the tooltip relative to the link */
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Tooltip container (text box) */
|
||||
.has-tooltip::before {
|
||||
content: attr(data-tooltip); /* Pulls text from the data-tooltip attribute */
|
||||
position: absolute;
|
||||
bottom: 100%; /* Positions the box above the top of the link */
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-8px); /* Centers horizontally & lifts up slightly */
|
||||
|
||||
/* Visual styling */
|
||||
background-color: #1e293b;
|
||||
color: #ffffff;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.85rem;
|
||||
white-space: nowrap; /* Prevents text from wrapping */
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
|
||||
/* Hide by default */
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
pointer-events: none; /* Prevents cursor interference */
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* Tooltip arrow pointer */
|
||||
.has-tooltip::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
|
||||
/* Creates a small downward arrow using border tricks */
|
||||
border-width: 6px 6px 0 6px;
|
||||
border-style: solid;
|
||||
border-color: #1e293b transparent transparent transparent;
|
||||
|
||||
/* Hide by default */
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* Hover State - Reveal Tooltip & Arrow */
|
||||
.has-tooltip:hover::before,
|
||||
.has-tooltip:hover::after {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Subtle upward slide animation on hover */
|
||||
.has-tooltip:hover::before {
|
||||
transform: translateX(-20%) translateY(-12px);
|
||||
}
|
||||
|
||||
.has-tooltip:hover::after {
|
||||
transform: translateX(-20%) translateY(-6px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Passgen<sup><a href="javascript:alert('Passgen 0.2.9\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><a href="#" class="has-tooltip" data-tooltip="abcdefghijklmnopqrstuvwxyz">?</a><br>
|
||||
<input type="checkbox" id="alphau" onchange="generate()" checked> <label for="alphau">Uppercase Letters</label><a href="#" class="has-tooltip" data-tooltip="ABCDEFGHIJKLMNOPQRSTUVWXYZ">?</a><br>
|
||||
<input type="checkbox" id="numbers" onchange="generate()" checked> <label for="numbers">Numbers</label><a href="#" class="has-tooltip" data-tooltip="0123456789">?</a><br>
|
||||
<input type="checkbox" id="symbols" onchange="generate()" checked> <label for="symbols">Symbols</label><a href="#" class="has-tooltip" data-tooltip="`~!@#$%^&*()-=_+[]\{}|;':",.<>?\">?</a><br>
|
||||
<input type="checkbox" id="space" onchange="generate()" checked> <label for="space">Space</label><a href="#" class="has-tooltip" data-tooltip="Space AKA 0x20, \\s, %20, and &nbsp;">?</a><br>
|
||||
<label for="length">Length</label> <input type="text" id="length" size="4" value="23" onchange="generate()"><br><br>
|
||||
<button value="Generate" onclick="generate()">Generate New</button> <!--<input type="button" value="Close" onclick="window.close()">-->
|
||||
<p><b>Password</b> <input type="text" id="out" size="40" readonly> <button onclick="copyInputToClipboard('out', this)">Copy</button></p>
|
||||
<p><b>Strength<sup><a href="#" class="has-tooltip" data-tooltip="Bits of entropy. log2(characters^length)">?</a></sup></b> <span id="entropy"></span> bits</p>
|
||||
<p><b>Years to Crack<sup><a href="#" class="has-tooltip" data-tooltip="WORK IN PROGRESS

Assumes all computing power on Earth being used collaboratively, doubling in power every 18 months.

Also assumes a weak hash, MD5. (EXCLUDES collisions in MD5)">?</a></sup></b> <span id="years"></span></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,280 @@
|
||||
<!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;
|
||||
}
|
||||
.section-header {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #0066ff;
|
||||
margin: 20px 0 10px 0;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 2px solid #e1effe;
|
||||
}
|
||||
.output-card {
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.output-card.hidden {
|
||||
display: none;
|
||||
}
|
||||
.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="section-header">String Transformations</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">
|
||||
<div class="title">Base64 Encoded</div>
|
||||
<div class="value" id="outB64Enc">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card hidden" id="b64DecCard">
|
||||
<div class="title">Base64 Decoded</div>
|
||||
<div class="value" id="outB64Dec">---</div>
|
||||
</div>
|
||||
|
||||
<div class="section-header">Hashes</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">SHA-1</div>
|
||||
<div class="value" id="outSha1">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">SHA-256</div>
|
||||
<div class="value" id="outSha256">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">SHA-512</div>
|
||||
<div class="value" id="outSha512">---</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 outB64Dec = document.getElementById('outB64Dec');
|
||||
const b64DecCard = document.getElementById('b64DecCard');
|
||||
|
||||
const outSha1 = document.getElementById('outSha1');
|
||||
const outSha256 = document.getElementById('outSha256');
|
||||
const outSha512 = document.getElementById('outSha512');
|
||||
|
||||
// Safe Unicode Base64 Helper
|
||||
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(''));
|
||||
}
|
||||
|
||||
// Helper function to calculate Web Crypto hashes
|
||||
async function computeHash(algo, text) {
|
||||
if (!text) return '---';
|
||||
const msgUint8 = new TextEncoder().encode(text);
|
||||
const hashBuffer = await crypto.subtle.digest(algo, msgUint8);
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
||||
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
|
||||
strInput.addEventListener('input', async () => {
|
||||
const val = strInput.value;
|
||||
|
||||
if (val.length === 0) {
|
||||
outLength.textContent = '0';
|
||||
outUpper.textContent = '---';
|
||||
outLower.textContent = '---';
|
||||
outEncoded.textContent = '---';
|
||||
outDecoded.textContent = '---';
|
||||
outB64Enc.textContent = '---';
|
||||
outB64Dec.textContent = '---';
|
||||
outSha1.textContent = '---';
|
||||
outSha256.textContent = '---';
|
||||
outSha512.textContent = '---';
|
||||
|
||||
urlDecodedCard.classList.remove('error');
|
||||
b64DecCard.classList.add('hidden');
|
||||
return;
|
||||
}
|
||||
|
||||
// Basic Transformations
|
||||
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
|
||||
outB64Enc.textContent = utf8ToBase64(val);
|
||||
|
||||
// Base64 Decoded (Hidden unless input is valid Base64)
|
||||
const trimmedVal = val.trim();
|
||||
// Regex validates Base64 formatting before attempting decoding
|
||||
const isB64Format = /^[A-Za-z0-9+/=]+$/.test(trimmedVal) && (trimmedVal.length % 4 === 0);
|
||||
|
||||
if (isB64Format) {
|
||||
try {
|
||||
const decoded = base64ToUtf8(trimmedVal);
|
||||
outB64Dec.textContent = decoded;
|
||||
b64DecCard.classList.remove('hidden');
|
||||
} catch (e) {
|
||||
b64DecCard.classList.add('hidden');
|
||||
}
|
||||
} else {
|
||||
b64DecCard.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Calculate Cryptographic Hashes asynchronously
|
||||
try {
|
||||
outSha1.textContent = await computeHash('SHA-1', val);
|
||||
outSha256.textContent = await computeHash('SHA-256', val);
|
||||
outSha512.textContent = await computeHash('SHA-512', val);
|
||||
} catch (e) {
|
||||
outSha1.textContent = "Error computing hash";
|
||||
outSha256.textContent = "Error computing hash";
|
||||
outSha512.textContent = "Error computing hash";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
param(
|
||||
# powershell is factually gay idkl why its such a shit
|
||||
[Parameter(Mandatory=$True, Position=0)]
|
||||
[string]$Filename
|
||||
)
|
||||
# apng is far hjigher quality and also preserves transparancy :activated:
|
||||
ffmpeg -i "$Filename" -plays 0 -f apng "$Filename.apng"
|
||||
@@ -0,0 +1,18 @@
|
||||
param(
|
||||
# powershell is factually gay idkl why its such a shit
|
||||
[Parameter(Mandatory=$True, Position=0)] # deband the param, its in position 0 so ya canb just ffmpreg_gif_loopy filename.mp4 OR ffmpreg_gif_loopy -Filename filename.mp4
|
||||
[string]$Filename # var for filename string
|
||||
)
|
||||
# apng is far hjigher quality and also preserves transparancy :activated:
|
||||
$noextpath = [System.IO.Path]::GetFileNameWithoutExtension($Filename) # get filename without extension
|
||||
$gifpath = "$noextpath`_MAXLOOP.gif" # add da .gif extension and MAXLOOP tag
|
||||
|
||||
# ffmpeg
|
||||
## -i input file (mp4)
|
||||
## settings for -filter_complex purely vibe coded for max quality
|
||||
### split [a][b]: Splitting clones the video stream into two identical, simultaneous feeds. This lets you process the color palette and render the GIF all in one
|
||||
### palettegen=stats_mode=single: This generates the highest quality 256-color palette based strictly on the exact colors present in your video. Changing the mode to single tells FFmpeg to optimize colors for moving objects across frames.
|
||||
### paletteuse=dither=bayer:bayer_scale=5: This dictates how colors are blended. Using a strict bayer dither with a scale of 5 keeps gradients incredibly clean and crisp, eliminating the ugly "cross-hatch" or "grainy" patterns typical of basic GIFs
|
||||
## -loop 0 maek da gif loop
|
||||
## outputfile (gif)
|
||||
ffmpeg -i "$Filename" -filter_complex "[0:v] split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=dither=bayer:bayer_scale=5" -loop 0 "$gifpath"
|
||||
@@ -0,0 +1,38 @@
|
||||
# TEXT TO ASCII ART GENERATOR https://patorjk.com/software/taag/#p=display&f=Graceful&t=PRINCESS+PI&x=none&v=4&h=4&w=80&we=false
|
||||
# IMAGE TO ASCII ART GENERATOR https://www.asciiart.eu/image-to-ascii
|
||||
Clear-Host # cleanup
|
||||
Write-Host -ForegroundColor Magenta @'
|
||||
=--= =----=
|
||||
=--= -------=
|
||||
=--= --------=
|
||||
=----= --- =---------=
|
||||
----= =--- ---==++=----:-----=
|
||||
=-----= - ---- ========----::----=
|
||||
=------= ----=+===-::::::::=+**++===+#
|
||||
==-----=----=+**+=:::-======++******+==+##
|
||||
=------=-=+*:::-=============+*****+==+*##
|
||||
=------=+=:-++==--+=++===+====+***+===***=
|
||||
=--------+*===---+===+===+++==+**=+==+**+-
|
||||
=------=+===--=+++==++++%%*==**====+**+.- -
|
||||
#=---=+====-=+++=+++*+.%+-==**=-==+**+.. --
|
||||
#**+--+========++++#%#**=--==**--==+**=..: =-
|
||||
*****+======+-+++*%%@@%=---==**--+=+*--:..- =
|
||||
#*****=====+=-=++***#%#-----=**=-+=+*=---:.. %%
|
||||
%****+====+=--=+++.:+*=-------=*-===**=---:..- %%
|
||||
#***+=====------=:.-=----------==+=+**+---...: %%%%#%
|
||||
#**+====:---------=-------------+=+=***=-....: %%##%%##
|
||||
%***====..:---------------------==+=-****:.....+%#%%#%%%%#
|
||||
#**+==*=...---------------:.----+==--=***=....##%#######%%
|
||||
#***+=+*=...--------------:..:--=+=----+***:...#%###%%##%
|
||||
#**+==+*=..:-------------:...:--++------=***.:+##%#%%%#% =
|
||||
#***+==+**...:----------:.....:--+=------==**++##%#%%%%% =-
|
||||
#***#+==+**=.................+*---+=------=#+=##%%##%%%#%=---
|
||||
%#**#%*===+***-.....---...=+.:*#=----------=##*#%####%%%%#=----
|
||||
%#### +===****-...: -+##=#%%+---------+###%%%%%%#%%%%%*-----
|
||||
*===+****-..- %###%%%+------=*######%%%%%%%##%#*------
|
||||
+===+****-.- %##%%%*-----#########%####%#####*-------
|
||||
____ ____ __ __ _ ___ ____ ____ ____ ____ __
|
||||
( _ \( _ \( )( ( \ / __)( __)/ ___)/ ___) ( _ \( )
|
||||
) __/ ) / )( / /( (__ ) _) \___ \\___ \ ) __/ )(
|
||||
(__) (__\_)(__)\_)__) \___)(____)(____/(____/ (__) (__)
|
||||
'@
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -e # we do noot tolerate failure here
|
||||
|
||||
# aint got no time for no bs
|
||||
if [ -z "$1" ]; then
|
||||
echo -e "ERROR\nUsage: hash_cred_check.sh <email or phone number>"
|
||||
exit 1 # fail with error
|
||||
fi
|
||||
|
||||
# 256 bits of random shit, encoded as base64
|
||||
salt="$(openssl rand -base64 32)"
|
||||
|
||||
# set credential
|
||||
credential="$1"
|
||||
|
||||
# output hex bytes after doi one hell of a argon2id fuckery
|
||||
hash=$(echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r)
|
||||
|
||||
echo "Hash: $hash"
|
||||
echo "Salt: $salt"
|
||||
echo "Credential: $credential"
|
||||
echo 'Protocol: echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r'
|
||||
echo
|
||||
echo "Verify with: hash_cred_verify.sh '$credential' '$salt' '$hash'"
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -e # mama didnt raise no bitch
|
||||
|
||||
# aint got no time for no bs
|
||||
if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
|
||||
echo -e "ERROR\nUsage: hash_cred_check.sh '<email or phone number>' '<salt>' '<hash>'"
|
||||
exit 1 # fail with error
|
||||
fi
|
||||
|
||||
# set credential
|
||||
credential="$1"
|
||||
#set salt
|
||||
salt="$2"
|
||||
# set hash
|
||||
hash="$3"
|
||||
|
||||
# debug
|
||||
## echo -e "credential $credential"
|
||||
## echo -e "salt $salt"
|
||||
## echo -e "hash $hash"
|
||||
|
||||
# run da fuck
|
||||
hash_check=$(echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r)
|
||||
|
||||
# debug
|
||||
## echo -e "hash check $hash_check"
|
||||
|
||||
# compare demmm
|
||||
if [[ $hash == $hash_check ]]; then
|
||||
echo -e "\n\e[32mGOOD MATCH! \e[0m\n\t$credential \e[32mVERIFIED\e[0m\n"
|
||||
else
|
||||
echo -e "\n\e[31mBAD MATCH! \e[0m\n\t$credential \e[31mNOT VERIFIED\e[0m\n"
|
||||
fi
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
# TEXT TO ASCII ART GENERATOR https://patorjk.com/software/taag/#p=display&f=Graceful&t=PRINCESS+PI&x=none&v=4&h=4&w=80&we=false
|
||||
# IMAGE TO ASCII ART GENERATOR https://www.asciiart.eu/image-to-ascii
|
||||
clear
|
||||
piascii=$(cat << 'EOF'
|
||||
=--= =----=
|
||||
=--= -------=
|
||||
=--= --------=
|
||||
=----= --- =---------=
|
||||
----= =--- ---==++=----:-----=
|
||||
=-----= - ---- ========----::----=
|
||||
=------= ----=+===-::::::::=+**++===+#
|
||||
==-----=----=+**+=:::-======++******+==+##
|
||||
=------=-=+*:::-=============+*****+==+*##
|
||||
=------=+=:-++==--+=++===+====+***+===***=
|
||||
=--------+*===---+===+===+++==+**=+==+**+-
|
||||
=------=+===--=+++==++++%%*==**====+**+.- -
|
||||
#=---=+====-=+++=+++*+.%+-==**=-==+**+.. --
|
||||
#**+--+========++++#%#**=--==**--==+**=..: =-
|
||||
*****+======+-+++*%%@@%=---==**--+=+*--:..- =
|
||||
#*****=====+=-=++***#%#-----=**=-+=+*=---:.. %%
|
||||
%****+====+=--=+++.:+*=-------=*-===**=---:..- %%
|
||||
#***+=====------=:.-=----------==+=+**+---...: %%%%#%
|
||||
#**+====:---------=-------------+=+=***=-....: %%##%%##
|
||||
%***====..:---------------------==+=-****:.....+%#%%#%%%%#
|
||||
#**+==*=...---------------:.----+==--=***=....##%#######%%
|
||||
#***+=+*=...--------------:..:--=+=----+***:...#%###%%##%
|
||||
#**+==+*=..:-------------:...:--++------=***.:+##%#%%%#% =
|
||||
#***+==+**...:----------:.....:--+=------==**++##%#%%%%% =-
|
||||
#***#+==+**=.................+*---+=------=#+=##%%##%%%#%=---
|
||||
%#**#%*===+***-.....---...=+.:*#=----------=##*#%####%%%%#=----
|
||||
%#### +===****-...: -+##=#%%+---------+###%%%%%%#%%%%%*-----
|
||||
*===+****-..- %###%%%+------=*######%%%%%%%##%#*------
|
||||
+===+****-.- %##%%%*-----#########%####%#####*-------
|
||||
____ ____ __ __ _ ___ ____ ____ ____ ____ __
|
||||
( _ \( _ \( )( ( \ / __)( __)/ ___)/ ___) ( _ \( )
|
||||
) __/ ) / )( / /( (__ ) _) \___ \\___ \ ) __/ )(
|
||||
(__) (__\_)(__)\_)__) \___)(____)(____/(____/ (__) (__)
|
||||
EOF
|
||||
);
|
||||
|
||||
echo -e "\033[35m$piascii\033[0m"
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
clear
|
||||
|
||||
# Define an array of standard 16-color ANSI foreground codes
|
||||
colors=(
|
||||
"\e[31m" # Red
|
||||
"\e[33m" # Yellow
|
||||
"\e[32m" # Green
|
||||
"\e[36m" # Cyan
|
||||
"\e[34m" # Blue
|
||||
"\e[35m" # Magenta
|
||||
)
|
||||
color_count=${#colors[@]}
|
||||
color_index=0
|
||||
|
||||
shuffle_colors() {
|
||||
local i tmp rand
|
||||
# Start from the last element and move backwards
|
||||
for ((i=${#colors[@]}-1; i>0; i--)); do
|
||||
# Generate a random index between 0 and i (inclusive)
|
||||
rand=$(( RANDOM % (i + 1) ))
|
||||
|
||||
# Swap elements at index 'i' and 'rand'
|
||||
tmp="${colors[i]}"
|
||||
colors[i]="${colors[rand]}"
|
||||
colors[rand]="$tmp"
|
||||
done
|
||||
}
|
||||
|
||||
# randomize dem color postions
|
||||
shuffle_colors
|
||||
|
||||
# Reset code to clear colors at the end of output
|
||||
reset="\e[0m"
|
||||
read -r -d '' ascii_art << 'EOF'
|
||||
--= =----=
|
||||
=--= -------=
|
||||
=--= --------=
|
||||
=----= --- =---------=
|
||||
----= =--- ---==++=----:-----=
|
||||
=-----= - ---- ========----::----=
|
||||
=------= ----=+===-::::::::=+**++===+#
|
||||
==-----=----=+**+=:::-======++******+==+##
|
||||
=------=-=+*:::-=============+*****+==+*##
|
||||
=------=+=:-++==--+=++===+====+***+===***=
|
||||
=--------+*===---+===+===+++==+**=+==+**+-
|
||||
=------=+===--=+++==++++%%*==**====+**+.- -
|
||||
#=---=+====-=+++=+++*+.%+-==**=-==+**+.. --
|
||||
#**+--+========++++#%#**=--==**--==+**=..: =-
|
||||
*****+======+-+++*%%@@%=---==**--+=+*--:..- =
|
||||
#*****=====+=-=++***#%#-----=**=-+=+*=---:.. %%
|
||||
%****+====+=--=+++.:+*=-------=*-===**=---:..- %%
|
||||
#***+=====------=:.-=----------==+=+**+---...: %%%%#%
|
||||
#**+====:---------=-------------+=+=***=-....: %%##%%##
|
||||
%***====..:---------------------==+=-****:.....+%#%%#%%%%#
|
||||
#**+==*=...---------------:.----+==--=***=....##%#######%%
|
||||
#***+=+*=...--------------:..:--=+=----+***:...#%###%%##%
|
||||
#**+==+*=..:-------------:...:--++------=***.:+##%#%%%#% =
|
||||
#***+==+**...:----------:.....:--+=------==**++##%#%%%%% =-
|
||||
#***#+==+**=.................+*---+=------=#+=##%%##%%%#%=---
|
||||
%#**#%*===+***-.....---...=+.:*#=----------=##*#%####%%%%#=----
|
||||
%#### +===****-...: -+##=#%%+---------+###%%%%%%#%%%%%*-----
|
||||
*===+****-..- %###%%%+------=*######%%%%%%%##%#*------
|
||||
+===+****-.- %##%%%*-----#########%####%#####*-------
|
||||
____ ____ __ __ _ ___ ____ ____ ____ ____ __
|
||||
( _ \( _ \( )( ( \ / __)( __)/ ___)/ ___) ( _ \( )
|
||||
) __/ ) / )( / /( (__ ) _) \___ \\___ \ ) __/ )(
|
||||
(__) (__\_)(__)\_)__) \___)(____)(____/(____/ (__) (__)
|
||||
EOF
|
||||
|
||||
# Process the art character-by-character
|
||||
for (( i=0; i<${#ascii_art}; i++ )); do
|
||||
char="${ascii_art:$i:1}"
|
||||
|
||||
# If the character is a space or a newline, print it raw without wasting a color
|
||||
if [[ "$char" == " " || "$char" == $'\n' ]]; then
|
||||
printf "%s" "$char"
|
||||
else
|
||||
# Assign a color, print the letter, and rotate the index cycle
|
||||
printf "%b%s" "${colors[$color_index]}" "$char"
|
||||
color_index=$(( (color_index + 1) % color_count ))
|
||||
fi
|
||||
done
|
||||
|
||||
# Always clear the terminal color state back to default at the end
|
||||
printf "%b\n" "$reset"
|
||||
Reference in New Issue
Block a user