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
#include <stdio.h> | |
#include <string.h> | |
extern void hexdump(FILE * stream, void const * data, unsigned int len) | |
{ | |
unsigned int i; | |
unsigned int r,c; | |
if (!stream) | |
return; |
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
# -*- coding: utf-8 -*- | |
import json | |
import os | |
import requests | |
def pdfcrowd(url): | |
download_url = '' | |
pdfcrowd_post_url = 'http://pdfcrowd.com/form/json/convert/uri/' | |
headers = { | |
'Host': 'pdfcrowd.com', |
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/sh | |
cs_install() { | |
echo "installing ..." | |
if [ ! -e cscope.files ] | |
then | |
find ./ -name "*.[hc]" > cscope.files | |
else | |
echo "cscope.files exist" | |
fi |
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
; TTL Script used for automatic reboot test | |
username = 'root' | |
password = 'root' | |
usernamePrompt = 'login' | |
passwordPrompt = 'Password' | |
oopsPrompt = 'Oops' | |
panicPrompt = 'Kernel panic' | |
maxLoop = 1000 |
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/ip.h> | |
#include <linux/tcp.h> | |
#include <linux/netfilter_ipv4.h> | |
MODULE_LICENSE("GPL"); | |
MODULE_AUTHOR("[email protected]>"); | |
MODULE_DESCRIPTION("Netfilter HTTP sniffer module"); |
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 | |
# -*- coding: utf-8 -*- | |
''' | |
Usage: | |
pip install requests | |
pip install pyquery | |
pip install beautifulsoup4 | |
pip install wget | |
python crifan.py |
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 | |
# -*- coding: utf-8 -*- | |
''' | |
Usage: | |
pip install requests | |
pip install beautifulsoup4 | |
python coolshell.py | |
''' |
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 | |
# -*- coding: utf-8 -*- | |
# huzhifeng's Python Lib | |
import os | |
import re | |
import time | |
import json | |
import requests |
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 | |
# -*- coding: utf-8 -*- | |
''' | |
Usage: | |
pip install requests | |
pip install beautifulsoup4 | |
python csdn_blog.py | |
''' |
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
huzhifeng@Ubuntu12:~$ hostname -i | |
127.0.1.1 | |
huzhifeng@Ubuntu12:~$ hostname -I | |
192.168.2.132 | |
huzhifeng@Ubuntu12:~$ ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1;}' | |
192.168.2.132 | |
huzhifeng@Ubuntu12:~$ ifconfig eth0 2>/dev/null | awk '/inet addr:/ {print $2}' | sed 's/addr://' | |
192.168.2.132 | |
huzhifeng@Ubuntu12:~$ ip route get 8.8.8.8 | awk 'NR==1 {print $NF}' | |
192.168.2.132 |