This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import httplib | |
import json | |
class StaticFlowPusher(object): | |
def __init__(self, server): | |
self.server = server | |
def get(self, data): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from mininet.net import Mininet | |
from mininet.node import Controller, RemoteController | |
from mininet.cli import CLI | |
from mininet.log import setLogLevel, info | |
from mininet.link import Link, Intf, TCLink | |
from mininet.topo import Topo | |
from mininet.util import dumpNodeConnections | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config interface 'loopback' | |
option ifname 'lo' | |
option proto 'static' | |
option ipaddr '127.0.0.1' | |
option netmask '255.0.0.0' | |
config interface 'lan1' | |
option ifname 'eth0.1' | |
option proto 'static' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config rule | |
option src wan | |
option src_ip '' | |
option proto tcp | |
option dest_port 22 | |
option target ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from mininet.net import Mininet | |
from mininet.node import Controller, RemoteController | |
from mininet.cli import CLI | |
from mininet.link import Intf | |
from mininet.log import setLogLevel, info | |
def myNetwork(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRIDGE_NAME= | |
COLLECTOR_IP= | |
COLLECTOR_PORT= | |
TIMEOUT=10 | |
ovs-vsctl -- set Bridge ${BRIDGE_NAME} netflow=@nf \ | |
-- --id=@nf create NetFlow target=\"${COLLECTOR_IP}:${COLLECTOR_PORT}\" active-timeout=${TIMEOUT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
COLLECTOR_IP= | |
COLLECTOR_PORT= | |
AGENT= | |
HEADER=128 | |
SAMPLING=512 | |
POLLING=10 | |
BRIDGE_NAME= | |
sudo ovs-vsctl -- --id=@sflow create sflow agent=${AGENT} \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://http.kali.org/kali kali-rolling main contrib non-free | |
deb-src http://http.kali.org/kali kali-rolling main contrib non-free | |
#deb http://kali.cs.nctu.edu.tw/kali kali-rolling main non-free contrib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Follow http://danmcinerney.org/http-post-analyzer-in-python/ | |
Enviroment: python2.x and scapy | |
Goal: Use scapy to sniffer tcp 80 port | |
""" | |
import logging | |
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) | |
from scapy.all import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
Coursera: | |
- Software Defined Networking (SDN) course | |
-- Programming Assignment 2 | |
Professor: Nick Feamster | |
Teaching Assistant: Arpit Gupta, Muhammad Shahbaz | |
''' |
OlderNewer