Compare commits
103 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 08dee660f5 | |||
| ee6a75de9a | |||
| b58c78a3fe | |||
| 79ad72ff11 | |||
| e6cbe71c5b | |||
| 9e86c1a1cf | |||
| 60a2343bc8 | |||
| f67fbef18e | |||
| e909a9ba94 | |||
| b522288c96 | |||
| cde93f511a | |||
| 8aaef29ad4 | |||
| 9fec5e39b4 | |||
| 657f515135 | |||
| 036c985592 | |||
| 8b28c70d15 | |||
| b7ee3498da | |||
| 6e0d004880 | |||
| ed26939af4 | |||
| 58a15ff9d0 | |||
| 7d5b95fb18 | |||
| 0abfd658b7 | |||
| e2a1abc717 | |||
| 8f0d7a38cf | |||
| 6ae34e9d29 | |||
| 77e69f0621 | |||
| f75fabdbba | |||
| 60473dfc52 | |||
| 70e0ef540b | |||
| df38cb6950 | |||
| 458030236e | |||
| 39cf36d5c4 | |||
| 770d1767fd | |||
| ea06b789fb | |||
| 919b49e442 | |||
| 3a1ca1348f | |||
| a1c1023875 | |||
| 1bb6b58ef4 | |||
| e9a22feb25 | |||
| 36f32f26dc | |||
| 7d8600c7b0 | |||
| ef5439dd32 | |||
| 7d31e44970 | |||
| 592937843c | |||
| 1dd41d7d89 | |||
| e56c36506a | |||
| 174cc6b277 | |||
| d7c55d9883 | |||
| 055ed246a2 | |||
| 30db4c1848 | |||
| b7488cf680 | |||
| a6496241a6 | |||
| 680f3a08c2 | |||
| 46007f48a7 | |||
| a290980d66 | |||
| 2ff2413a8f | |||
| 643586e7a5 | |||
| a3db5e79b7 | |||
| c16f90b5fe | |||
| d4d735cc94 | |||
| 531de3b15b | |||
| 0da9952f74 | |||
| c1c809204d | |||
| c13e5450fc | |||
| 162bbe9cfa | |||
| e202cb6be2 | |||
| 2f32d7447f | |||
| 499ff7ed75 | |||
| 7e587c3c7c | |||
| aa0ab287ca | |||
| aafd05c9f3 | |||
| 5c60d42b41 | |||
| a515b9c765 | |||
| 30a81a23ca | |||
| 205aa2b7a8 | |||
| 9c7c7037c5 | |||
| 7dfeec2898 | |||
| ddec60146b | |||
| 0ce174f0f7 | |||
| ef9644e885 | |||
| f2769dbd3e | |||
| 23527db27f | |||
| 9553e2c7d2 | |||
| bfa7a67142 | |||
| 96b5747ad9 | |||
| 2b1dba5abe | |||
| feff418c9f | |||
| 2a626092e9 | |||
| f3b9253fa6 | |||
| 2ba84c8273 | |||
| 98d3f30802 | |||
| af813e4fd1 | |||
| c31270636f | |||
| cc84238b99 | |||
| 1fb1a48209 | |||
| 6c6d08386f | |||
| 073488eb94 | |||
| 79325ab166 | |||
| b89b6c5a0c | |||
| 0d93e432e8 | |||
| d47e568981 | |||
| 23328875cc | |||
| 764590c350 |
+3
-2
@@ -1,4 +1,5 @@
|
||||
webhook.txt
|
||||
tag.txt
|
||||
*/webhook.txt
|
||||
*/tag.txt
|
||||
*.tmp
|
||||
*.csv
|
||||
*.sha256
|
||||
@@ -6,11 +6,11 @@
|
||||
Install customscripts on linux
|
||||
with full upgrade and package install
|
||||
```bash
|
||||
script=/tmp/install_script.sh && curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script full" && $SHELL /usr/share/customscripts/configure_webhook.sh full && exec $SHELL
|
||||
script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script full" && $SHELL /usr/share/customscripts/configure_webhook.sh full && exec $SHELL
|
||||
```
|
||||
without full upgrade and package install
|
||||
```bash
|
||||
script=/tmp/install_script.sh && curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script" && $SHELL /usr/share/customscripts/configure_webhook.sh && exec $SHELL
|
||||
script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/customscripts/install_script.sh > $script && chmod +x $script && $SHELL -c "$script" && $SHELL /usr/share/customscripts/configure_webhook.sh && exec $SHELL
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -96,6 +96,11 @@ script=/tmp/install_script.sh && curl -s https://raw.githubusercontent.com/Princ
|
||||
#### anti-productivity
|
||||
* `IM_SO_TIRED_BOSS.ps1`
|
||||
|
||||
### 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 -nop -ep Bypass -File $env:TEMP\windows-repair-temp.ps1
|
||||
```
|
||||
|
||||
todo:
|
||||
1. windwows gitinitshit
|
||||
2. convert windows-repair.bat to powershell and add more features and checks
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
default_files_name="`printf '%s\n' \"${PWD##*/}\"`_checksums_`date +%Y-%m-%d-%H%M-%Z`.sha256" # add da timedate stamp to it
|
||||
|
||||
echo $default_files_name
|
||||
|
||||
exit 0
|
||||
find $PWD -type f -exec sha256sum {} | tee -a files.sha256
|
||||
@@ -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,9 +1,5 @@
|
||||
# Windows-Repair.ps1 Usage:
|
||||
1. Open PowerShell as Administrator via these keyboard shotcuts in sequence
|
||||
1. WIN+X
|
||||
2. ALT+A
|
||||
3. ALT+Y
|
||||
2. Run
|
||||
1. Open PowerShell terminal
|
||||
```powershell
|
||||
powershell.exe -Command "Invoke-WebRequest -Uri `"https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/Windows-Scripts/windows-repair.ps1`" -OutFile `"$env:TEMP\windows-repair.ps1`"" && powershell.exe -ExecutionPolicy Bypass -File "$env:TEMP\windows-repair.ps1"
|
||||
iwr -UseBasicParsing -Uri "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-repair3.ps1"; &"$env:TEMP\windows-repair3.ps1"
|
||||
```
|
||||
@@ -58,4 +58,4 @@ Start-Sleep -Seconds $WaitSeconds
|
||||
|
||||
# x Force reboot with no warning
|
||||
# Disabled -Force to let apps close gracefully
|
||||
Restart-Computer # -Force
|
||||
Stop-Computer # -Force
|
||||
@@ -0,0 +1,42 @@
|
||||
# Usage: alert <message="Alert"> (<type=Information/None/Error/Question/Warning> (<Buttons=OK/OKCancel/YesNoCancel/YesNo>))
|
||||
|
||||
# HELP HANDLE
|
||||
if($args[0] -eq 'h' -or $args[0] -eq '-h' -or $args[0] -eq 'H' -or $args[0] -eq '-H' -or $args[0] -eq 'help' -or $args[0] -eq 'Help' -or $args[0] -eq 'HELP') {
|
||||
Write-Host "Usage: alert <message=Alert> (<type=Information/None/Error/Question/Warning> (<Buttons=OK/OKCancel/YesNoCancel/YesNo>))`nalert h/-h/help/etc: Display this help message"
|
||||
exit
|
||||
}
|
||||
|
||||
# MESSAGE HANDLE DEFAULT
|
||||
if([string]::IsNullOrEmpty($args[0])) {
|
||||
$Message = "Alert"
|
||||
} else {
|
||||
$Message = $args[0]
|
||||
}
|
||||
|
||||
# TYPE HANDLE DEFAULT
|
||||
if([string]::IsNullOrEmpty($args[1])) {
|
||||
$Type = "Information"
|
||||
} else {
|
||||
$Type = $args[1]
|
||||
}
|
||||
|
||||
# BUTTONS HANDLE DEFAULT
|
||||
if([string]::IsNullOrEmpty($args[2])) {
|
||||
$Buttons = "OK"
|
||||
} else {
|
||||
$Buttons = $args[2]
|
||||
}
|
||||
|
||||
# doin inide start-job method so alert box doesnt block
|
||||
Start-Job -ScriptBlock {
|
||||
# get back my fuckin vars inside this script block
|
||||
$Message = $using:Message
|
||||
$Buttons = $using:Buttons
|
||||
$Type = $using:Type
|
||||
|
||||
# Add the PresentationFramework
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
|
||||
# Send the alert
|
||||
[System.Windows.MessageBox]::Show($Message, $Message, $Buttons, $Type)
|
||||
};
|
||||
@@ -0,0 +1,277 @@
|
||||
[CmdletBinding(DefaultParameterSetName='Generate')]
|
||||
param(
|
||||
# File(s) or wildcard pattern to compute checksum for
|
||||
[Parameter(Position = 0, ParameterSetName = 'Generate', ValueFromPipeline = $true)]
|
||||
[Parameter(Position = 0, ParameterSetName = 'Match', ValueFromPipeline = $true)]
|
||||
[string[]]$FilePath,
|
||||
|
||||
# Output file to save generated checksums (-o mode)
|
||||
[Parameter(Mandatory = $false, ParameterSetName = 'Generate')]
|
||||
[Alias('o')]
|
||||
[string]$OutFile,
|
||||
|
||||
# File containing checksums to verify (-c mode)
|
||||
[Parameter(Mandatory = $false, ParameterSetName = 'Verify')]
|
||||
[Alias('c')]
|
||||
[string]$Check,
|
||||
|
||||
# Direct checksum hash string to match against (-m mode)
|
||||
[Parameter(Mandatory = $true, ParameterSetName = 'Match')]
|
||||
[Alias('m')]
|
||||
[string]$Match,
|
||||
|
||||
# Hashing algorithm to use (Defaults to SHA256)
|
||||
[Parameter(Mandatory = $false)]
|
||||
[Alias('a')]
|
||||
[ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5')]
|
||||
[string]$Algorithm,
|
||||
|
||||
# Help flag (-h, -Help)
|
||||
[Parameter(Mandatory = $false)]
|
||||
[Alias('h')]
|
||||
[switch]$Help
|
||||
)
|
||||
|
||||
begin {
|
||||
function Show-Help {
|
||||
@'
|
||||
NAME
|
||||
checksum - Compute and verify message digests / file checksums
|
||||
|
||||
SYNOPSIS
|
||||
.\checksum.ps1 [-FilePath] <string[]> [-OutFile <string>] [-Algorithm <string>]
|
||||
.\checksum.ps1 [-FilePath] <string[]> -Match <string> [-Algorithm <string>]
|
||||
.\checksum.ps1 -Check <string> [-Algorithm <string>]
|
||||
.\checksum.ps1 -Help
|
||||
|
||||
DESCRIPTION
|
||||
Computes or verifies checksums using various cryptographic algorithms.
|
||||
Outputs hash values in standard Linux utility format (<hash> <filename>).
|
||||
|
||||
PARAMETERS
|
||||
-FilePath <string[]>
|
||||
Specifies the path to one or more files to hash. Accepts wildcards (*).
|
||||
|
||||
-o, -OutFile <string>
|
||||
Specifies an output file to save the checksum results to, while still
|
||||
displaying the output on screen.
|
||||
|
||||
-c, -Check <string>
|
||||
Read checksums from the specified file and verify them against files on disk.
|
||||
|
||||
-m, -Match <string>
|
||||
Compare the computed hash of the target file(s) against a specific hash string.
|
||||
|
||||
-a, -Algorithm <string>
|
||||
Specifies the cryptographic hash algorithm to use.
|
||||
Supported values: SHA1, SHA256 (default), SHA384, SHA512, MD5.
|
||||
If omitted in -c or -m mode, the algorithm is auto-detected by hash length.
|
||||
|
||||
-h, -Help
|
||||
Display this help message.
|
||||
|
||||
EXAMPLES
|
||||
1. Compute SHA256 checksum for a single file:
|
||||
.\checksum.ps1 myfile.iso
|
||||
|
||||
2. Compute checksums for all files and write to a file while showing output:
|
||||
.\checksum.ps1 * -o checksums.sha256
|
||||
|
||||
3. Verify a file against a explicit hash string:
|
||||
.\checksum.ps1 myfile.iso -m "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
|
||||
4. Verify checksums from a verification file (auto-detects algorithm):
|
||||
.\checksum.ps1 -c checksums.sha256
|
||||
'@
|
||||
}
|
||||
|
||||
# Helper function to auto-detect hash algorithm based on string character length
|
||||
function Get-AlgorithmFromHashLength {
|
||||
param([string]$HashString)
|
||||
|
||||
switch ($HashString.Trim().Length) {
|
||||
32 { return 'MD5' }
|
||||
40 { return 'SHA1' }
|
||||
64 { return 'SHA256' }
|
||||
96 { return 'SHA384' }
|
||||
128 { return 'SHA512' }
|
||||
default {
|
||||
Write-Error "checksum: Could not auto-detect algorithm for hash length $($HashString.Length). Please specify -Algorithm."
|
||||
return $null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
# Match help arguments passed either as switch (-h, -Help) or positional string ('help', 'h', '--help', etc.)
|
||||
$isHelpRequested = $Help.IsPresent -or (
|
||||
$FilePath -and $FilePath.Count -eq 1 -and (
|
||||
$FilePath[0] -match '^(?i)[-/]{0,2}(h|help)$'
|
||||
)
|
||||
)
|
||||
|
||||
if ($isHelpRequested) {
|
||||
Show-Help
|
||||
return
|
||||
}
|
||||
|
||||
# Normalize explicit algorithm input if provided
|
||||
if (-not [string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = $Algorithm.ToUpper()
|
||||
}
|
||||
|
||||
# --- DIRECT MATCH MODE (-m / -Match) ---
|
||||
if ($PSCmdlet.ParameterSetName -eq 'Match') {
|
||||
if (-not $FilePath -or $FilePath.Count -eq 0) {
|
||||
Write-Error "checksum: Missing file path parameter for matching. Use -Help for usage."
|
||||
return
|
||||
}
|
||||
|
||||
# Auto-detect algorithm from provided -Match hash string if not explicitly given
|
||||
if ([string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = Get-AlgorithmFromHashLength -HashString $Match
|
||||
if (-not $Algorithm) { return }
|
||||
Write-Verbose "Auto-detected algorithm: $Algorithm"
|
||||
}
|
||||
|
||||
$expectedHash = $Match.Trim().ToLower()
|
||||
|
||||
foreach ($pathEntry in $FilePath) {
|
||||
$resolvedItems = Get-Item -Path $pathEntry -ErrorAction SilentlyContinue
|
||||
|
||||
if (-not $resolvedItems) {
|
||||
Write-Error "checksum: $pathEntry`: No such file or directory"
|
||||
continue
|
||||
}
|
||||
|
||||
foreach ($item in $resolvedItems) {
|
||||
if ($item.PSIsContainer) {
|
||||
Write-Error "checksum: $($item.Name)`: Is a directory"
|
||||
} else {
|
||||
$actualHash = (Get-FileHash -Path $item.FullName -Algorithm $Algorithm).Hash.ToLower()
|
||||
$targetFile = Resolve-Path -Path $item.FullName -Relative
|
||||
if ($targetFile.StartsWith(".\")) { $targetFile = $targetFile.Substring(2) }
|
||||
|
||||
if ($actualHash -eq $expectedHash) {
|
||||
Write-Host "${targetFile}: " -NoNewline
|
||||
Write-Host "OK" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "${targetFile}: " -NoNewline
|
||||
Write-Host "FAILED" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
# --- VERIFICATION MODE (-c / -Check) ---
|
||||
elseif ($PSCmdlet.ParameterSetName -eq 'Verify') {
|
||||
if (-not (Test-Path -Path $Check -PathType Leaf)) {
|
||||
Write-Error "checksum: $Check`: No such file or directory"
|
||||
return
|
||||
}
|
||||
|
||||
$lines = Get-Content -Path $Check
|
||||
|
||||
# Auto-detect algorithm based on hash length if not explicitly provided
|
||||
if ([string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
foreach ($line in $lines) {
|
||||
if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith("#")) { continue }
|
||||
if ($line -match '^([a-fA-F0-9]+)\s+') {
|
||||
$Algorithm = Get-AlgorithmFromHashLength -HashString $Matches[1]
|
||||
if (-not $Algorithm) { return }
|
||||
Write-Verbose "Auto-detected algorithm: $Algorithm"
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# Fallback if file contained no parsable hashes
|
||||
if ([string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = 'SHA256'
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($line in $lines) {
|
||||
# Skip empty lines or comments
|
||||
if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith("#")) { continue }
|
||||
|
||||
# Match standard checksum output format: "<hash> [* ]<filename>"
|
||||
if ($line -match '^([a-fA-F0-9]+)\s+[* ]?(.*)$') {
|
||||
$expectedHash = $Matches[1].ToLower()
|
||||
# Strip leading whitespace and any leftover leading asterisk
|
||||
$targetFile = $Matches[2].Trim().TrimStart('*')
|
||||
|
||||
if (Test-Path -Path $targetFile -PathType Leaf) {
|
||||
$actualHash = (Get-FileHash -Path $targetFile -Algorithm $Algorithm).Hash.ToLower()
|
||||
|
||||
if ($actualHash -eq $expectedHash) {
|
||||
Write-Host "${targetFile}: " -NoNewline
|
||||
Write-Host "OK" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "${targetFile}: " -NoNewline
|
||||
Write-Host "FAILED" -ForegroundColor Red
|
||||
}
|
||||
} else {
|
||||
Write-Host "${targetFile}: " -NoNewline
|
||||
Write-Host "FAILED open or read" -ForegroundColor Red
|
||||
}
|
||||
} else {
|
||||
Write-Warning "checksum: improperly formatted line: $line"
|
||||
}
|
||||
}
|
||||
}
|
||||
# --- GENERATION MODE ---
|
||||
else {
|
||||
# Default to SHA256 if no algorithm was specified in generation mode
|
||||
if ([string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = 'SHA256'
|
||||
}
|
||||
|
||||
if (-not $FilePath -or $FilePath.Count -eq 0) {
|
||||
Write-Error "checksum: Missing file path parameter. Use -Help for usage."
|
||||
return
|
||||
}
|
||||
|
||||
# Clear/initialize output file if specified before writing hashes
|
||||
if (-not [string]::IsNullOrWhiteSpace($OutFile)) {
|
||||
$null = New-Item -Path $OutFile -ItemType File -Force
|
||||
}
|
||||
|
||||
foreach ($pathEntry in $FilePath) {
|
||||
# Resolve wildcards and single file inputs
|
||||
$resolvedItems = Get-Item -Path $pathEntry -ErrorAction SilentlyContinue
|
||||
|
||||
if (-not $resolvedItems) {
|
||||
Write-Error "checksum: $pathEntry`: No such file or directory"
|
||||
continue
|
||||
}
|
||||
|
||||
foreach ($item in $resolvedItems) {
|
||||
# Handle directories like Linux sha256sum does
|
||||
if ($item.PSIsContainer) {
|
||||
Write-Error "checksum: $($item.Name)`: Is a directory"
|
||||
} else {
|
||||
$hash = (Get-FileHash -Path $item.FullName -Algorithm $Algorithm).Hash.ToLower()
|
||||
|
||||
# Format standard relative path (stripping leading '.\')
|
||||
$relativePath = Resolve-Path -Path $item.FullName -Relative
|
||||
if ($relativePath.StartsWith(".\")) {
|
||||
$relativePath = $relativePath.Substring(2)
|
||||
}
|
||||
|
||||
$outputLine = "$hash $relativePath"
|
||||
|
||||
# If -OutFile is provided, write line to file
|
||||
if (-not [string]::IsNullOrWhiteSpace($OutFile)) {
|
||||
Add-Content -Path $OutFile -Value $outputLine
|
||||
}
|
||||
|
||||
# Output to stdout
|
||||
Write-Output $outputLine
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end {}
|
||||
@@ -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,99 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
# First string to compare
|
||||
[Parameter(Position = 0)]
|
||||
[string]$String1,
|
||||
|
||||
# Second string to compare
|
||||
[Parameter(Position = 1)]
|
||||
[string]$String2,
|
||||
|
||||
# Optional switch to enable case-sensitive comparison
|
||||
[switch]$CaseSensitive,
|
||||
|
||||
# Help flag (-h, -Help)
|
||||
[Alias('h')]
|
||||
[switch]$Help
|
||||
)
|
||||
|
||||
begin {
|
||||
function Show-Help {
|
||||
@'
|
||||
NAME
|
||||
match - Compare two strings and output visual match status
|
||||
|
||||
SYNOPSIS
|
||||
match <String1> <String2> [-CaseSensitive]
|
||||
match -Help
|
||||
|
||||
DESCRIPTION
|
||||
Compares two string arguments.
|
||||
Outputs "Match OK" in GREEN if they match.
|
||||
Outputs "FAIL: NO MATCH" in RED if they differ.
|
||||
|
||||
PARAMETERS
|
||||
String1
|
||||
The first string to compare.
|
||||
|
||||
String2
|
||||
The second string to compare.
|
||||
|
||||
-CaseSensitive
|
||||
Perform a case-sensitive comparison (default is case-insensitive).
|
||||
|
||||
-h, -Help, h, help (case insensitive)
|
||||
Display this help message.
|
||||
|
||||
EXAMPLES
|
||||
1. Compare two strings (case-insensitive default):
|
||||
match "hello" "Hello"
|
||||
Output: Match OK (in green)
|
||||
|
||||
2. Compare two strings with case sensitivity:
|
||||
match "hello" "Hello" -CaseSensitive
|
||||
Output: FAIL: NO MATCH (in red)
|
||||
|
||||
3. Compare hashes or checksum outputs:
|
||||
match "e3b0c442" "e3b0c442"
|
||||
Output: Match OK (in green)
|
||||
'@
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
# Check if help was explicitly requested via flag or positional parameter
|
||||
$isHelpRequested = $Help.IsPresent -or (
|
||||
$PSBoundParameters.Count -gt 0 -and (
|
||||
($String1 -and $String1 -match '^(?i)[-/]{0,2}(h|help)$') -or
|
||||
($String2 -and $String2 -match '^(?i)[-/]{0,2}(h|help)$')
|
||||
)
|
||||
)
|
||||
|
||||
if ($isHelpRequested) {
|
||||
Show-Help
|
||||
return
|
||||
}
|
||||
|
||||
# Trigger help usage if either string parameter is missing or whitespace
|
||||
if ([string]::IsNullOrWhiteSpace($String1) -or [string]::IsNullOrWhiteSpace($String2)) {
|
||||
Write-Host "Error: Missing required arguments." -ForegroundColor Yellow
|
||||
Write-Host "Usage: match <String1> <String2> [-CaseSensitive]" -ForegroundColor Cyan
|
||||
Write-Host "Run 'match -Help' for detailed documentation.`n"
|
||||
return
|
||||
}
|
||||
|
||||
# Compare strings based on case-sensitivity choice
|
||||
$isMatch = if ($CaseSensitive) {
|
||||
$String1 -ceq $String2
|
||||
} else {
|
||||
$String1 -eq $String2
|
||||
}
|
||||
|
||||
if ($isMatch) {
|
||||
Write-Host "`n`nSUCCESS: MATCH OK!`n`n" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "`n`nFAIL: NO MATCH!`n`n" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
end {}
|
||||
@@ -1,6 +0,0 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$infile
|
||||
)
|
||||
|
||||
Invoke-Expression "$PSScriptRoot\winhash.ps1 $infile MD5"
|
||||
@@ -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 @'
|
||||
=--= =----=
|
||||
=--= -------=
|
||||
=--= --------=
|
||||
=----= --- =---------=
|
||||
----= =--- ---==++=----:-----=
|
||||
=-----= - ---- ========----::----=
|
||||
=------= ----=+===-::::::::=+**++===+#
|
||||
==-----=----=+**+=:::-======++******+==+##
|
||||
=------=-=+*:::-=============+*****+==+*##
|
||||
=------=+=:-++==--+=++===+====+***+===***=
|
||||
=--------+*===---+===+===+++==+**=+==+**+-
|
||||
=------=+===--=+++==++++%%*==**====+**+.- -
|
||||
#=---=+====-=+++=+++*+.%+-==**=-==+**+.. --
|
||||
#**+--+========++++#%#**=--==**--==+**=..: =-
|
||||
*****+======+-+++*%%@@%=---==**--+=+*--:..- =
|
||||
#*****=====+=-=++***#%#-----=**=-+=+*=---:.. %%
|
||||
%****+====+=--=+++.:+*=-------=*-===**=---:..- %%
|
||||
#***+=====------=:.-=----------==+=+**+---...: %%%%#%
|
||||
#**+====:---------=-------------+=+=***=-....: %%##%%##
|
||||
%***====..:---------------------==+=-****:.....+%#%%#%%%%#
|
||||
#**+==*=...---------------:.----+==--=***=....##%#######%%
|
||||
#***+=+*=...--------------:..:--=+=----+***:...#%###%%##%
|
||||
#**+==+*=..:-------------:...:--++------=***.:+##%#%%%#% =
|
||||
#***+==+**...:----------:.....:--+=------==**++##%#%%%%% =-
|
||||
#***#+==+**=.................+*---+=------=#+=##%%##%%%#%=---
|
||||
%#**#%*===+***-.....---...=+.:*#=----------=##*#%####%%%%#=----
|
||||
%#### +===****-...: -+##=#%%+---------+###%%%%%%#%%%%%*-----
|
||||
*===+****-..- %###%%%+------=*######%%%%%%%##%#*------
|
||||
+===+****-.- %##%%%*-----#########%####%#####*-------
|
||||
____ ____ __ __ _ ___ ____ ____ ____ ____ __
|
||||
( _ \( _ \( )( ( \ / __)( __)/ ___)/ ___) ( _ \( )
|
||||
) __/ ) / )( / /( (__ ) _) \___ \\___ \ ) __/ )(
|
||||
(__) (__\_)(__)\_)__) \___)(____)(____/(____/ (__) (__)
|
||||
'@
|
||||
@@ -1,6 +0,0 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$infile
|
||||
)
|
||||
|
||||
Invoke-Expression "$PSScriptRoot\winhash.ps1 $infile SHA1"
|
||||
@@ -1,6 +0,0 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$infile
|
||||
)
|
||||
|
||||
Invoke-Expression "$PSScriptRoot\winhash.ps1 $infile SHA256"
|
||||
@@ -1,6 +0,0 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$infile
|
||||
)
|
||||
|
||||
Invoke-Expression "$PSScriptRoot\winhash.ps1 $infile SHA384"
|
||||
@@ -1,6 +0,0 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$infile
|
||||
)
|
||||
|
||||
Invoke-Expression "$PSScriptRoot\winhash.ps1 $infile SHA512"
|
||||
Binary file not shown.
@@ -1,9 +1,23 @@
|
||||
if ($args[0]) { $commit_message=($args -join " ") } # if arg0 exists, join all passed args with spaces
|
||||
else { $commit_message="waypoint" } # or default to "waypoint"
|
||||
# waypoint.ps1
|
||||
|
||||
Write-Host "WAYPOINT!`n`tCommit Message: $commit_message`n"
|
||||
# add and commit
|
||||
if (-not (Test-Path -Path ".\.git" -PathType Container)) {
|
||||
Write-Host "No .git folder detected. Initializing new Git repository..." -ForegroundColor Yellow
|
||||
git init
|
||||
} else {
|
||||
Write-Host "Git repository detected. Creating waypoint..." -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
# Stage all changes
|
||||
git add .
|
||||
git commit -m "$commit_message"
|
||||
|
||||
Write-Host "`nDone :`"3"
|
||||
# Format the timestamp with timezone offset/ID string
|
||||
$timestamp = (Get-Date).ToString("yyyy-MM-dd-HHmm") + "-" + ((Get-TimeZone).Id -creplace '[a-z\s]', '')
|
||||
|
||||
# Capture current git status output
|
||||
$statusOutput = (git status | Out-String).Trim()
|
||||
|
||||
# Construct the commit message
|
||||
$commitMessage = "WAYPOINT $timestamp`n`n$statusOutput"
|
||||
|
||||
# Execute commit
|
||||
git commit -m "$commitMessage"
|
||||
@@ -4,34 +4,149 @@
|
||||
# alt+a
|
||||
# alt+y
|
||||
# Run:
|
||||
# powershell.exe -Command "Invoke-WebRequest -Uri `"https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/Windows-Scripts/windows-repair.ps1`" -OutFile `"$env:TEMP\windows-repair.ps1`"" && powershell.exe -ExecutionPolicy Bypass -File "$env:TEMP\windows-repair.ps1"
|
||||
# In admin powershell Terminal:
|
||||
# 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
|
||||
|
||||
# Check for administrator privileges
|
||||
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
# Restart with elevated privileges
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-File `"$($MyInvocation.MyCommand.Path)`""
|
||||
exit
|
||||
# check if hasadmin rights, if notm run script in new terminal, clopsing old
|
||||
## if not, carry on
|
||||
if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S-1-5-32-544')) {
|
||||
# launch tghis script int new window after promopting for admin
|
||||
Start-Process -FilePath 'powershell' -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File $PSCommandPath"
|
||||
|
||||
# CLOSE previous terminal with success
|
||||
exit 0
|
||||
} else {
|
||||
Clear-Host # clear window
|
||||
|
||||
# ascii art
|
||||
Write-Host -ForegroundColor Magenta @'
|
||||
.. .....
|
||||
....------..
|
||||
..:--------.. .......
|
||||
..----------.. ....---..
|
||||
...---------=------::....:----:..
|
||||
..-----=+**************=-----:...
|
||||
.----+****************=-----...
|
||||
.--=****************=-----=**+:::--:....
|
||||
.-=#*********##**++=---====++**+-----:.
|
||||
..:==********#=.+@%-==++===++===++*=----...
|
||||
.:=::******%%+-::=++====+==++====+**=--...
|
||||
.:+..+*****--@===-:-%--====-=+====+*#=:..
|
||||
.-=.-****#=.#+===--=+===----======+*+..
|
||||
.:=:+****#@#+=====-**-----*+====++**:.
|
||||
.. .=****=--======-..%-----%+==++***+-..
|
||||
..=++***+-.----======..*-----#+==+***#%#+..
|
||||
.. .:-..---=====--------=-+==+**-@*. ............::::::....
|
||||
..=:..--===+-:-------*%+==*+#%**=. .....:-------------------------:.
|
||||
..............-:..--===+-..:-------+==+==.:... ...:----------------------------::.
|
||||
......:----------::=:...--==+--:.:-------+==+=:.... ....--------------------------:.....
|
||||
..:::----------------=-::.:--===---:.:------=--:.... ...:---------------------------...
|
||||
..:------------------=--:..:--=+=--------::.:+-..... ...------------------------------..
|
||||
...:-----------------:....----==-------:...=%*.......:::--------------------------------:..
|
||||
...--------------:+......---------------:+%%#.----------------------------:.......-----:..
|
||||
.:----===-------:-.. .:--------------*%%%%=--------------========------:.......-------:...
|
||||
..-:.:------------....-.=---------=#%%%%##%------------=-----------------------------------..
|
||||
.:--:....:--------:##*=:.-------=#%%%%%%#%+-----------=-------------------------------------:
|
||||
..:-----------------::*%%#-------=###%%%%##=--------------------------------------:............
|
||||
..:-------------------:.-#%%##+==+%%%%%%#%+------------------------...:::--------------::::::..
|
||||
...:----------------------..-#%#%%%%%%%%*+#%=-------------------------=-:....:----------------:...
|
||||
--------------------------:.-#%%%%%%%%+#@%%%--------------------------=++=-::---------------:...
|
||||
---------------------------...+%%%%%%%#%%%%#---------------------------------------------:....
|
||||
............------.....----:....-#%%%%%%%*=------------------------------::+=---------.......
|
||||
..:-... ....-----.. ....-=-------------------------------------.=*+=.......
|
||||
..---:....:-----:.......:--------------------------:-------------==+=-......
|
||||
.:-------------..........:---------------------------..:-------------==..........
|
||||
..-------------:... ...--------:...----------------....:-----------==-...........
|
||||
..:----==------:..-.... ..--------:...:---------------.....:----------=+-.....
|
||||
..------==+=++==-..+--:. .:--------.....-----------=*%=.. ..----------=+=......
|
||||
....------------........:... ..:--------.....-------+#%%#@%.. ...----------=+=......
|
||||
....---------===:............... .:----=+*#=. ..--+#**+%@@@#%+. ..:-:..=----=*=:.....
|
||||
:............:=::+=:--:=.=-.::=... ..*@*-+%@@@:.....-@@#%@*#@@@#%:.. ..-:..---:-#**+-.........
|
||||
.. ...::::....::-.:.::-.. ..*%:..*@@@*.. ..-%#%@@+%@@@@=.. ...::.=#=..-%*++=:... ...
|
||||
...... .......... ..**...*#=*%:. .-*#@%+#%@@@@+... ..*%@%+...+%+=*+=-...
|
||||
..*#:.-#+..+-. ..-*#**%%*%@@%=.. ..-%@@*:..+@%=:+**+=:..
|
||||
..*@#*%%=..==. .-*%@#%@##@@@#-. ...#@@%*-=%@@#:..-=++=-
|
||||
.:#@*-:++..==. .=#%@%*@@*%*=+*:....:.+@*::+%@@@%=......-*
|
||||
.-%+...=%##%-. .+@*@%*%@##*-:*+..:-==*@=..:#@+:=*:.......
|
||||
.:*#:..:*@@@%:. .-%@*%@#*%*#=..-%-....:+#=-.:#%-.:+-.......
|
||||
.+@#=.-*@@@@*.. ....-%@@@@@@=..+%*.. .-%--=+#%-.:*-. ....
|
||||
.-=++++++++=... .:***+++==::::... .-%#=-*#%#**#-.
|
||||
..............
|
||||
'@
|
||||
# vars
|
||||
$LogDir = "$env:USERPROFILE\Downloads\Repair-Log-$((Get-Date).ToString('yyyy-MM-dd-HHmm'))" # path to new log Dir
|
||||
$MainLog = "$LogDir\main.log" # error log file
|
||||
|
||||
Write-Host "FIXING WINDOWS FULL PRINCESS PI STYLE (THIS WILL TAKE MANY HOURS AND REBOOT MORE THAN ONCE, SLOWLY)`n" -ForegroundColor Magenta
|
||||
|
||||
Write-Output "Creating Log Dir at $LogDir 1/21 at $((Get-Date).ToString('yyyy-MM-dd-HHmm'))"
|
||||
mkdir "$LogDir" > $null 2> $null # create log dir
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm')) Initialize Log File $LogFile 3/21`n`tFollow Log File in Another Terminal With`n`t`t``Get-Content `"$MainLog`" -Wait -Tail 50``"
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))" >> "$MainLog"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tOpening Log Dir 2/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
explorer.exe "$LogDir"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tAborting Any Scheduled Shutdowns 4/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
shutdown.exe /a > $null 2>> "$MainLog" # cmd abort scheduled shutdowns
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`t`Creating Log Dir at $LogDir 5/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
New-Item -Path "$LogDir" -ItemType Directory > $null 2>> "$MainLog" # create log dir
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tGenerating and Displaying Comprehensive Stability Report 6/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-Process "perfmon.exe" -ArgumentList "/report" -Wait # running report
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tGenerating and Displaying Stability History Report 7/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-Process "perfmon.exe" -ArgumentList "/rel" -Wait # historical report
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tClearning DNS Cache 8/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
ipconfig.exe /flushsdns > $null 2>> "$MainLog" # flush dns cache
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tClearing ARP Table 9/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Remove-NetNeighbor -Confirm:$false > $null 2>> "$MainLog" # flush ARP Table
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tClearing ALL Samba Credentials 10/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
net.exe use * /delete /y > $null 2>> "$MainLog" # nuke all samba creds automagically
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tReleasing and Renweing DHCP 11/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
# release and renew dhcp
|
||||
ipconfig.exe /release > $null 2>> "$MainLog"
|
||||
ipconfig.exe /renew > $null 2>> "$MainLog"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tGetting Control of Windows Update 12/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Install-Module -Name PSWindowsUpdate -Force > $null 2>> "$MainLog"
|
||||
Import-Module PSWindowsUpdate
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tUpdating Windows 13/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot > $null 2>> "$MainLog"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tUpdating Malware Signatures 14/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Update-MpSignature 2>> "$MainLog" # update windows defender malware siggs
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tRunning FULL Windows Defender SCAN 15/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-MpScan -ScanType FullScan 2>> "$MainLog" # full windows defender scan
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tRunning DISM Online Image Cleanup 16/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
DISM.exe /Online /Cleanup-Image /RestoreHealth 2>> "$MainLog" # online check for bad files
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tRunning System File Checker 17/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
SFC.exe /scannow 2>> "$MainLog" # older check for bad files
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Essential File Check on Next Boot 18/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
SFC.exe /scanonce 2>> "$MainLog" # check essential files on next boot
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Offline chkdsk and Repair of C: 19/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Write-Output y | chkdsk.exe /f /r C: > $null 2>> "$MainLog" # cmd checks C drive after reboot to waste time and fix errors (noninteractive via y ffuckery)
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Offline Memory Test at Next Boot 20/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
mdsched.exe /s 2>> "$MainLog" # schedule offline memtest (noninteractive)
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Windows Defender Offline Scan 21/21`n`tMAY REBOOT UNEXPECTEDLY`n" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-MpWDOScan 2>> "$MainLog" # powershell starts Windows Defender Offline Scan after reboot
|
||||
|
||||
Write-Host "`nRebooting in 5 Minutes MAX Probably Sooner`n" -ForegroundColor Magenta
|
||||
shutdown.exe /r /t (60*5) # shutdown in 5 minutes as failsafe
|
||||
|
||||
Write-Output "`n$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`n`nDONEsiez :3~`n" | Tee-Object -FilePath "$MainLog" -Append
|
||||
}
|
||||
|
||||
Write-Host "`nFIXING WINDOWS FULL STYLE`n"
|
||||
|
||||
Write-Host "ABORTING ANY SCHEDULED SHUTDOWN"
|
||||
shutdown /a # cmd abort scheduled shutdowns
|
||||
|
||||
Write-Host "RUNNING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (mrt)"
|
||||
mrt # cmd malicious software removal tool
|
||||
|
||||
Write-Host "RUNNING SYSTEM FILE CHECKER (sfc)"
|
||||
sfc /scannow # cmd system file checker, retreives and replaces bad system files
|
||||
|
||||
Write-Host "RUNNING DISM"
|
||||
DISM /Online /Cleanup-Image /RestoreHealth # powershell checks image and replaces bad files
|
||||
|
||||
Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (chkdsk)"
|
||||
Write-Host y | chkdsk /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive)
|
||||
|
||||
Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN"
|
||||
Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot
|
||||
|
||||
Write-Host "`nREBOOTING IN 5 MINUTES`n"
|
||||
shutdown /r /t 300
|
||||
@@ -1,38 +0,0 @@
|
||||
# Usage:
|
||||
## .\winhash.ps1 <FILE> <ALGO>
|
||||
## Algos Supported:
|
||||
### MD5
|
||||
### SHA1
|
||||
### SHA256
|
||||
### SHA384
|
||||
### SHA512
|
||||
## Example:
|
||||
### .\winhash.ps1 sillyfilly.bin SHA256
|
||||
## Outputs to terminal and to a text file
|
||||
### Text file name format <input filepath>.<unix epoch microseconds>.<hashing algorithm>.txt
|
||||
|
||||
param (
|
||||
[Parameter(Mandatory=$true)] # prompt for input if not specified via cli
|
||||
[string]$infile,
|
||||
|
||||
[Parameter(Mandatory=$true)] # this 1 2 :pope:
|
||||
[string]$algo
|
||||
)
|
||||
|
||||
function Get-UnixMicroseconds {
|
||||
$unixEpoch = [DateTimeOffset]'1970-01-01T00:00:00Z' # unix epoch constant
|
||||
$currentTime = [DateTimeOffset]::UtcNow # current utc time
|
||||
$timeDifferenceTicks = $currentTime.Ticks - $unixEpoch.Ticks # subtract current time from unix epoch constant in ticks
|
||||
$microseconds = [Int64]($timeDifferenceTicks / 10) # use 64bit int, divide ticks by 10 to give microseconds
|
||||
|
||||
# I am literally using Unix microseconds because they are more fun than Unix seconds :pinkie:
|
||||
return $microseconds
|
||||
}
|
||||
|
||||
# jesus fuckin analbeads the selection of hash algos in powershell is weird and limited
|
||||
# probably because Bill Gates and Satya Nadella get together with the other C-suite executives
|
||||
# and hypergoon to leagelese in clickwrap agreements that absolves them of liability and
|
||||
# lets them sell our private data and other assorted dickpics or sumtin idk man lmao
|
||||
$hash = $(Get-FileHash -Path $infile -Algorithm $algo | Format-List) # do da fookin hashin right dafucc here
|
||||
echo $hash # show user
|
||||
echo $hash > "$infile.$(Get-UnixMicroseconds).$algo.txt" # make the txt file
|
||||
@@ -7,3 +7,13 @@ watch file growth based on partial names
|
||||
```bash
|
||||
file_tag=Kali-Pi5-Full-Configured-Working-1TB && dump_pid=1717053 && watch -n 300 "echo -e '\n\n\n\e[32mFOOOKN 1TB DUMP IN PROGRESS DONT FUCK WITH ANYTHNG\e[0m\n\n\n' && ls -lAh *${file_tag}* && echo && free -h && echo && uptime && echo && ps -p $dump_pid -o etime"
|
||||
```
|
||||
**submit sample to virustotal**
|
||||
```bash
|
||||
# in ~/.bashrc
|
||||
export VIRUSTOTAL_API_KEY="<mah key>"
|
||||
|
||||
# in cli
|
||||
sha256dsum SAMPLE.zip # get sha256 to look up on the site
|
||||
curl -X POST -H "X-ApiKey: $VIRUSTOTAL_API_KEY" -F "file=@$PWD/SAMPLE.zip" https://www.virustotal.com/api/v3/files
|
||||
# then look up file by sha256 checksum on the site
|
||||
```
|
||||
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
# file paths
|
||||
sha256_file_path=./checksums.sha256
|
||||
md5_file_path=./checksums.md5
|
||||
error_log=./checksums_error.log
|
||||
|
||||
# text colors
|
||||
RED='\e[31m'
|
||||
GREEN='\e[32m'
|
||||
RESET='\e[0m'
|
||||
|
||||
# set these false at the start to be safe
|
||||
checksha256=false
|
||||
checkmd5=false
|
||||
|
||||
# output errors to error log
|
||||
exec 2> >(tee -a "$error_log" >&2)
|
||||
|
||||
# environment checks
|
||||
## check for presence of $sha256_file_path, fail with general error on error
|
||||
if [ ! -f "$sha256_file_path" ]; then
|
||||
echo -e "\n${RED}FAIL!${RESET} File $sha256_file_path Not Found!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
## check if $sha256_file_path is writable
|
||||
if [ ! -r "$sha256_file_path" ]; then
|
||||
echo -e "\n${RED}FAIL!${RESET} File $sha256_file_path Exists But Not Readable!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
## check for presence of $md5_file_path, fail with general error on error
|
||||
if [ ! -f "$md5_file_path" ]; then
|
||||
echo -e "\nFAIL! File $md5_file_path Not Found!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
## check if $md5_file_path is writable
|
||||
if [ ! -r "$md5_file_path" ]; then
|
||||
echo -e "\n${RED}FAIL!${RESET} File $md5_file_path Exists But Not Readable!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check checksums
|
||||
## check sha256
|
||||
if sha256sum -c "$sha256_file_path" 1>/dev/null; then
|
||||
echo -e "SHA256 Checksums: ${GREEN}OK!${RESET}"
|
||||
checksha256=true
|
||||
else
|
||||
echo -e "\n\nSHA256 Checksums: ${RED}BAD!${RESET}\nDumping SHA256 Checksum Fails:" >&2
|
||||
sha256sum -c "$sha256_file_path" | grep 'FAILED' >&2
|
||||
echo -e "\nSHA256 Checksums: ${RED}BAD!${RESET}\n" >&2
|
||||
fi
|
||||
## check md5
|
||||
if md5sum -c "$md5_file_path" 1>/dev/null; then
|
||||
echo -e "MD5 checksums: ${GREEN}OK!${RESET}"
|
||||
checkmd5=true
|
||||
else
|
||||
echo -e "\n\nFAIL: MD5 Checksums: ${RED}BAD!${RESET}\n\tDumping MD5 Checksum Fails:" >&2
|
||||
md5sum -c "md5_file_path" | grep 'FAILED' >&2
|
||||
echo -e "\nMD5 Checksums: ${RED}BAD!${RESET}\n" >&2
|
||||
fi
|
||||
|
||||
# tally checks
|
||||
if [[ $checksha256 == true && $checkmd5 == true ]]; then
|
||||
echo -e "\nFile Integrity: VERIFIED! All Checksums: ${GREEN}OK!${RESET}\n"
|
||||
exit 0 # exit success
|
||||
else
|
||||
echo -e "\nFile Integrity Check: ${RED}FAILED!${RESET}\n\tSee Above or See $error_log" >&2
|
||||
exit 1 # exit general failure
|
||||
fi
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# file paths
|
||||
sha256_file_path=./checksums.sha256
|
||||
md5_file_path=./checksums.md5
|
||||
error_log=./checksums_error.log
|
||||
|
||||
# text colors
|
||||
RED='\e[31m'
|
||||
YELLOW='\033[33m'
|
||||
GREEN='\e[32m'
|
||||
RESET='\e[0m'
|
||||
|
||||
# output errors to error log
|
||||
exec 2> >(tee -a "$error_log" >&2)
|
||||
|
||||
if [ -f "sha256_file_path" ]; then
|
||||
echo -e "${YELLOW}Warn${RESET}: Existing $sha256_file_path Found, Deleting..."
|
||||
rm -f "sha256_file_path"
|
||||
fi
|
||||
|
||||
if [ -f "$md5_file_path" ]; then
|
||||
echo -e "${YELLOW}Warn${RESET}: Existing $md5_file_path Found, Deleting..."
|
||||
rm -f "$md5_file_path"
|
||||
fi
|
||||
|
||||
if [ -f "$error_log" ]; then
|
||||
echo -e "${YELLOW}Warn${RESET}: Existing $error_log Found, Deleting..."
|
||||
rm -f "$error_log"
|
||||
fi
|
||||
|
||||
# notify user
|
||||
echo "Calculating SHA256 and MD5 Checksums Recursively into $sha256_file_path and $md5_file_path\n\t${YELLOW}This May Take a Long Time!${RESET}"
|
||||
# exclude git
|
||||
if find . -type f ! -path "*/.git/*" ! -path "$error_log" ! -path "$md5_file_path" ! -path "$sha256_file_path" ! -path "$0" ! -path "./check_checksums.sh" -exec bash -c "file_path={} && sha256sum \$file_path 1>> $sha256_file_path && md5sum \$file_path 1>> $md5_file_path" \;; then
|
||||
echo -e "\n${GREEN}SUCCESS!${RESET} Generated SHA256 and MD5 Checksums into $sha256_file_path and $md5_file_path Respectively!\n"
|
||||
exit 0 # explicitly exit success
|
||||
else
|
||||
echo -e "\n${RED}FAIL!${RESET} Failed to Generate SHA256 and MD5 Checksums! Check Error Output or Check Error Log: $error_log\n" >&2
|
||||
exit 1 # explicitly fail
|
||||
fi
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# set -euo pipefail # we tolerate no failure :pensive: 😔
|
||||
|
||||
# nullglobyyyy so da FUCKIN wildcard STOPS BEING A FUCK
|
||||
shopt -s nullglob
|
||||
|
||||
# add da current dir name, and timedate stamp to it plus sum middleshit idk
|
||||
default_file_name="$(date +%Y-%m-%d-%H%M-%Z)_$(printf '%s\n' ${PWD##*/})_ChecksumsSHA256.sha256"
|
||||
|
||||
existing_sha256_files=(*.sha256)
|
||||
|
||||
# just for spooky :3
|
||||
## sumtin spookie :3
|
||||
|
||||
# if sha256 files exist, handle
|
||||
if [ ${#existing_sha256_files[@]} -gt 0 ]; then
|
||||
# existing sha256 files fond
|
||||
echo "Existing *.sha256 files found in $PWD, Checking the Latest $default_file_name"
|
||||
|
||||
for file in *.sha256; do
|
||||
# on fnding sha256 files in pwd, generate shas56 checks of each one, notify OK! on success, delete the offending sha256 file if fail
|
||||
[ -f "$file" ] && sha256sum -c $file && echo -e "$file Check: \033[0;32mOK!\033[0m\n" || (echo -e "\n$file NO MATCH! Deleting Bad File \033[31mFAIL\033[0m\n\n"; rm -f $file) # 2>/dev/null)
|
||||
done
|
||||
# validate the found checksums
|
||||
sha256sum -c *.sha256 | tee -a "$default_file_name" && echo -e "\nAll Checksums: \033[0;32mOK!\033[0m\n" || echo -e "\nOne or More Checksums Failed to Match: \033[33mWARN ($?)\033[0m\n"
|
||||
else
|
||||
# no sha256 files, run generate
|
||||
echo "NO Existing *.sha256 files found! Generating sha256 checksums recursively"
|
||||
|
||||
# recursive search in current working dir,
|
||||
find "$PWD" -type f -exec bash -c "sha256sum {} | tee -a \"$PWD/$default_file_name\"" \; && echo -e "\nAll Checksums Created: \033[0;32mOK!\033[0m\n\tLog File: $default_file_name\n" || echo -e "\nOne or More Cecksums Failed to Run: \033[31mWARN ($?)\033[0m\n"
|
||||
fi
|
||||
|
||||
@@ -87,7 +87,7 @@ checkcode () {
|
||||
if [ $retcode -ne 0 ]; then
|
||||
echo -e "\t\e[31mERROR!\033[0m Response Code: $retcode"
|
||||
else
|
||||
printf '\e[1;32mOK!\e[0m'
|
||||
echo -e '\t\e[1;32mOK!\e[0m'
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@ user() {
|
||||
usermod -aG $group $new_username &> /dev/null
|
||||
checkcode $?
|
||||
done
|
||||
checkcode $?
|
||||
echo "user: FINISHED"
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# packages required: git trufflehog gitsecrets
|
||||
|
||||
github='https://github.com/InfoSecREDD/'
|
||||
|
||||
out_dir="$PWD/redd_repos"
|
||||
mkdir -p "$out_dir"
|
||||
|
||||
repos=("DWipe" "wifipineapplepager-payloads" "ThreatVis" "RadioRef-Export" "REDDs-PCAP-Uploader" "Uptime-Monitor" "Uni-Adblock" "PolyZip" "CVE-Discord-Notify" "shlt-plugins" "DarkGPT-Lite" "RPT-Installer" "YOURLS-Security-Audit-Plugin" "YOURLS-IP-Info" "InfoSecREDD.github.io" "sharkjack-payloads" "ExPW" "DeLookup" "CheckSim" "sb" "REPG-Community-Payloads" "BTSM-Payloads" "Flip-pi" "InvisInk-Encoder" "REPG" "NET-UP" "Adafruit_WebSerial_ESPTool" "BadPS" "omg-payloads" "k" "Flipper" "REDD-Demo" "SecF0EncKey" "SIN-Main" "sj-webui-patch" "MHS35-lcd-64bit-rpi" "verifymd5" "proxmark3" "DHunter" "termux-pm3-helper" "Proxmark3-Amiibo-Emulate" "Termux-Helper-Script" "NFC-Cloner" "Handshake-Transfer" "shark-files" "rtl8812au" "SharkLib" "rtl8812AU_8821AU_linux" "NET-UP-modules" "boot-dev" "RPi-Tweaks" "auto-ssh" "HoppEye" "bashbunny-payloads" "CPUMINER" "bash-no-ip-updater")
|
||||
|
||||
# if [ -d "$out_dir" ]; then
|
||||
# printf "deleting existing $out_dir..."
|
||||
# rm -rf "$out_dir" > /dev/null 2>&1
|
||||
# printf "$?\n"
|
||||
#
|
||||
# printf "remaking $out_dir..."
|
||||
# mkdir -p "$out_dir"
|
||||
# printf "$?\n"
|
||||
# fi
|
||||
#
|
||||
# for repo in "${repos[@]}"; do
|
||||
# printf "cloning $repo into $out_dir/$repo..."
|
||||
# git clone --recursive "$github/$repo" "$out_dir/$repo" > /dev/null 2>&1
|
||||
# printf "$?\n"
|
||||
# done
|
||||
|
||||
for repo in "${repos[@]}"; do
|
||||
cd "$out_dir/$repo"
|
||||
trufflehog git file://. --relative
|
||||
gitleaks detect -v
|
||||
cd -
|
||||
done
|
||||
@@ -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
|
||||
@@ -7,7 +7,7 @@
|
||||
# set -e # make sure da silly thing dont continue when there be errorZ
|
||||
|
||||
# configs
|
||||
gitRepo='https://github.com/PrincessPi3/general-scripts-and-system-ssssssetup.git'
|
||||
gitRepo='https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup.git'
|
||||
tmpDir='/tmp/generalssss'
|
||||
tmp_customscripts_dir="$tmpDir/customscripts"
|
||||
finalDir='/usr/share/customscripts'
|
||||
@@ -214,6 +214,9 @@ fi
|
||||
# source $rcfile
|
||||
# fi
|
||||
|
||||
$SHELL -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"' >> "$rcfile"
|
||||
|
||||
# appeend thefuck to rcfile if not present
|
||||
grep -q thefuck $rcfile
|
||||
thefuck_present=$?
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
echo "makin fuckin docker DIE to rebuild it"
|
||||
|
||||
sudo docker stop $(sudo docker ps -a -q) &>/dev/null
|
||||
sudo docker rm -v $(sudo docker ps -a -q) &>/dev/null
|
||||
sudo docker rmi $(sudo docker images -a -q) &>/dev/null
|
||||
sudo docker volume rm $(sudo docker volume ls -q) &>/dev/null
|
||||
sudo docker network rm $(sudo docker network ls -q) &>/dev/null
|
||||
sudo systemctl stop docker &>/dev/null
|
||||
sudo systemctl disable docker &>/dev/null
|
||||
|
||||
echo "docker containers and shit NUKED now purgan the apps fuuuck"
|
||||
|
||||
sudo apt update &>/dev/null
|
||||
sudo apt purge docker.io docker-compose -y &>/dev/null
|
||||
|
||||
echo "docker shit fuckin purgedddd! ok now re-installin da docker shit"
|
||||
|
||||
sudo apt install -y docker.io docker-compose &>/dev/null
|
||||
|
||||
echo "re-enablin da docker shit ig"
|
||||
|
||||
sudo systemctl stop docker.service docker.socket &>/dev/null
|
||||
sudo systemctl start docker.service docker.socket &>/dev/null
|
||||
sudo systemctl enable docker.service docker.socket &>/dev/null
|
||||
sudo systemctl status docker.service docker.socket &>/dev/null
|
||||
|
||||
echo "nukan docker-data"
|
||||
|
||||
|
||||
echo "donesies docker back in black :3"
|
||||
@@ -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"
|
||||
Executable → Regular
@@ -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"
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
if [ ! -f "$1" ]; then
|
||||
echo "FAIL: $1 is Not a File!" >&2
|
||||
exit 1
|
||||
else
|
||||
sample="$1"
|
||||
fi
|
||||
|
||||
# submit da fucker ig
|
||||
curl -X POST -H "X-ApiKey: $VIRUSTOTAL_API_KEY" -F "file=@$sample" https://www.virustotal.com/api/v3/files
|
||||
|
||||
# make da sha256 for da fookin link ig for to make da fookin link jfc
|
||||
link="https://www.virustotal.com/gui/file/$(sha256sum $sample | awk '{print $1}')"
|
||||
|
||||
# fookin show the fuuuckin link fuuck
|
||||
echo -e "\nVirustotal Link: $link\n"
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
exec 2> >(tee -a /mnt/c/Users/human/Downloads/github-migrate-error-log.txt)
|
||||
|
||||
echo "Migrating repos from file list!"
|
||||
if [ -f /mnt/c/Users/human/Downloads/github-migrate-error-log.txt ]; then
|
||||
echo -e "\t error log found, deleting"
|
||||
rm -f /mnt/c/Users/human/Downloads/github-migrate-error-log.txt
|
||||
fi
|
||||
|
||||
while IFS= read -r repo; do
|
||||
local_repo="/mnt/c/Users/human/OneDrive/Documents/Git/${repo}"
|
||||
remote_repo="git-gitea:PrincessPi/${repo}.git"
|
||||
remote_repo_page="https://github.com/PrincessPi3/${repo}"
|
||||
|
||||
echo -e "\nMigrating repo at $local_repo from $remote_repo_page to $remote_repo"
|
||||
|
||||
if [ ! -d $local_repo ]; then
|
||||
echo -e "\tFAIL! $local_repo not found! carrying on to next one" >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ ! -d $local_repo/.git ]; then
|
||||
echo -e "\tNo .git found, initing it"
|
||||
git init
|
||||
fi
|
||||
|
||||
echo -e "\ttrying creating remote repo..."
|
||||
if ! tea-cli repos create --init --name $repo --login WSL; then
|
||||
echo -e "\t\t$repo already exists on gitea! not skipping!"
|
||||
# continue
|
||||
fi
|
||||
|
||||
echo -e "\tchagging dir to $local_repo"
|
||||
cd "$local_repo"
|
||||
|
||||
echo -e "\ttrying git status..."
|
||||
if ! git status; then
|
||||
echo -e "\t\tstatus messy: trying git pull..."
|
||||
if ! git pull; then
|
||||
echo -e "\t\t\tforcably syncing with old remote, preferring local..."
|
||||
echo -e "\t\t\t\tgit adding..."
|
||||
git add .
|
||||
echo -e "\t\t\t\tgit comitting..."
|
||||
git commit -m "rebase from local"
|
||||
echo -e "\t\t\t\t git force pushing"
|
||||
git push -f
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "\ttrying setting remote origin..."
|
||||
if ! git remote set-url origin $remote_repo; then
|
||||
echo -e "\t\tadding remote origin..."
|
||||
git remote add origin $remote_repo
|
||||
fi
|
||||
|
||||
echo -e "\tcreating empty file migration.tmp"
|
||||
touch migration.tmp
|
||||
|
||||
echo -e "\tgit adding and git comitting"
|
||||
git add .
|
||||
git commit -m "migration"
|
||||
|
||||
echo -e "\tTrying pushing (origin main...)"
|
||||
if ! git push -u origin main -f; then
|
||||
echo -e "\t\tTrying push (origin master)..."
|
||||
git push -u origin master -f
|
||||
fi
|
||||
done < /mnt/c/Users/human/Downloads/repos-from-github.txt
|
||||
@@ -0,0 +1,52 @@
|
||||
Media-Viewer
|
||||
fuck_git_downloader
|
||||
Anonymous_Cryptographic_Proofs_And_Auth
|
||||
ObsidianNotes
|
||||
minicomhelper
|
||||
Sex-Toy-Hackin-Pope
|
||||
Uni-Adblock
|
||||
betterhiddencrypto
|
||||
PrincessPiTracker
|
||||
GoogleFindMyTools
|
||||
Breachsilly
|
||||
nuke_me_NOW
|
||||
SillyFilly-Hardware-Attack-Tool
|
||||
flipperzero-firmware
|
||||
Job-Czar
|
||||
HelloWorld2.0-Python3
|
||||
default-passwords-masterlist
|
||||
Windows-Reverse-Engineering-Forensics-Malware-Analysis-Environment
|
||||
I-will-slap-your-shit
|
||||
pt-sillyfilly
|
||||
android-hackhackin
|
||||
bd_crack
|
||||
esp-bootrom-exploit
|
||||
ESP32-C5-Research
|
||||
Sillyfilly-espdumper
|
||||
sillytty
|
||||
Princess-Pi-s-Magical-RevShells
|
||||
EvilCrowCable-Wind-Princess-Pi-Ver
|
||||
sillyfillyTamaControl.miocropython
|
||||
Find-and-Write-BadUSB-Scripts
|
||||
PicoLogger-Hardware-Keylogger
|
||||
DELILAHS_FIST
|
||||
gremlin-theorem
|
||||
ASS
|
||||
hiddencrypto
|
||||
Flipper-Zero-Guides-Resources
|
||||
SillyfillyESPDumper
|
||||
XRLinuxDriver
|
||||
sillyfilly-exeloader
|
||||
PiPicoPATLFGGGGG
|
||||
OpenCybersecLessonPlan
|
||||
ffuf-stuff
|
||||
Sillyfilly-CAN
|
||||
403-bypass-finder
|
||||
crackhead_proxy
|
||||
getting-started-in-cybersec
|
||||
linode-nextcloud-nixos
|
||||
TamagotchiHackingNuggetTeam-7
|
||||
megapasslist
|
||||
TamagotchiHackingNuggetTeam7
|
||||
esp_quick_info_dump
|
||||
android-hackhackin
|
||||
@@ -0,0 +1 @@
|
||||
balzac release 1.0
|
||||
Reference in New Issue
Block a user