摘要: sudo sysctl net.ipv4.conf.default.rp_filter=0sudo sysctl net.ipv4.conf.all.rp_filter=0sudo sysctl net.ipv4.ip_forward=1sudo sysctl net.ipv6.conf.all.f... 阅读全文
posted @ 2014-03-23 09:57 木叶火影 阅读(2996) 评论(0) 推荐(0) 编辑
摘要: 爬取百度贴吧的图片分析贴吧源代码,图片所在位置是:') html = getHtml(url) getImages(html)还是最为基础的功能。 阅读全文
posted @ 2013-12-07 15:21 木叶火影 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 写的makefile适用于32位,但是放到64位机器上make就有问题。需要在makefile中gcc -o。。。。的结尾加上-pthread,例如:bloomfilter.o: bloomfilter.c bloomfilter.h hash.h gcc -o bloomfilter.o -Wall -pedantic -ansi -c bloomfilter.c -g -pthread即可。 阅读全文
posted @ 2013-12-05 21:00 木叶火影 阅读(11001) 评论(0) 推荐(0) 编辑
摘要: 1、首先安装ns2所需的组件、库之类:$sudo apt-get update$sudo apt-get install build-essential$sudo apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev$sudo apt-get install libxmu-dev libxmu-headers2、查找包含x11-dev关键字的软件包,以防出现类似tk8.4.14,安装中断退出:$sudo apt-cache search x11-dev出现如下类似的命令: ibx11-dev - X11 client-side library (d 阅读全文
posted @ 2013-11-30 21:18 木叶火影 阅读(888) 评论(0) 推荐(0) 编辑
摘要: A为本地主机(即用于控制其他主机的机器) ;B为远程主机(即被控制的机器Server), 假如ip为172.24.253.2 ;在A上的命令: ssh-keygen -t rsa (连续三次回车,即在本地生成了公钥和私钥,不设置密码,生成的公钥私钥在~/.ssh目录下,id_rsa是私钥, id_rsa.pub是公钥 )ssh muye@172.24.253.2 mkdir .sshchmod 700 .ssh (需要输入密码, 注:必须将.ssh的权限设为700)scp ~/.ssh/id_rsa.pub muye@172.24.253.2:~/.ssh然后在服务器上建立authorized 阅读全文
posted @ 2013-11-28 20:35 木叶火影 阅读(615) 评论(0) 推荐(0) 编辑
摘要: 1、实时查看当前进程中使用的shell种类:推荐ps | grep $$ | awk '{print $4}' (注:$$表示shell的进程号)2、最常用的查看shell的命令,但不能实时反映当前shell$ echo $SHELL3、更简洁,但并不是所有shell都支持$ echo $0 4、环境变量中shell的匹配查找env | grep SHELL5、口令文件中shell的匹配查找cat /etc/passwd | grep muye6、用ps -ef时候$ ps -ef | grep $$ | grep -v grep | grep -v ps(注:grep -v 阅读全文
posted @ 2013-11-26 17:13 木叶火影 阅读(352) 评论(0) 推荐(0) 编辑