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
//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
#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 :) |
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
#/* | |
TARGET=selfcompiled | |
CODE=$(cat <<'FILE_CONTENTS_DELIM' | |
//*/ | |
// CODE STARTS HERE | |
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
diff -Naur mbedtls/include/mbedtls/config.h mbedtls-dh-anon/include/mbedtls/config.h | |
--- mbedtls/include/mbedtls/config.h 2018-04-10 11:30:33.713503768 +0200 | |
+++ mbedtls-dh-anon/include/mbedtls/config.h 2018-04-10 11:38:50.001356927 +0200 | |
@@ -637,6 +637,36 @@ | |
#define MBEDTLS_ECDSA_DETERMINISTIC | |
/** | |
+ * \def MBEDTLS_KEY_EXCHANGE_DH_ANON_ENABLED | |
+ * | |
+ * Enable the ADH based ciphersuite modes in SSL / TLS. |
OlderNewer