Skip to content

Instantly share code, notes, and snippets.

View dstockto's full-sized avatar
💭
Learning Go and Rust

David Stockton dstockto

💭
Learning Go and Rust
View GitHub Profile

Extending Z-Ray

This is a guide aimed at providing some details on Z-ray extensibility API, and some methodologies/examples on how to write extensions.

Disclaimer: This an early DRAFT, information might be outdated by the time it is being read, or might just be plain wrong. At the time of writing there is no official documentation yet, so this is aimed at filling the blanks.

#Files

Extensions reside in zend-install-path/var/zray/extensions/

@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
@bobuss
bobuss / Calisthenics.md
Last active March 31, 2024 09:41
The 9 Rules of Object Calisthenics

Object Calisthenics outlines 9 basic rules to apply when performing the exercise:

  • One level of indentation per method.
  • Don't use the ELSE keyword.
  • Wrap all primitives and Strings in classes.
  • First class collections.
  • One dot per line.
  • Don't abbreviate.
  • Keep all classes less than 50 lines.
  • No classes with more than two instance variables.
@bradwilson
bradwilson / gist:4215933
Last active August 17, 2020 16:46
.gitconfig
[user]
name = Brad Wilson
email = dotnetguy@gmail.com
[alias]
a = add -A
abort = rebase --abort
amend = commit --amend -C HEAD
bl = blame -w -M -C
br = branch
cat = cat-file -t
@ziadoz
ziadoz / awesome-php.md
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.