1、下载winpcap(一个底层驱动,可以嗅探、过滤网卡数据包,发包).exe安装包,傻瓜一步式安装

2、下载WpdPack_4_1_2,这个是winpcap的开发者包,解压之后只需要配置相关路径。

3、下载libnet-libnet-1.2-rc3.zip包,对WpdPack的一个高层封装,方便的构造各种协议的数据包。

-----------------------------------

官网:http://packetfactory.openwall.net/projects/libnet/

在此下载(有zip和tar.gz两个版本):https://github.com/sam-github/libnet/releases

解压之后:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZQAAAF8CAIAAABnsNoYAAAgAElEQVR4nO3d7ZMc1WHv8fkLeM8L5zW89rupvAgVp1JJuPiW6xZ1jWW8cZK5eUI4vvG1UZUSxcSScWpKvUolqo1LsUwMV7Ekw2ZX49VKygqDsBDIYW0WEIMQQhKSlwG08/y023nRM93ndJ9+mNmZ3j7d309RiXa2T0/3eue3p3tnzy9nAoCGclcAQEO5nU5PABjBlStXrH8QXgB0QngB0BLhBUBL6vCqVCqf/exnK5XK6urqZz7zmdXV1Waz+cADDywuLk7jIGJ+uhTgKwZkOryKxWKxWPQ+vri4mMvlcrncPffcs7q6Ot7OK5XKvffem8vl7r333kqlsr0jVeyc8ELGhYSX/cj2XxsBe4j56UzTXF1dveeee3K5nDe8KpXKI4880mw2TdNcXFwcL3qazeYjjzxiDZyZmZmZmRn9DILE/xUDkiaL4WV9qlgszszMKGde4oHdd999Y0++LIuLiw888ICVhsH27dsXcZ87Hl7RDxWYkvDLxvvuu69SqVjf2U8//bR1KZTL5azvcuvl/Z3vfMd60M4C+6LJelD80PtKjvnpbKHh5TfzEg/P2r/rAEZ6Ftu+ffsihsJOfcXGOFRgDN7vLu8jo4WX/Uq2X9XWN711WWTffxEnLPbP8ygzr3iezhYcK9alZcDczT4866hcu7KvTKPPhvYNhW65U1+xMQ4VGIPru0v5zTZaeNnf2faHrpfB5z//+dXVVfuGt61YLIp7sH/OW3fEY346+zQDwqtYLIobu/bgOrzgC8OZmZnol40RQ2HaX7EJHiowBvG7y+87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194XdiwnscxfNe+MOaUIBBwUcLjtQwOFkXd4oW3eshjt3zbzKrqeWDltM5rKR5259ilHAEXVEGAo4tlnAMbzJZsdWyROMYeHlmjEy40oxCjiiDwhFAcdYBRzyodi/3rT+7RmnCi/nl43Czuj6SDcKOMLOayQUcIxVwOG5dSX8FtR7taqeeQn7lfNznDeVQQcUcAj7ooADyLQsL2JPAQegryxnFwUcAPTEYoQAtER4AdAS4QVAS/8NeXX2NgJ4FAAAAAAASUVORK5CYII=" alt="" />

编译步骤:

  1. 将libnet-libnet-1.2-rc3复制到D盘
  2. 双击libnet目录下的msvcbuild.bat文件,之后就会在src目录下生成libnet.dll和libnet.lib

-----------------------------------------------------------------------------------------------------------------

(注: 如果直接双击编译,事先需要按照windows下编译libnet0.10.11中所述配置vs中vc编译器的相关目录。要么就直接从vs2013的命令行控制台中进入

    libnet目录下执行msvcbuild.bat),vs2013的命令行在工具->库程序包管理器->程序包管理器控制台    推荐后者

cd d:
cd .\libnet-libnet-1.2-rc3\libnet
msvcbuild.bat

编译过程中有一堆warning不过最后成功编译。

------------------------------------------------------------------------------------------------------------------

详细的编译过程参见:http://www.verydemo.com/demo_c173_i160089.html

其中对一些出现的错误进行了描述。这里也将其摘录至文章末尾~

在D盘建立目录:

libnet-1.2-r3-build/bin

libnet-1.2-r3-build/include

libnet-1.2-r3-build/lib

分别将libnet-libnet-1.2-rc3/libnet/src中的libnet.dll和libnet.lib复制到bin和lib目录中,

将libnet-libnet-1.2-rc3/libnet/include目录复制为libnet-1.2-r3-build/include

在系统环境变量PATH中添加:libnet-1.2-r3-build/bin

在vs中vc++目录中配置include和lib,在link输入中添加libnet.lib

(注:修改环境变量后要重启vs才能对vs生效)

至此libnet的开发配置就结束了~

---------------------------------------------------------------------------------

转自:http://blog.163.com/liyilouis007@126/blog/static/318090502012793493/

libnet/libpcap资料汇总

2012-08-09 15:07:57|  分类: linux |举报 |字号 订阅

libnet源码下载:

http://packetfactory.openwall.net/projects/libnet/ (官方)

http://pkgs.fedoraproject.org/repo/pkgs/libnet/ (fedora项目组件)

使用libnet与libpcap构造TCP/IP协议软件

http://www.ibm.com/developerworks/cn/linux/l-tcpip/

libpcap与tcpdump源码下载

http://www.tcpdump.org/#latest-release

------

转自:http://www.verydemo.com/demo_c173_i160089.html

libnet编译,windows/Linux

windows下

1.下载安装包libnet-libnet-1.2-rc2.zip

https://github.com/sam-github/libnet/releases

2.解压缩到D:\libnet-libnet-1.2-rc2目录下
3.下载WinPcap_4_1_2.zip和WpdPack_4_1_2.zip
 
 
安装WinPcap_4_1_2
    解压WpdPack_4_1_2.zip解压到D:\WpdPack

4.编译

   3.1 打开VS -> Visual Studio Tools -> Visual Studio 命令提示(2010)

3.2 切换到目录D:\libnet-libnet-1.2-rc2\libnet

3.3
执行msvcbuild.bat

3.4 其他

a. 提示找不到“pcap.h”。

修改msvcbuild.bat中的“@set WINPCAP=..\..\..\WpdPack”为“@set WINPCAP=D:\WpdPack”

b. libnet_dll.c(32) : fatal error C1083: 无法打开包括文件:“common”: No such file or directory

将libnet_dll.c中32行的 #include "common" 改成 #include "common.h" 。

c.  libnet_raw.c(44) : error C2054: 在“socklen_t”之后应输入“(”
           libnet_raw.c(45) : error C2082: 形参“libnet_open_raw4”的重定义
           libnet_raw.c(45) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)

将libnet_raw.c中35~37行的内容注释掉:

#ifndef HAVE_SOCKLEN_T
              typedef int socklen_t
              #endif

将libnet_raw.c中70行的 socklen_t len; 改成 int len; 。

5.生成结果

在目录D:\libnet-libnet-1.2-rc2\libnet\src下生成libnet.lib、libnet.dll。

-----------------------

Linux下

1.下载安装包libnet-1.2-rc2.tar.gz 

http://sourceforge.net/projects/libnet-dev/
2.解压缩libnet-1.2-rc2.tar.gz 

   tar zxvf libnet-1.2-rc2.tar.gz
3.编译
  3.1 ./configure
  3.2 make
  3.3 make install
4.生成结果
   在libnet-1.2-rc2/src/.libs/目录下生成libnet.a、libnet.so。

windows下编译配置libnet-1.2-rc3的更多相关文章

  1. Windows下编译objective-C

    Windows下编译objective-C 2011-08-31 14:32 630人阅读 评论(0) 收藏 举报 windowscocoa工具objective clibraryxcode   目录 ...

  2. 在Windows下编译FFmpeg详细说明

    MinGW:一个可自由使用和自由发布的Windows特定头文件和使用GNC工具集导入库的集合,允许你生成本地的Windows程序而不需要第三方C运行时 MinGW,即 Minimalist GNU F ...

  3. 在Windows下编译OpenSSL(VS2005和VC6)

    需要说明的是请一定安装openssl-0.9.8a .  openssl-1.0.0我没有编译成功. 如何在Windows下编译OpenSSL (Vs2005使用Vc8的cl编译器)1.安装Activ ...

  4. Windows下编译SDL

    Windows下编译SDL的理由我就不多说了,无论用VS来编译或调试SDL库都是很方便的.而且SDL源代码中也包含了VC工程,你所要做的只是解压VC工程,进行适当的配置,然后编译.调试. 编译SDL大 ...

  5. Windows下编译安装 FFmpeg

    在Linux/Mac下编译 ffmpeg是非常方便的.但要在 Windows下编译 ffmpeg还真要花点时间.以下就是在 Windowns下编译ffmpeg的步骤: 一.安装Cygwin 在wind ...

  6. windows下编译php7图形库php_ui.dll

    CSDN博客 具有图形化编程才有意思,这几天看到了php ui 图形扩展,只是现在只能下载php 7.1的 本次教程编译php7.2.6的 php ui 要是linux下编译起来比较简单 但是 win ...

  7. Lua在Windows下的配置、安装、运行

    Windows下安装.运行Lua! 本文提供全流程,中文翻译.Chinar坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) 1↓ 进入Lua官网:h ...

  8. windows下编译和安装boost库

    boost是一个功能强大.构造精巧.跨平台.开源并且完全免费的C++程序库. 获取方式 boost提供源码形式的安装包,可以从boost官方网站下载,目前最新版本是1.59.0. 本机上正好有boos ...

  9. 继《在Windows下编译扩展OpenCV 3.1.0 + opencv_contrib》修订

    在之前的<在Windows下编译扩展OpenCV 3.1.0 + opencv_contrib>中有些问题,后来由于时间不是很充足,故现在对其中的问题进行完善,如下所示对红色框框中的相应的 ...

随机推荐

  1. 转 oracle数据库更新时间字段数据时的sql语句

    https://www.cnblogs.com/sun-rain/p/4921512.html ---Oracle数据库-时间函数 ---格式化时间插入update t_user u set u.mo ...

  2. tomcat——Server.xml

    本机tomcat位置:D:\tomcat7\apache-tomcat-7.0.61 server.xml 位置:D:\tomcat7\apache-tomcat-7.0.61\conf 注意:ser ...

  3. P3474 [POI2008]KUP-Plot purchase

    思路:单调栈 提交:>5次 错因:单调栈写法有问题+前缀和写错 题解: 若有\(>=k\ \&\&\ <=2\times k\)的点,显然直接选他就行了. 否则,我们 ...

  4. svn 外部引用别的项目文件

    建立了一个文件目录E:\My\myproject 想在该目录下有一个文件夹引用别的工程的文件. 1.在E:\My\myproject 空白处右键属性. 2.点击Properties,弹出 3.点击ne ...

  5. 数据结构实验之栈与队列三:后缀式求值(SDUT 2133)

    题解:把每一步计算的答案再存在栈里面,直到计算结束. 如果是操作数 那么直接入栈:如果是运算符,那么把栈里面最顶部的两个操作数拿出来进行运算,运算结果再放入到栈里面,计算完所有的(#之前的长度位len ...

  6. W tensorflow/core/platform/cpu_feature_guard.cc:45]

    W tensorflow/core/platform/cpu_feature_guard.cc:] The TensorFlow library wasn't compiled to use SSE3 ...

  7. [crontab]修改默认编辑器

    crontab默认编辑器为nano,超级不好用 想要修改成vim或者其他编辑器,方法如下. sudo select-editor 改为3或者4 再次打开就直接是vim打开了

  8. 常用exporter下载

    1.node_exporter https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter- ...

  9. Spring Cloud Eureka(六):Eureka Client 如何注册到Eureka Server

    1.本节概要 根据前文我们对Eureka Server 有了一定的了解,本节我们主要学习Eureka Client 与 Eureka Server 如何通讯的及相关通信机制是什么,本文会弄清楚一下几个 ...

  10. Hdu5178

    Hdu5178 题意: 题目给你N个点,问有多少对点的长度小于K . 解法: 首先将所给的坐标从大到小排序,则此题转化为:对排序后的新数列,对每个左边的\(x_a\)找到它右边最远的 $ x_b $ ...