Skip to content

Instantly share code, notes, and snippets.

View vpereira's full-sized avatar

Victor Pereira vpereira

View GitHub Profile
require 'java'
require 'jnetpcap.jar'
require 'ipaddr'
require 'json'
class PacketHandler
include Java::org::jnetpcap::packet::PcapPacketHandler
def initialize
@tcp_header =
vpereira / exploit.rb
Created November 27, 2013 16:51 — forked from jacopen/exploit.rb
require 'yajl'
require 'json'
require 'oj'
def digit_pattern
digit_pattern ||= rand(10000).to_s
def integer_part
vpereira /
Created August 5, 2012 21:18 — forked from thomasbhatia/
Basic QoS with iproute2 and OpenDPI Netfilter wrapper
# Basic QoS script that uses OpenDPI (
# Netfilter wrapper to identify packets by the protocol.
# This script enqueues packets in three queues, each one
# with a different priority:
# The first queue has the higher priority and gets the TCP SYN
# packets, ACKs, ICMPs and packets with Minimize-Delay TOS.