View crt.css
// CRT effect with flickering scanlines and RGB grid. | |
// By zibri@zibri.org | |
// <html class="crt"> </html> | |
@keyframes flicker { | |
50% { | |
top: -3px | |
} | |
} |
View gitclean.sh
#!/bin/bash | |
# | |
# By Zibri (2019) | |
# | |
# Usage: gitclean username password giturl | |
# | |
gitclean () | |
{ | |
odir=$PWD; | |
if [ "$#" -ne 3 ]; then |
View zibri_ssh.patch
diff -u openssh-7.6p1/scp.c openssh-7.6p1z/scp.c | |
--- openssh-7.6p1/scp.c 2017-10-02 21:34:26.000000000 +0200 | |
+++ openssh-7.6p1z/scp.c 2019-08-31 19:06:33.708897414 +0200 | |
@@ -152,6 +152,9 @@ | |
/* This is the program to execute for the secured connection. ("ssh" or -S) */ | |
char *ssh_program = _PATH_SSH_PROGRAM; | |
+/* This is used to store the source_port specified by -Z */ | |
+char *source_port = NULL; | |
+ |
View browser_otp.js
// This code produces a different 6 digits OTP every 30 seconds. | |
// numDigits must be between 1 and 8 | |
otp = await (async (secret,numDigits)=>(Array.prototype.reduce.call(new Uint8Array(await crypto.subtle.digest('SHA-512',new TextEncoder().encode(secret+(Math.floor(new Date().getTime()/30000)).toString(16)))), (a,b,c)=>((((a*257) ^ b) >>> 0) % (10**numDigits)) )).toString().padStart(numDigits,"0")) | |
("test_secret",6) | |
OR | |
Object.defineProperty(window, 'otp', { get: async (secret="test_secret",numDigits=6)=>(Array.prototype.reduce.call(new Uint8Array(await crypto.subtle.digest('SHA-512',new TextEncoder().encode(secret+(Math.floor(new Date().getTime()/30000)).toString(16)))), (a,b,c)=>((((a*257) ^ b) >>> 0) % (10**numDigits)) )).toString().padStart(numDigits,"0") }); |
View getusage.sh
#!/bin/bash | |
# Get android network usage statistics from phone. | |
# by Zibri | |
function getUsage () | |
{ | |
rb=0; | |
tb=0; | |
for a in $(adb shell dumpsys netstats|grep "rb="|cut -d "=" -f 3|cut -d " " -f 1); | |
do | |
rb=$((rb+a/1024)); |
View reindent.sh
#!/bin/bash | |
# By Zibri (www.zibri.org) | |
# Usage: reindent script.sh >script_nicer.sh | |
# | |
reindent () | |
{ | |
rstr=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1); | |
source <(echo "Zibri () {";cat "$1"|sed -e "s/^\s\s\s\s/$rstr/"; echo "}"); | |
echo '#!/bin/bash'; | |
declare -f Zibri | head --lines=-1 | tail --lines=+3 | sed -e "s/^\s\s\s\s//;s/$rstr/ /" |
View hex2bin_by_zibri.c
/* | |
Best hex2bin function I came up with. | |
By Zibri | |
Valid strings examples: | |
"1 d0 600d c0FFeE" | |
"01d0600dc0ffee" | |
Spaces are ignored. | |
Parsing stops at the first non hex character. |
View background.js
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
View trick.txt
$ echo ZWNobyAiQnllLWJ5ZSBXb3JsZCEiIDsjDSMhL2Jpbi9zaCAgICAgICAgICAgICAgICANCiMNZWNobyAiSGVsbG8gV29ybGQhIg0K | base64 -d >test.sh | |
$ chmod a+x test.sh | |
$ cat test.sh | |
#!/bin/sh | |
echo "Hello World!" | |
$ ./test.sh | |
Bye-bye World! | |
$ |
NewerOlder