- [Applied Crypto Hardening][ACH]
- [Linode: Set up a hardened OpenVPN Server][Linode]
- [Weak Diffie-Hellman and the Logjam Attack][WeakDH]
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
# MikroTik (RouterOS) script for automatically setting DNS records | |
# for clients when they obtain a DHCP lease. | |
# | |
# author SmartFinn <https://gist.github.com/SmartFinn> | |
# based on https://github.com/karrots/ROS-DDNS | |
# modified 20200412 a-a to allow multiple IPs per host | |
# modified 20200417 a-a, add functionality to strip anything after hostname, add variables to control optional features. | |
# modified 20200901 filcab, add a way to have a domain prefix for DHCP-related hostnames | |
# Set to "true" if adding multiple IP addresses to the same hostname is acceptable, ie for clients with wireless and a wire. |
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
filcab@aku ~/src> cat a.cpp 1 ↵ master* | |
#include <map> | |
typedef std::map<int, long> collection; | |
typedef collection::iterator iterator; | |
filcab@aku ~/src> clang++ a.cpp -c -o a.o -D_GLIBCXX_DEBUG master* | |
In file included from a.cpp:1: | |
In file included from /usr/include/c++/4.2/map:69: | |
In file included from /usr/include/c++/4.2/debug/map:39: |
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
type RowState = !(Int, Int, String, TrackWords) | |
stN :: RowState -> Int | |
stN (n,_,_,_) = n | |
stRows :: RowState -> Int | |
stRows (_,rows,_,_) = rows | |
stTid :: RowState -> String | |
stTid (_,_,tid,_) = tid | |
stTw :: RowState -> TrackWords | |
stTw (_,_,_,tw) = tw | |
initialState :: RowState |
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 -ru afl-1.06b/afl-gcc.c afl-1.06b-patched/afl-gcc.c | |
--- afl-1.06b/afl-gcc.c 2014-12-06 03:18:16.000000000 +0000 | |
+++ afl-1.06b-patched/afl-gcc.c 2015-01-03 22:03:14.000000000 +0000 | |
@@ -192,6 +192,11 @@ | |
if (!strcmp(cur, "-pipe")) continue; | |
+ // Don't dead-strip for now since it might screw up some of our | |
+ // payloads, especially when subsections_via_symbols is emitted by the | |
+ // compiler (like clang does on MacOS X) |
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
#!/usr/bin/env zsh | |
repo=$1 | |
svn_repo=$repo | |
if [ "$repo" = "clang" ]; then | |
svn_repo=cfe | |
fi | |
echo "[*] Cloning $repo.git (based on $svn_repo/trunk)" |
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
LLVM IR: | |
define <8 x double> @vsel_double8(<8 x double> %v1, <8 x double> %v2) { | |
%vsel = select <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <8 x double> %v1, <8 x double> %v2 | |
ret <8 x double> %vsel | |
} | |
$ llc -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx -debug |
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
Args: ../llvm-cmake/bin/llc -O3 -mattr=sse4.1 -o - insertps.ll -debug | |
Features:+64bit,+sse2,+sse4.1 | |
CPU:generic | |
Subtarget features: SSELevel 6, 3DNowLevel 0, 64bit 1 | |
.section __TEXT,__text,regular,pure_instructions | |
.macosx_version_min 13, 1 | |
********** Begin Constant Hoisting ********** | |
********** Function: move_1_to_2 |
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
define <4 x i32> @move_1_to_2(<4 x i32> %x, <4 x i32> %a){ | |
entry: | |
%vecext1 = extractelement <4 x i32> %x, i32 1 | |
%vecext2 = extractelement <4 x i32> %x, i32 3 | |
%vecinit2 = insertelement <4 x i32> undef, i32 %vecext1, i32 2 | |
%vecinit3 = insertelement <4 x i32> %vecinit2, i32 0, i32 1 | |
%vecinit4 = insertelement <4 x i32> %vecinit3, i32 %vecext2, i32 3 | |
ret <4 x i32> %vecinit4 | |
} |
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
use Digest::MD5 qw(md5_hex); | |
$a = md5_hex('240610708'); | |
$b = md5_hex('QNKCDZO'); | |
print "$a\n"; | |
print "$b\n"; | |
print "\n"; | |
print ($a == $b); |