commit
51133ef30c
BIN
hping-20200503.zip
Normal file
BIN
hping-20200503.zip
Normal file
Binary file not shown.
24
hping-fix-netbpf-header.patch
Normal file
24
hping-fix-netbpf-header.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -urN hping-master/libpcap_stuff.c hping-master-bak/libpcap_stuff.c
|
||||
--- hping-master/libpcap_stuff.c 2014-12-26 22:31:29.000000000 +0800
|
||||
+++ hping-master-bak/libpcap_stuff.c 2020-05-03 18:20:40.272372230 +0800
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
-#include <net/bpf.h>
|
||||
+#include <pcap-bpf.h>
|
||||
#include <pcap.h>
|
||||
|
||||
#include "globals.h"
|
||||
diff -urN hping-master/script.c hping-master-bak/script.c
|
||||
--- hping-master/script.c 2014-12-26 22:31:29.000000000 +0800
|
||||
+++ hping-master-bak/script.c 2020-05-03 18:20:53.661239114 +0800
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <sched.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
-#include <net/bpf.h>
|
||||
+#include <pcap-bpf.h>
|
||||
#include <pcap.h>
|
||||
|
||||
#include "release.h"
|
||||
50
hping.spec
Normal file
50
hping.spec
Normal file
@ -0,0 +1,50 @@
|
||||
#%global debug_package %{nil}
|
||||
|
||||
Name: hping
|
||||
Version: 20200503
|
||||
Release: 1
|
||||
Summary: hping is a command-line oriented TCP/IP packet assembler/analyzer
|
||||
License: GPLv2
|
||||
URL: http://www.hping.org/
|
||||
Source0: https://github.com/antirez/hping/%{name}-%{version}.zip
|
||||
|
||||
Patch0: hping-fix-netbpf-header.patch
|
||||
|
||||
BuildRequires: gcc tcl-devel libpcap-devel
|
||||
|
||||
%description
|
||||
hping is a command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-master/
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
%install
|
||||
install -d %{buildroot}/%{_bindir}
|
||||
install -m0755 hping3 %{buildroot}/%{_bindir}
|
||||
|
||||
install -d %{buildroot}/%{_mandir}/man8
|
||||
install -m0644 docs/hping3.8 %{buildroot}/%{_mandir}/man8
|
||||
|
||||
|
||||
%pre
|
||||
%preun
|
||||
%post
|
||||
%postun
|
||||
|
||||
%check
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc INSTALL README KNOWN-BUGS CHANGES
|
||||
%{_bindir}/*
|
||||
%{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com>
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user