Skip to content

Instantly share code, notes, and snippets.

View mgmarino's full-sized avatar

Michael Marino mgmarino

View GitHub Profile
@takeshixx
takeshixx / hb-test.py
Last active July 4, 2024 03:29
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
@mgmarino
mgmarino / wrap_python.sh
Created June 20, 2012 20:36
Wrap Python calls for use on SLAC batch system (64-bit rhel5)
#!/bin/sh
# Usage:
# Make sure this script is executable (chmod +x) and then use it in place of
# 'python' when submitting batch jobs or on 64-bit machines.
#
# If it is in your path (for example in your ~/bin directory and ~/bin is in your path), you
# can simply put:
#
# #!/usr/bin/env wrap_python.sh
#
@mgmarino
mgmarino / mpi4py_master_slave.py
Last active December 2, 2020 14:53
mpi4py standard slave/worker
#!/usr/bin/env python
"""
Standard Master/Slave design in mpi4py, collects results in a list and pickles them to a file.
"""
import ROOT
from mpi4py import MPI
import sys
import cPickle as pick