Skip to content

Instantly share code, notes, and snippets.

import ipaddress
import hypothesis.strategies as S
@S.compound
def ip4_networks(draw):
prefixlen = draw(S.integers(min_value=0, max_value=32))
if prefixlen:
network_bits = draw(S.integers(min_value=0, max_value=(1 << prefixlen) - 1))
@gmacon
gmacon / spm_non_root.py
Created March 8, 2018 16:18
script to run spm as a non-root user (for spm build)
#!/usr/bin/env python2
import os
import os.path
import shutil
import subprocess
import sys
import tempfile
import yaml
pipeline:
clone:
git:
image: plugins/git
recursive: true
submodule-override:
path/to/module: https://redacted/redacted.git
# ... more stuff
@gmacon
gmacon / build.log
Created May 26, 2017 12:52
yara-python-3.6.0 build log
Building wheels for collected packages: yara-python
Running setup.py bdist_wheel for yara-python ... error
Complete output from command python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Dbps0B/yara-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpO5jxxNpip-wheel-:
running bdist_wheel
running build
running build_ext
building 'yara' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/yara
@gmacon
gmacon / output
Last active August 3, 2016 20:37
forked child with pid 7505 master fd is 3, 1 outstanding
forked child with pid 7506 master fd is 4, 2 outstanding
forked child with pid 7507 master fd is 5, 3 outstanding
forked child with pid 7508 master fd is 6, 4 outstanding
forked child with pid 7509 master fd is 7, 5 outstanding
forked child with pid 7510 master fd is 8, 6 outstanding
forked child with pid 7511 master fd is 9, 7 outstanding
forked child with pid 7512 master fd is 10, 8 outstanding
forked child with pid 7513 master fd is 11, 9 outstanding
forked child with pid 7514 master fd is 12, 10 outstanding
http://kj4jzy.org, http://www.kj4jzy.org {
redir https://www.kj4jzy.org/
}
https://kj4jzy.org {
redir https://www.kj4jzy.org/
}
https://www.kj4jzy.org {
root /home/gmacon/public_html
@gmacon
gmacon / keybase.md
Created February 8, 2016 02:39
keybase proof

Keybase proof

I hereby claim:

  • I am gmacon on github.
  • I am gmacon (https://keybase.io/gmacon) on keybase.
  • I have a public key ASD9t8ZHD28lPp1BnL_uE4Sp7F-dAm5R1PT62TVbzVfNUQo

To claim this, I am signing this object:

(venv)vagrant@vagrant-ubuntu-precise-64:/vagrant$ fpm --verbose -s python -t deb mock
Setting workdir {:workdir=>"/tmp", :level=>:info}
Trying to download {:package=>"mock", :level=>:info}
Searching for mock {:level=>:info}
Reading http://pypi.python.org/simple/mock/ {:level=>:info}
Best match: mock 1.1.4 {:level=>:info}
Downloading https://pypi.python.org/packages/source/m/mock/mock-1.1.4.tar.gz#md5=84afbeb2415bf3d6608dac4423a56325 {:level=>:info}
Processing mock-1.1.4.tar.gz {:level=>:info}
{:level=>:info}
Extracted editable version of mock to /tmp/package-python-build20150717-17143-16waue/mock/mock {:level=>:info}
Return-Path: <aaa@forward.nearlyfreespeech.net>
Received: from imp04 ([10.20.200.4]) by mta62.charter.net
(InterMail vM.8.01.05.02 201-2260-151-103-20110920) with ESMTP
id <20150310142515.CVEK25393.mta62.charter.net@imp04>
for <bbb@charter.net>; Tue, 10 Mar 2015 10:25:15 -0400
Received: from mtain005.msg.strl.va.charter.net ([68.114.190.15])
by imp04 with charter.net
id 1qRF1q01W0LNs2C04qRFY9; Tue, 10 Mar 2015 10:25:15 -0400
Received: from impin003 ([68.114.189.27])
by mtain005.msg.strl.va.charter.net
@gmacon
gmacon / gist:9105723
Created February 20, 2014 02:08
A trace of OpenSSL's s_client connecting to a server using the wrong DNS name.
% openssl s_client -connect bob.sni.velox.ch:443 -CAfile QuoVadisRootCA2.pem -verify 10
verify depth is 10
CONNECTED(00000003)
depth=2 /C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2
verify return:1
depth=1 /C=BM/O=QuoVadis Limited/OU=www.quovadisglobal.com/CN=QuoVadis Global SSL ICA
verify return:1
depth=0 /C=CH/ST=Zuerich/L=Zuerich/O=Kaspar Brand/CN=alice.sni.velox.ch
verify return:1
---