我在帮一个IM的开发者测试其安全性和问题,他们希望自己的报告服务器上的TCP重置漏洞的例子我在编译它的问题,谁能帮 错误日志? http://pastie.org/4212921需要帮助编译一些东西! (:
C文件: http://www.exploit-db.com/download/291
我在帮一个IM的开发者测试其安全性和问题,他们希望自己的报告服务器上的TCP重置漏洞的例子我在编译它的问题,谁能帮 错误日志? http://pastie.org/4212921需要帮助编译一些东西! (:
C文件: http://www.exploit-db.com/download/291
它几乎总是先从第一个报告的错误是一个好主意
在你的情况下,第一个报告的错误是:
reset-tcp.c:51: error: ‘u_char’ undeclared (first use in this function)
u_char
不是一个标准的C型;它可能是unsigned char
的typedef。
源文件具有以下#include
指令:
#include <libnet.h>
#include <stdio.h>
<stdio.h>
不能定义u_char
,所以它必须在<libnet.h>
定义 - 特别是在任何的<libnet.h>
版本的源文件依赖于。
这是一个非标头(它没有安装在我的系统上),所以我最好的猜测是,您使用的是不同版本的libnet比一个reset-tcp.c
设计的工作。
我知道,没有解决您的问题,但它应该给你一个很好的起点。
编辑:
我刚刚安装我的Ubuntu 12.04系统(的libnet1
1.1.4-2.1版)上libnet1
,libnet1-dev
和libnet1-doc
包。您的源文件现在编译(加入第74和75行后)并带有一些警告。类型u_char
在/usr/include/i386-linux-gnu/sys/types.h
,这是间接libnet.h
包括限定。
我得到一些警告:
291.c:95:1: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘u_char *’ [-Wformat]
291.c:95:1: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 4 has type ‘u_char *’ [-Wformat]
291.c:95:1: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 5 has type ‘u_char *’ [-Wformat]
291.c:95:1: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 6 has type ‘u_char *’ [-Wformat]
291.c:95:1: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 7 has type ‘u_char *’ [-Wformat]
291.c:95:1: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 8 has type ‘u_char *’ [-Wformat]
291.c:116:1: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
,你一定要注意;代码目前试图存储在u_char
(unsigned char
)对象int
值。
建议:
告诉我们是什么操作系统和您所使用的是哪个版本的libnet
;如果我们有这些信息,有人可能会提供更好的建议。
让我们知道源代码来自哪里,看看您是否可以找出它应该使用的libnet
的版本。
您需要安装libnet
及其研究与开发包。
在Debian下,您可以通过安装软件包libnet1
和libnet-dev
来执行此操作。
你能在这里发布你的相关代码和错误信息吗?如果它太大,你可以尝试[显示问题的小例子](http://sscce.org/)? – Levon 2012-07-06 23:41:15
它输出很多错误/:所以我真的不能创建一个小例子 – user1478935 2012-07-06 23:44:00
你是否按照C文件中的说明进行编译?您是否正确安装了libnet? – 2012-07-06 23:44:58