This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* search and replace are arrays (btw string is an array of characters) | |
* replaceParallel('ab', 'ba', 'abc') -> bac | |
* replaceParallel(['123', '2', '3', 'a'], ['2', '123', 'a', '3'], '1232322ac3') -> 2123a1231233ca | |
* Note: order matters if one search string begins with another | |
*/ | |
function replaceParallel(search, replace, str) { | |
var t, ret = '', replaced = false, cursor = 0; | |
while (cursor<str.length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ShoutCast.com song history | |
// @author zb3 | |
// @include http://*shoutcast.com* | |
// @include https://*shoutcast.com* | |
// @grant none | |
// ==/UserScript== | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcc netoff.c -o netoff | |
cp netoff /usr/bin/ | |
cp netoff /usr/bin/netlo | |
chmod 4755 /usr/bin/netoff | |
chmod 4755 /usr/bin/netlo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cracks for open source software are always cool.... | |
#requires root privileges to replace omni.ja | |
#needs to be reapplied on reinstall | |
#you'll also need to set xpinstall.signatures.required to false | |
#and restart your browser | |
#tested on arch with FF48 | |
OMNI_PATH=${1:-/usr/lib/firefox} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Entropy quine generator.... | |
//of course it all depends on precision... | |
function display(entropy) { | |
return 'Shannon entropy of this text is about ' + entropy; //+', 2X entropy: '+(2*entropy); | |
} | |
var precision = 15; | |
var maxTriesPerIter = 400; | |
var maxIters = 400; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import subprocess | |
# recursively strip all EXIF info + metadata, BUT preserve date and time | |
# requires jhead (tested on jhead v3.00) | |
if len(sys.argv) < 2: | |
print('%s [path]') | |
exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
note this is not "correct" | |
it was made to deobfuscate particular obfuscated files | |
"proper" tool should probably operate on AST to properly parse the file | |
but even that's not enough - you can't assume things we do here | |
*/ | |
function unwrap_hexstr_literals($src) //currently only \xHH and \nnn supported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <time.h> | |
#include <sys/select.h> | |
#include <termios.h> | |
//pauseable terminal stopwatch. | |
//couldn't find it anywhere :< | |
//ok maybe I can't name it properly | |
//and that's why I couldn't find it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
import re | |
import os | |
from collections import defaultdict | |
# | |
# similar tool exists: https://sourceware.org/ml/binutils/2010-07/msg00172.html | |
# but we aim to support string literals... by "interpreting" selected instructions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from z3 import * | |
""" | |
Solver for this kind of stuff (z3 is the solver here, this tool simply uses it): | |
http://www.pcg-random.org/posts/predictability-party-tricks.html | |
https://lemire.me/blog/2017/08/22/cracking-random-number-generators-xoroshiro128/ | |
I still don't know how they did it, but it seems solvers can crack this pretty easily. | |
This generates the same output though :) |
OlderNewer