Skip to content

Instantly share code, notes, and snippets.

@shangbo
shangbo / ip_queue.h
Last active August 29, 2015 14:00
ip_queue.h( A deprecated head file for linux, but be needed by libfilter_queue)
//A deprecated head file for linux, but be needed by libfilter_queue
//put this file in the path: /usr/include/linux/netfilter_ipv4/
/*
* * This is a module which is used for queueing IPv4 packets and
* * communicating with userspace via netlink.
* *
* * (C) 2000 James Morris, this code is GPL.
* */
#ifndef _IP_QUEUE_H
#define _IP_QUEUE_H
@shangbo
shangbo / lib_1.py
Created March 27, 2014 06:34
"fundamentals of compiling"'s homework, count the variable
#!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
# __author__ = "Shaun"
import sys
VAR = []
@shangbo
shangbo / new_shell.py
Created February 24, 2014 15:50
homework about a simple shell
#!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
import subprocess
import curses
import sys
import os