Skip to content

Instantly share code, notes, and snippets.

@Zibri
Zibri / WishSortPrice.js
Created Jan 6, 2018 — forked from LiquidSebbey/WishSortPrice.js
Sort Wish.com results by price
View WishSortPrice.js
$("<style>.overlay { position:absolute; background-color: white; top:0; left:0; width:100%; height:100%; z-index:1000; } .loader { position: fixed; top: 1em; padding: 15px; maring: 15px; border: 1px solid #000000; border-radius: 10px; background-color: #CC0000; color: #FFFFFF; right: 1em; z-index: 999999999999; }</style>").appendTo("head");
$("body").append("<div id='overlay' class='overlay'></div><div id='loader' class='loader'><b>Bezig met inladen en sorteren ...</b></div>");
maxProducts = prompt("Hoeveel producten wil je inladen? (max. 500)");
var app = setInterval(function(){
if ($(".feed-product-item").length < maxProducts){
View HDCP MASTER KEY
HDCP MASTER KEY (MIRROR THIS TEXT!)
This is a forty times forty element matrix of fifty-six bit
hexadecimal numbers.
To generate a source key, take a forty-bit number that (in
binary) consists of twenty ones and twenty zeroes; this is
the source KSV. Add together those twenty rows of the matrix
that correspond to the ones in the KSV (with the lowest bit
in the KSV corresponding to the first row), taking all elements
@Zibri
Zibri / inlineworker.js
Created Jun 28, 2018 — forked from SunboX/inlineworker.js
Create web workers without a separate worker JS files. Source: http://jsbin.com/owogib/8/
View inlineworker.js
function worker() {
setInterval(function() {
postMessage({foo: "bar"});
}, 1000);
}
var code = worker.toString();
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}"));
var blob = new Blob([code], {type: "application/javascript"});
@Zibri
Zibri / Deobfuscator.html
Last active Jul 3, 2018
OpenRG Deobfuscator
View Deobfuscator.html
<html>
<head>
<script type="text/javascript">
if (document.images) {
img1 = new Image();
img1.src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto1.jpg";
img2 = new Image();
img2.src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto2.jpg";
}
@Zibri
Zibri / background.js
Created Apr 23, 2019 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
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 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.
@Zibri
Zibri / trick.txt
Last active Jul 26, 2019
A trick as old as Unix.
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!
$
@Zibri
Zibri / reindent.sh
Created Aug 2, 2019
Reindent any bash script the "bash" way.
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/ /"
@Zibri
Zibri / getusage.sh
Created Aug 5, 2019
Get network data usage from Android phone.
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));