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 = Java::org::jnetpcap::protocol::tcpip::Tcp.new
@vpereira
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
end
def integer_part
digit_pattern
@vpereira
vpereira / qos-opendpi.sh
Created August 5, 2012 21:18 — forked from thomasbhatia/qos-opendpi.sh
Basic QoS with iproute2 and OpenDPI Netfilter wrapper
#!/bin/bash
# Basic QoS script that uses OpenDPI (http://www.opendpi.org/)
# 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.