上一页 1 2 3 4 5 6 7 ··· 13 下一页

2014年4月12日

该文被密码保护。 阅读全文
posted @ 2014-04-12 13:33 kwingmei 阅读(0) 评论(0) 推荐(0) 编辑
摘要: frontpanel 的针序 Dell certainly doesn't make it easy to upgrade their computers. I did find a partial pinout description that might help you: here's a diagram of the connector on the motherboard: 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 o o o o o o x o o o o o o o o o o o o o o o o o o o 阅读全文
posted @ 2014-04-12 12:30 kwingmei 阅读(128) 评论(0) 推荐(0) 编辑

2014年3月29日

摘要: pv = { checksums_mode = 15, assurance_mode = 0, max_pattern = 0, test_mode_flag = 0, alert_interface_flag = 0, verbose_bytedump_flag = 0, obfuscation_flag = 0, log_cmd_override = 0, alert_cmd_override = 0, char_data_flag = 0, data_flag = 0, verbose_flag = 1, showarp_flag = 0, showipv6_f... 阅读全文
posted @ 2014-03-29 18:08 kwingmei 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 代码调用:char filter_exp[] = "port 80";1 "port 80" 作为字符串 参与编译 pcap_compile(handle, &fp, filter_exp, 0, net) 2 netmask = mask; // 全局变量网络淹码赋值 bpf_pcap =handle; //内部的全局变量指针 snaplen = snaplen_arg; // capture最大的报文长度 in_buffer =filter_exp; // flex变量赋值,flex就是解析in_buffer的tokens,然后调用yacc( 阅读全文
posted @ 2014-03-29 02:25 kwingmei 阅读(384) 评论(0) 推荐(0) 编辑

2014年3月27日

摘要: bpf 指令用于过滤逻辑 (filter program) 是有一个指令数组表示。只有向前跳转ret指令结束过滤每一个指令操作 bpf虚拟机的内部状态包括 累加器:accumulator, 指示器:index register, bpf内存:memory store, pc 程序指针: program counter.指令格式/** The instruction data structure.*/struct bpf_insn { u_short code; /* 16bit 这条指令做什么 */ u_char jt; /* jump if true 如果为真 跳转的位置 */ u_ch.. 阅读全文
posted @ 2014-03-27 23:10 kwingmei 阅读(1555) 评论(0) 推荐(0) 编辑
摘要: 在pcap_compile 函数中root = NULL; // root就是 struct block的指针...中间没有对root 操作,if (root == NULL) root = gen_retblk(snaplen_arg);有必要判断吗? 有必要的root 是应全局变量事实上 在结束解析函数 finish_parse 有对全局变量的赋值, 这个赋值也是对整个解析结果的保存。 而root block也就是 cfg(control flow graph的根 root即取其义)中间的***** (void)pcap_parse(); *******if (root == NULL.. 阅读全文
posted @ 2014-03-27 00:49 kwingmei 阅读(264) 评论(0) 推荐(0) 编辑

2014年3月25日

摘要: 认识pcap_t实例handle = { fd = 7, // 文件描述符 snapshot = 8192, // 可以接收的最大长度 linktype = 1, // LINKTYPE_ETHERNET 1 链路层的类型 tzoff = 0, /* timezone offset */ offset = 2, /* offset for proper alignment */ sf = { // struct pcap_sf sf; sf = savefile rfile = 0x0, // File * swapped = 0, version_major = 0... 阅读全文
posted @ 2014-03-25 00:15 kwingmei 阅读(678) 评论(0) 推荐(0) 编辑

2014年3月24日

摘要: libpcap 之前由于lex yacc 看不下去, 不好的借口(因为我也没有好好看看libpcap的接口设计及使用)之后由于很多原因有接触了一下lex yacc (主要是我想写一个解析各种报文的程序,看了一段之后,似乎不适合,可能是理解不深吧)回头再看scanner.l 似乎不是那么困难, grammer.y 也不是那么难, libpcap是一个很好的库, 其中内部的虚拟机的设计很是经典,值得我们好好看看,学习接口设计, 学习代码...理解一个库,看一下简介,即可入手了, 下载,编译,小实例接口一步一步开始了,1 使用那个接口在linux中用ifconfig即可查看机器上的网口传递给程序1) 阅读全文
posted @ 2014-03-24 22:17 kwingmei 阅读(184) 评论(0) 推荐(0) 编辑

2014年3月19日

摘要: 使用lex 是有好几次的接触, 最近看bpf的代码里面用到了lex, 于是代码也看不懂了1.l:%%.|\n ECHO;%%$ lex 1.lkm@kwingmei:~/programming/c/lex$ gcc lex.yy.c/tmp/ccehk4zT.o: In function `yylex':lex.yy.c:(.text+0x38b): undefined reference to `yywrap'/tmp/ccehk4zT.o: In function `input':lex.yy.c:(.text+0xcd6): undefined reference 阅读全文
posted @ 2014-03-19 23:58 kwingmei 阅读(220) 评论(0) 推荐(0) 编辑

2014年3月18日

摘要: 使用perl 有一段时间了, 主要用来写一些工具, 转发报文, 分析日志, 当shell使。 其实The capabilities of PerlStrings and data structures that are unlimited in size, nested to any depth.Powerful syntax and built-in functions.Extended, built-in support for regular expressions.Support for namespaces, classes, and objects.Functional Progr 阅读全文
posted @ 2014-03-18 23:01 kwingmei 阅读(157) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 13 下一页

导航