hping3 应用笔记

本文档详细介绍了如何在CentOS7上安装hping3,包括两种安装方式及遇到的常见错误及其解决方案。此外,还阐述了hping3的多种使用场景,如端口扫描、SYN Flood、UDP Flood等网络攻击模拟。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装

以下步骤用于 在 centos7 下安装 hping3。

安装依赖库

先安装以下依赖库:

yum -y install libpcap
yum -y install libpcap-devel
yum -y install tcl-devel

方式一: yum 安装

yum -y install hping3

方式二:源码安装

# 下载
wget http://www.hping.org/hping3-20051105.tar.gz

# 解压
tar xvf hping3-20051105.tar.gz
cd hping3-20051105

# 配置
./configure

# 编译
make 

# 安装
make install 

问题 1 (configure 时候出错):

bytesex.h:22:3: error: #error can not find the byte order for this architecture, fix bytesex.h

error can not find the byte order for this architecture, fix bytesex.h

ars.h:190:2: error: #error “Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)ENDIAN"
#error "Please, edit Makefile and add -DBYTE_ORDER
(BIG|LITTLE)_ENDIAN”

原因:

没有指定 x86_64 下的大小端对齐。

解决方法:

修改 bytesex.h,在 defined(__i386__) 后添加 defined(__x86_64__)

修改前:

#if 	defined(__i386__) \
	|| defined(__alpha__) \
	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值