03 2011 档案

摘要:sudo ntop -u ntop -d -i wlan0关闭sudo /etc/init.d/ntop stop 阅读全文
posted @ 2011-03-28 19:09 lxgeek 阅读(155) 评论(0) 推荐(0) 编辑
摘要:/** author lx date 3.24 2011 contact lxlenovostar@gmail.com biref cp a big file to anthor file.*/#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdlib.h>#include <unistd.h>#include <stdio.h>#include <errno.h>#include <string.h># 阅读全文
posted @ 2011-03-24 18:42 lxgeek 阅读(718) 评论(0) 推荐(0) 编辑
摘要:sudo nprobe -n 127.0.0.1:2055 -i lxG2.pcapsudo flow-capture -V 5 -w /home/lx/ntop/date 127.0.0.1/127.0.0.1/2055 阅读全文
posted @ 2011-03-21 16:04 lxgeek 阅读(407) 评论(0) 推荐(0) 编辑
摘要:int printf ( const char * format, ... );Return ValueOn success, the total number of characters written is returned.On failure, a negative number is returned. 阅读全文
posted @ 2011-03-19 11:25 lxgeek 阅读(872) 评论(3) 推荐(1) 编辑
摘要:比如这样:/* the struct of the node by adjacency-list representation */typedef struct{ /* the name of node */ string nodename; /* the list of each node */ vector< string > nodelist; /* the begin probability of the node */ vector< float > nodeprob;} nbnode; 阅读全文
posted @ 2011-03-16 15:03 lxgeek 阅读(2928) 评论(2) 推荐(0) 编辑
摘要:/** select a number < 8 return a randle number that <= 7*/int selrand(){ int iSecret, iGuess; bool iselect = true; static vector< int > selected; static vector< int >::iterator itsel; /* initialize random seed: */ srand( time( NULL ) ); /* generate secret number: */ do { iSecret = 阅读全文
posted @ 2011-03-12 12:53 lxgeek 阅读(229) 评论(0) 推荐(0) 编辑
摘要:This is your nprobe 4.9.4 configuration:Host System Type : i686-pc-linux-gnuCompiler (cflags) : gcc -g -O2 -pipe -DHAVE_CONFIG_HInclude path : -I/usr/local/includeSystem Libs : -lresolv -ldl -lpthread Core Libs : -L/usr/local/lib -lpcapAdditional Libs : LBL pcap in : /usr/localInstall path : /usr/lo 阅读全文
posted @ 2011-03-11 13:00 lxgeek 阅读(2213) 评论(3) 推荐(0) 编辑
摘要:我用以下的方式安装libpcap,./configuremakemake install并且用下面的代码测试:#include <stdio.h>#include <stdlib.h>#include <pcap.h>int main( int argc, char** argv ){ char *dev, errbuf[PCAP_ERRBUF_SIZE]; dev = pcap_lookupdev( errbuf ); if ( dev == NULL ) { fprintf( stderr, "couldn't find default 阅读全文
posted @ 2011-03-11 12:59 lxgeek 阅读(543) 评论(0) 推荐(0) 编辑
摘要:使用pppoeconf命令拨号启用有线连接:sudo ifconfig eth0 up在终端中输入:sudo pppoeconf一个基于文本菜单的程序会指导你进行下面的步骤:1. 确认以太网卡已被检测到。2. 输入你的用户名(由ISP所提供 注意:输入时请先清除输入框中的“username“,否则可能造成验证错误)。3. 输入你的密码(由ISP所提供)。4. 如果你已经配置了一个PPPoE的连接,会通知你这个连接将会被修改。5. 弹出一个选项:你被询问是否需要'noauth'和'defaultroute'选项和去掉'nodetach',这里选择& 阅读全文
posted @ 2011-03-01 21:19 lxgeek 阅读(518) 评论(1) 推荐(0) 编辑