Skip to content

Instantly share code, notes, and snippets.

View Sp1l's full-sized avatar

Bernard Spil Sp1l

View GitHub Profile
pkg query -g '%n-%v %dn-%dv' '*' | \
while read pkg dep ; do
[ "$pkg" != "$prev" ] && echo $pkg
echo "> $dep"
prev=$pkg
done > ${pkg_logs}/${datestamp}.pkg_tree
@Sp1l
Sp1l / LibreSSL
Last active August 29, 2015 14:07
LibreSSL
http://www.openbsd.org/papers/eurobsdcon2014_arc4random/index.html
https://svnweb.freebsd.org/base?view=revision&revision=267379
http://thread.gmane.org/gmane.os.netbsd.bugs/10114
http://www.openbsd.org/papers/eurobsdcon2014-libressl.html
https://github.com/gentoo/libressl/
Replace SSLv23_method with TLSv1_method (but loose support for 1.1 and 1.2)
Libressl removed:
- compression
@Sp1l
Sp1l / LibreSSL-frogs
Last active August 29, 2015 14:07
FreeBSD LibreSSL info from frogs
http://pastebin.com/raw.php?i=3J2M0qTU
switching freebsd ports from openssl to libressl
* identify which programs and libraries are using openssl
* for base programs (like openssh) you will need to switch to the ports equivalent
sh -c 'find /usr/local -type f -exec ldd {} + 2> /dev/null | \
# make
os.c:298:22: error: implicit declaration of function 'kmem_alloc_nofault' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
vm_offset_t res = kmem_alloc_nofault(kernel_map, PAGE_SIZE);
^
os.c:355:14: error: incompatible pointer types passing 'vm_map_t'
(aka 'struct vm_map *') to parameter of type 'struct vmem *'
[-Werror,-Wincompatible-pointer-types]
kmem_free(kernel_map, (vm_offset_t)mapping, PAGE_SIZE);
^~~~~~~~~~
Obtaining cipher list from OpenSSL 1.0.1i-freebsd 6 Aug 2014.
Testing ECDHE-RSA-AES256-GCM-SHA384...YES
Testing ECDHE-ECDSA-AES256-GCM-SHA384...NO (sslv3 alert handshake failure)
Testing ECDHE-RSA-AES256-SHA384...YES
Testing ECDHE-ECDSA-AES256-SHA384...NO (sslv3 alert handshake failure)
Testing ECDHE-RSA-AES256-SHA...YES
Testing ECDHE-ECDSA-AES256-SHA...NO (sslv3 alert handshake failure)
Testing SRP-DSS-AES-256-CBC-SHA...NO (no ciphers available)
Testing SRP-RSA-AES-256-CBC-SHA...NO (no ciphers available)
Testing SRP-AES-256-CBC-SHA...NO (no ciphers available)
@Sp1l
Sp1l / autotools
Last active August 29, 2015 14:10
Checking for LibreSSL with autotools
### Pass LDFLAGS and CPPFLAGS to configure using CONFIGURE_ENV
.if ${WITH_OPENSSL_PORT}
CONFIGURE_ENV+= CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
.endif
### In configure.ac
AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
@Sp1l
Sp1l / python-test
Created November 28, 2014 14:03
Testing python builds
export LD_LIBRARY_PATH=/usr/ports/lang/python35/work/stage/usr/local/lib
export PYTHONPATH=/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5
/usr/ports/lang/python35/work/stage/usr/local
bin/python3.5 /usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py >~/test_ssl.log 2>&1
@Sp1l
Sp1l / BrowserPrivacy_nl.md
Last active August 29, 2015 14:14
Browser Privacy (Dutch)

Algemeen

Vormen van tracking

Social networks

Heel veel websites hebben "Share" buttons voor de populaire sociale netwerken (Facebook, Twitter, Google, Reddit, etc.). Deze buttons halen meestal wat op bij de dienst zelf en geven daarbij prijs welke sites je allemaal bezoekt. Als je aangemeld bent op een sociaal netwerk dan wordt jouw bezoek netjes aan je account gekoppeld. Je activiteit op het sociale netwerk zelf geeft nóg meer inzicht in jouw profiel. Veelal worden links verkort (e.g. fb.me, goo.gl, etc) waardoor zeer eenvoudig vastgelegd kan worden dat je de link bezocht hebt. Dit alles staat de beheerders van deze sociale netwerken toe een zeer accuraat profiel van jou op te bouwen. Recent onderzoekt geeft aan dat de sociale netwerken je beter kennen dan je broer of zus.

Ad networks

Doordat reclame op veel sites van dezelfde reclame-netwerken afkomstig is kunnen ook zij je op internet goed volgen. De eerste keer dat je een reclame-banner van zo'n netwerk ophaalt wordt er een "cookie" geplaa

music_directory "/home/www/Music"
playlist_directory "/var/mpd/playlists"
db_file "/var/mpd/database"
log_file "/var/mpd/log"
pid_file "/var/mpd/pid"
state_file "/var/mpd/state"
sticker_file "/var/mpd.mpd/sticker.sql"
user "mpd"
bind_to_address "any"
input {
@Sp1l
Sp1l / pwsafe.md
Created March 24, 2015 08:55
PasswordSafe usage [Dutch]