Skip to content

Instantly share code, notes, and snippets.

@santisaez
santisaez / poodle.md
Last active August 29, 2015 14:07
#poodle recap

#poodle recap

Enable SSL debug on Apache and check if your clients are using SSLv3, you will get the protocol+cipher used for each HTTPS request:

CustomLog /tmp/apache_ssl.log "%v %a %{SSL_PROTOCOL}x %{SSL_CIPHER}x"

Tip: see mod_ssl documentation if you need other SSL environment variables.

If possible, disable SSLv3 on the web server:

@santisaez
santisaez / benchmark.py
Created July 15, 2011 15:43
InnoDB 1GB data
#!/usr/bin/python
import MySQLdb
import time
conn = MySQLdb.connect(host="localhost", db= "benchmark", read_default_file="~/.my.cnf")
cursor = conn.cursor()
id = 1
count = 28200000
@santisaez
santisaez / memcached-oom.py
Created January 5, 2012 10:09
SERVER_ERROR out of memory storing object with memcached 1.4.10
#!/usr/bin/python
import memcache
import sys
import random
MEMCACHED_SERVER = sys.argv[1]
MEMCACHED_PORT = '11211'
MEMCACHED_KEY = 'testing.' + str(random.randint(1, pow(2,16))) + '.'
make all-recursive
make[1]: Entering directory `/tmp/memcached-1.4.11'
Making all in doc
make[2]: Entering directory `/tmp/memcached-1.4.11/doc'
make all-am
make[3]: Entering directory `/tmp/memcached-1.4.11/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/tmp/memcached-1.4.11/doc'
make[2]: Leaving directory `/tmp/memcached-1.4.11/doc'
make[2]: Entering directory `/tmp/memcached-1.4.11'
@santisaez
santisaez / gist:1632139
Created January 18, 2012 09:27
memcached 1.4.11 RPM build on RHEL-6 i386
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.yLSyEc
+ umask 022
+ cd /home/powerstack/BUILD
+ cd /home/powerstack/BUILD
+ rm -rf memcached-1.4.11
+ /usr/bin/gzip -dc /home/powerstack/SOURCES/memcached-1.4.11.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd memcached-1.4.11
@santisaez
santisaez / gist:1632081
Created January 18, 2012 09:04
memcached 1.4.11 build on RHEL-5 i386 (./configure and make outputs)
$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
@santisaez
santisaez / gist:1639412
Created January 19, 2012 10:59
memcached 1.4.11 and make test fails on RHEL-6 i386
[powerstack@centos-6-i386 memcached-1.4.11]$ make test
./sizes
Slab Stats 64
Thread stats 200
Global stats 196
Settings 96
Item (no cas) 32
Item (cas) 40
Libevent thread 96
Connection 320
@santisaez
santisaez / gist:1639453
Created January 19, 2012 11:12
memcached 1.4.11 and make test fails on RHEL-4 i386
[powerstack@centos-4-i386 memcached-1.4.11]$ make test
./sizes
Slab Stats 64
Thread stats 200
Global stats 196
Settings 96
Item (no cas) 32
Item (cas) 40
Libevent thread 96
Connection 320
@santisaez
santisaez / gist:1639368
Created January 19, 2012 10:45
memcached 1.4.11 and make test fails on RHEL-5 i386
[powerstack@centos-5-i386 memcached-1.4.11]$ make test
./sizes
Slab Stats 64
Thread stats 200
Global stats 196
Settings 96
Item (no cas) 32
Item (cas) 40
Libevent thread 96
Connection 320
@santisaez
santisaez / gist:3226594
Created August 1, 2012 12:49
NTP fingerprint for hora.rediris.es
NTP fingerprinting script is available on http://kcy.me/a70n, those are the results for public RedIRIS NTP server:
$./ntp.pl -t hora.rediris.es
** It was possible to gather the following information from the remote NTP host hora.rediris.es
NTP daemon: Version=ntpd 4.2.0@1.1161-r Thu Dec 22 11:32:11 UTC 2005 (3)
Processor: i686
Operating System: Linux/2.4.23-NANOTIM