Skip to content

Instantly share code, notes, and snippets.

View jvehent's full-sized avatar

Julien Vehent jvehent

View GitHub Profile
<div class="section" id="search-options">
<h2><a class="toc-backref" href="#id4">1.3&nbsp;&nbsp;&nbsp;Search Options</a></h2>
<p>Several options can be applied to a search:</p>
<ul>
<li><p class="first"><strong>macroal</strong> stands for &quot;Match All Contents Regexes On All Lines&quot;. It's a boolean
option that requires that all <cite>content</cite> regexes must match on all the lines of
a file. By default, content regexes are applied at the file level and will
return a match if one line matches one regex, and if another line matches another
regex. When the <cite>macroal</cite> option is set, each line in the file must match all
content regexes defined in a given search to return a match. It is set to not
#!/bin/sh
export STATICLIBSSL="/tmp/staticlibssl"
rm -rf "$STATICLIBSSL"
mkdir "$STATICLIBSSL"
make clean
./config --prefix=$STATICLIBSSL no-shared enable-ec_nistp_64_gcc_128
make depend
make
@jvehent
jvehent / pgpkeydetail.go
Created April 5, 2014 16:39
Parsing PGP keys in Go
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"crypto/rsa"
"encoding/hex"
"fmt"
"strconv"
"strings"
$ ./cipherscan foxguardsolutions.com
.........
prio ciphersuite protocols pfs_keysize
1 RC4-SHA SSLv3,TLSv1,TLSv1.1
2 RC4-MD5 SSLv3,TLSv1,TLSv1.1
3 AES128-SHA SSLv3,TLSv1,TLSv1.1
4 DHE-RSA-AES128-SHA SSLv3,TLSv1,TLSv1.1 DH,1024bits
5 AES256-SHA SSLv3,TLSv1,TLSv1.1
6 DHE-RSA-AES256-SHA SSLv3,TLSv1,TLSv1.1 DH,1024bits
7 DES-CBC3-SHA SSLv3,TLSv1,TLSv1.1
@jvehent
jvehent / find_out_init_system.go
Last active August 29, 2015 14:03
Find out what init system your linux is running
// Find out what init system your linux is running
//
// $ go run find_out_init_system.go
// Systemd
//
// ulfr - 2014
package main
import (
@jvehent
jvehent / pcap.go
Created July 13, 2014 15:16
Portable packet capture in Go
// To build, you will need:
// $ sudo yum install libpcap-devel
// and
// $ go get -u code.google.com/p/gopacket/pcap
// then go build pcap.go and copy the resulting pcap binary anywhere
// (on the same platform you build on)
package main
import (
"fmt"
@jvehent
jvehent / gist:94cd0720985b04e5fd0f
Last active August 29, 2015 14:11
aws-go s3 upload request
package main
import (
"code.google.com/p/gcfg"
"fmt"
"github.com/stripe/aws-go/aws"
"github.com/stripe/aws-go/gen/s3"
"os"
)
@jvehent
jvehent / asset_hint.json
Last active August 29, 2015 14:16
Example of host in asset_hint format
{
"timestamp": "2014-02-14T11:48:19.035762739-05:00",
"summary": "mig discovered host server1.net.example.com",
"hostname": "mig-worker1.use1.opsec.mozilla.com",
"severity": "INFO",
"category": "asset_hint",
"tags": [
"MIG",
"Asset"
],
$ ./cipherscan www.backblaze.com
..
Target: www.backblaze.com:443
prio ciphersuite protocols pfs_keysize
1 RC4-SHA TLSv1
Certificate: trusted, 2048 bit, sha256WithRSAEncryption signature
TLS ticket lifetime hint: None
OCSP stapling: not supported
$ ./cipherscan blog.backblaze.com
.......
Target: blog.backblaze.com:443
prio ciphersuite protocols pfs_keysize
1 DHE-RSA-AES256-SHA TLSv1 DH,1024bits
2 DHE-RSA-AES128-SHA TLSv1 DH,1024bits
3 EDH-RSA-DES-CBC3-SHA TLSv1 DH,1024bits
4 AES256-SHA TLSv1
5 AES128-SHA TLSv1