Skip to content

Instantly share code, notes, and snippets.

@shangbo
shangbo / ip_queue.h
Last active Aug 29, 2015
ip_queue.h( A deprecated head file for linux, but be needed by libfilter_queue)
View ip_queue.h
//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 Mar 27, 2014
"fundamentals of compiling"'s homework, count the variable
View lib_1.py
#!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
# __author__ = "Shaun"
import sys
VAR = []
@shangbo
shangbo / new_shell.py
Created Feb 24, 2014
homework about a simple shell
View new_shell.py
#!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
import subprocess
import curses
import sys
import os