summaryrefslogtreecommitdiff
path: root/net-analyzer/xprobe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-16 00:13:18 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-16 00:13:18 +0000
commitf2bdc27fe0f79f8f9a3945eb2b1163ce75c56439 (patch)
treedd0f7da0455831dffb2cb662e7dae760f92e68ad /net-analyzer/xprobe
parent770d63f36dbe1722e0ff9ab55eeca49986f01527 (diff)
gentoo auto-resync : 16:02:2025 - 00:13:18
Diffstat (limited to 'net-analyzer/xprobe')
-rw-r--r--net-analyzer/xprobe/Manifest4
-rw-r--r--net-analyzer/xprobe/files/xprobe-0.3-clang.patch16
-rw-r--r--net-analyzer/xprobe/files/xprobe-0.3-demangle-output.patch156
-rw-r--r--net-analyzer/xprobe/files/xprobe-0.3-makefiles.patch99
-rw-r--r--net-analyzer/xprobe/xprobe-0.3-r2.ebuild41
5 files changed, 316 insertions, 0 deletions
diff --git a/net-analyzer/xprobe/Manifest b/net-analyzer/xprobe/Manifest
index 8b14b30fc20c..17bd675b9429 100644
--- a/net-analyzer/xprobe/Manifest
+++ b/net-analyzer/xprobe/Manifest
@@ -1,6 +1,10 @@
+AUX xprobe-0.3-clang.patch 531 BLAKE2B 05c2e7febcc64ef96cf7ecbc6069558152c1fb1f9e6667f180d1604d50ab6942b3df1e2fdb1a5dba8ec2e8abab121a536e23a1273a59a13d7997979dd949fdab SHA512 557b87dba878f22ffb4b53b89ffa8ea0dfa8bc6c6c45e1c217d9708086dd9befaa2864081ff0b8f94f0d4d9255dc584772a6787c2295e6f0c25230d909e28f8e
AUX xprobe-0.3-cxx11.patch 251 BLAKE2B 568fed378da0f4943a328a8f662cf8d02e489a78ff77815b3a73618b7f15ac1a67d71784a8c67d8af54eeb33c51b01b86b8c032862654c6e9e51b1d6ac13f1dd SHA512 f4b6cf1048b9868d4119b063babbf91caa7b98f9ad8a511e4652c053be2d9692b03c62c3be3ea10831d55ddfb5b5f989c029237ce8d7a48da3c05ce9fd96c429
+AUX xprobe-0.3-demangle-output.patch 4036 BLAKE2B 97c6cc88d96e7acd3a90961d4ad1d44f56c17b770c2d11886ba174a1063ee1c99e9faaf552ceefa44fcfb61dddb7d2472838d795288bcaf6e1e183bd208b128e SHA512 df9eaa9b95ed0234868a9f820caa9fccfab0a64b496a0b58d05317c3c9e124c7f9164eadffe98e652041961a21618cfa823731842b95763f93f7e661b8f7e271
AUX xprobe-0.3-gcc-12.patch 452 BLAKE2B 91a78501f058700d26ad32e114887acc184a57b3e9fd58ae7b35fceafc45828ebb6d9e00582085003035dd6a3f8ffb85f799a6c7ebdaa0231548512db8083362 SHA512 ad3d08338e804f203ce4c4943c1d71dcf1dd77b84939c76168a56661d110348d7ca7bf7f35272fc89b78b413628a7bef87d91cfa16ef96df758006d0f94df605
AUX xprobe-0.3-gcc43.patch 655 BLAKE2B 83831f0420e69a4d673eef69a5f81b63b81ad3897078f60ff761064e31552dafc16b35f93cf83c75027bfdf8485f201c4fef1339b89cc73c5dad51e27f1bf229 SHA512 7ab58b18fe7593f2389d72cc5d9160a65500866f44045c219e8a4fc6d860e34080a50d9e295d38d801c8af3d1b0ceab4f98fec296aa2eb49415561bbe9903950
+AUX xprobe-0.3-makefiles.patch 2815 BLAKE2B bbcbd1a163037dda26b84ec671ac6abd78c63640e6e2561315fbd5b2f2861b0e308c383f0279dd5fbfa91476bc1423727a397eb9075fa5d9d91afa4a726323fa SHA512 e8b7712101ad49b4aae33b5713fb8aca73794295199cc1563588d0475ae19af502c55bd7dc7f04ebaccd3929eda2ee6016af9a5269dabfd931ed8646a92cf36e
DIST xprobe2-0.3.tar.gz 533636 BLAKE2B 1f106a3c08bfc6e205731a2e8c64f7e9f2e52caba38374ab7980fcae95113b6790297a59f5d4d6ad8e09d2145b68801403472b07690ff27b42dec8c6b7d97895 SHA512 fd499ada22be5df3e01630948cb72d1a9e648e0c7bfaf2a688386a61c67bb36a326a9e2f3f2b9960a6a49128343010aafe8a3f04ec05e89420a1384215e41f21
EBUILD xprobe-0.3-r1.ebuild 823 BLAKE2B 34831d8489f4f5f029a1a67fd84523d97f604b971881476508c2bedd182d628742f47c8898fd6324644bd0d5e9287da723036ad51e8c2842382a901f8c302aa1 SHA512 851b65d7aafef586747e4a908dd067c67c0662393fa4cf3afb08e14a478233ed78f6635e297baac878f52021f6c9d20ffbc66386cd1542bd9ad95abe2bebe3f3
+EBUILD xprobe-0.3-r2.ebuild 817 BLAKE2B 800d33250d996de4471f0e79334798bd038a8a9591dae4d63111a23061ce5c4abfd0a47deba6e930fe95accf49f571d93fa7d0c36695c1900998b62aeb113f2f SHA512 ab01c99882080f4326eefc1ee8d7de8b6f6ef96d36244193502de10cf28460b71018c50fa740152c0c4a51e429790dd232cdcf1ed7f336d7774ac7e85b9b6957
MISC metadata.xml 684 BLAKE2B 2409aa6f183566da81875c75600aafe88af0e3c3ece473466833c5f6e04341c0bdf558919b5f7cebc316fd8bd422f46ca9aa8fe62979c6c4f658f27c2eb9a784 SHA512 2ed1592bc9099f6bee1b1f84eb4dc2648e4d281ad54c9358cd62c9e5666c2112dbcd42abdbf3e02aa3360f8924e94a907f0ac3792483953e221d4c57f610609f
diff --git a/net-analyzer/xprobe/files/xprobe-0.3-clang.patch b/net-analyzer/xprobe/files/xprobe-0.3-clang.patch
new file mode 100644
index 000000000000..1ed7561a5380
--- /dev/null
+++ b/net-analyzer/xprobe/files/xprobe-0.3-clang.patch
@@ -0,0 +1,16 @@
+Clang: ISO C++17 does not allow register storage class specifier
+https://bugs.gentoo.org/897838
+--- a/libs-external/USI++/src/misc.cc
++++ b/libs-external/USI++/src/misc.cc
+@@ -18,9 +18,9 @@
+ in_cksum (unsigned short *ptr, int nbytes, bool may_pad)
+ {
+
+- register long sum; /* assumes long == 32 bits */
++ long sum; /* assumes long == 32 bits */
+ u_short oddbyte;
+- register u_short answer; /* assumes u_short == 16 bits */
++ u_short answer; /* assumes u_short == 16 bits */
+
+
+ /* For psuedo-headers: odd len's require
diff --git a/net-analyzer/xprobe/files/xprobe-0.3-demangle-output.patch b/net-analyzer/xprobe/files/xprobe-0.3-demangle-output.patch
new file mode 100644
index 000000000000..a63018a56bb1
--- /dev/null
+++ b/net-analyzer/xprobe/files/xprobe-0.3-demangle-output.patch
@@ -0,0 +1,156 @@
+https://github.com/dschwen/xprobe2/commit/1a8c68bc904bb1e971ec456aaff0879933a80e23
+https://bugs.gentoo.org/910424
+
+From 1a8c68bc904bb1e971ec456aaff0879933a80e23 Mon Sep 17 00:00:00 2001
+From: Daniel Schwen <daniel@schwen.de>
+Date: Mon, 22 Mar 2021 14:28:25 -0600
+Subject: [PATCH] Fix garbled output (#1)
+
+--- a/src/os_matrix.cc
++++ b/src/os_matrix.cc
+@@ -42,12 +42,12 @@ OS_Name::OS_Name(void) {
+ *******************
+ * returns FAIL is the OS already exist. os_id otherwise.
+ */
+-
++
+
+ int OS_Name::add_os(string &os_name) {
+
+ if (find_os(os_name) != FAIL) return FAIL; /* exist */
+-
++
+ osid_name.insert(pair<int, string>(id_count, os_name));
+ return (id_count++);
+ }
+@@ -58,7 +58,7 @@ int OS_Name::add_os(string &os_name) {
+ *******************
+ * returns FAIL is the OS does not exist. os_id otherwise.
+ */
+-
++
+
+ int OS_Name::find_os(string &os_name) {
+ map <int, string>::iterator osid_i;
+@@ -76,7 +76,7 @@ int OS_Name::find_os(string &os_name) {
+ *******************
+ * for debugging _ONLY_
+ */
+-
++
+
+ void OS_Name::list_oses(void) {
+ map <int, string>::iterator osid_i;
+@@ -94,18 +94,18 @@ void OS_Name::list_oses(void) {
+ *******************
+ * for debugging _ONLY_
+ */
+-
+
+
+-const string OS_Name::osid2str(int id) {
++
++const string & OS_Name::osid2str(int id) {
+ map <int, string>::iterator osid_i = osid_name.find(id);
+ if (osid_i != osid_name.end()) return ((*osid_i).second);
+ return ("BUG, PLEASE REPORT! :-)");
+ }
+-
++
+ /*
+ * OS_Vector stuff:
+- */
++ */
+ OS_Vector::OS_Vector(int new_os_id) {
+ os_id = new_os_id;
+ total = 0;
+@@ -148,18 +148,18 @@ int OS_Matrix::find_os_id(int os_id) {
+ if (os_id == osid_vec[i].get_os_id()) return i;
+ return -1;
+ }
+-
++
+ void OS_Matrix::add_result(int test_id, int os_id, int score, int times) {
+ int i;
+
+- xprobe_debug(XPROBE_DEBUG_OSMATRIX, "test_id: %i os_id: %i score: %i\n", test_id, os_id, score);
++ xprobe_debug(XPROBE_DEBUG_OSMATRIX, "test_id: %i os_id: %i score: %i\n", test_id, os_id, score);
+
+ if (find_os_id(os_id) == -1) /* if doesn't exist. we insert it
+ * first */
+ osid_vec.push_back(OS_Vector(os_id));
+
+ i = find_os_id(os_id);
+- while (times-- > 0) {
++ while (times-- > 0) {
+ osid_vec[i].add_result(test_id, score);
+ }
+ }
+@@ -173,7 +173,7 @@ int OS_Matrix::get_score(int os_id) {
+
+ int OS_Matrix::get_max_score(int os_id) {
+ int i = find_os_id(os_id);
+-
++
+ //return (xp_loaded_mods * XPROBE_MATCH_YES);
+ return (osid_vec[i].get_number_of_keywords() * XPROBE_MATCH_YES);
+
+@@ -181,12 +181,12 @@ int OS_Matrix::get_max_score(int os_id) {
+
+ int OS_Matrix::get_prcnt_score(int os_id) {
+
+- if (get_score(os_id) < 0) return 0;
++ if (get_score(os_id) < 0) return 0;
+ return get_score(os_id) * 100/get_max_score(os_id);
+
+ }
+
+-int OS_Matrix::get_top(int num) {
++int OS_Matrix::get_top(int num) {
+
+ sort(osid_vec.begin(), osid_vec.end(), os_vector_compare);
+
+@@ -194,5 +194,4 @@ int OS_Matrix::get_top(int num) {
+ return osid_vec[num].get_os_id();
+
+ return 0; /* out of range */
+-}
+-
++}
+--- a/src/os_matrix.h
++++ b/src/os_matrix.h
+@@ -44,9 +44,9 @@ class OS_Name {
+ int id_count;
+ public:
+ OS_Name(void);
+- const string osid2str(int);
++ const string & osid2str(int);
+ const char *osid2char(int id) {
+- string s = osid2str(id);
++ const string & s = osid2str(id);
+ return (s.c_str());
+ }
+ int add_os(string &os_name);
+@@ -54,7 +54,7 @@ class OS_Name {
+ void list_oses(void);
+ int get_osnum(void) { return id_count; }
+ };
+-
++
+
+ class OS_Vector {
+
+@@ -79,7 +79,7 @@ class OS_Matrix {
+ vector <OS_Vector> osid_vec;
+ int xp_loaded_mods;
+ int find_os_id(int);
+-
++
+ public:
+ OS_Matrix(int);
+ virtual ~OS_Matrix(void);
+@@ -96,4 +96,3 @@ class OS_Matrix {
+ };
+
+ #endif /* INTERFACE_H */
+-
diff --git a/net-analyzer/xprobe/files/xprobe-0.3-makefiles.patch b/net-analyzer/xprobe/files/xprobe-0.3-makefiles.patch
new file mode 100644
index 000000000000..ed49b8366e4c
--- /dev/null
+++ b/net-analyzer/xprobe/files/xprobe-0.3-makefiles.patch
@@ -0,0 +1,99 @@
+Add explicit dependency between program and library
+Fixes break with MAKEOPTS="-j1 --shuffle=3854825862" and other shuffle
+Also folds sed commands from ebuild and patches configure; running
+autoreconf breaks build
+https://bugs.gentoo.org/882675
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -47,7 +47,7 @@
+
+ all: lib xprobe2
+
+-xprobe2: $(OBJS) modules
++xprobe2: $(OBJS) modules lib
+ $(CXX) $(CFLAGS) $(OBJS) $(MODOBJS) -o $@ $(LDFLAGS) $(LIBS)
+ strip $@
+
+--- a/libs-external/USI++/src/Makefile.in
++++ b/libs-external/USI++/src/Makefile.in
+@@ -15,7 +15,7 @@
+ clear
+
+ usi++:icmp.o datalink.o ip.o misc.o udp.o tcp.o TX_IP.o Layer2.o arp.o
+- ar cr libusi++.a *.o
++ $(AR) cr libusi++.a *.o
+ # ld *.o -Bshareable -o libusi++.so
+ $(RANLIB) libusi++.a
+ rm -f *.o
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -49,7 +49,7 @@
+
+ xprobe2: $(OBJS) modules lib
+ $(CXX) $(CFLAGS) $(OBJS) $(MODOBJS) -o $@ $(LDFLAGS) $(LIBS)
+- strip $@
++ true $@
+
+ modules:
+ cd xpmodules; ${MAKE}
+--- a/src/xplib/Makefile.in
++++ b/src/xplib/Makefile.in
+@@ -44,7 +44,7 @@
+ all: libxplib.a
+
+ libxplib.a: $(OBJS)
+- ar cr libxplib.a *.o
++ $(AR) cr libxplib.a *.o
+ $(RANLIB) libxplib.a
+
+ .c.o: $(INCLUDES)
+--- a/src/xpmodules/alive_probe/Makefile.in
++++ b/src/xpmodules/alive_probe/Makefile.in
+@@ -42,7 +42,7 @@
+ all: alive_probe.a
+
+ alive_probe.a: icmp_ping.o tcp_ping.o udp_ping.o ttl_module portscan_module
+- ar cr alive_probe.a *.o ttl_calc/*.o portscanner/*.o
++ $(AR) cr alive_probe.a *.o ttl_calc/*.o portscanner/*.o
+ $(RANLIB) alive_probe.a
+
+ icmp_ping.o: icmp_ping.cc
+--- a/src/xpmodules/os_probe/Makefile.in
++++ b/src/xpmodules/os_probe/Makefile.in
+@@ -43,7 +43,7 @@
+
+ os_probe.a: icmp_port_unreach_mod icmp_echo_id_mod icmp_timestamp_mod \
+ icmp_inforeq_mod icmp_addrmask_mod tcp_handshake_mod tcp_rst_mod smb_mod snmp_mod
+- ar cr os_probe.a icmp_port_unreach/*.o icmp_echo_id/*.o icmp_timestamp/*.o \
++ $(AR) cr os_probe.a icmp_port_unreach/*.o icmp_echo_id/*.o icmp_timestamp/*.o \
+ icmp_inforeq/*.o icmp_addrmask/*.o tcp_handshake/*.o tcp_rst/*.o smb/*.o snmp/*.o
+ $(RANLIB) os_probe.a
+
+--- b/configure
++++ a/configure
+@@ -2252,6 +2252,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_declaration
++#include <cstdlib>
+ int
+ main ()
+ {
+@@ -2613,6 +2614,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_declaration
++#include <cstdlib>
+ int
+ main ()
+ {
+--- a/libs-external/USI++/src/configure 2025-02-15 16:41:20.320574540 +0400
++++ b/libs-external/USI++/src/configure 2025-02-15 16:42:29.463212487 +0400
+@@ -3499,6 +3499,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <ctype.h>
++#include <stdlibh>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
diff --git a/net-analyzer/xprobe/xprobe-0.3-r2.ebuild b/net-analyzer/xprobe/xprobe-0.3-r2.ebuild
new file mode 100644
index 000000000000..8b68c129158c
--- /dev/null
+++ b/net-analyzer/xprobe/xprobe-0.3-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_P=${PN}2-${PV}
+
+DESCRIPTION="Active OS fingerprinting tool - this is Xprobe2"
+HOMEPAGE="http://sys-security.com/blog/xprobe2"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc43.patch
+ "${FILESDIR}"/${P}-cxx11.patch
+ "${FILESDIR}"/${P}-gcc-12.patch
+ "${FILESDIR}"/${P}-makefiles.patch
+ "${FILESDIR}"/${P}-demangle-output.patch
+ "${FILESDIR}"/${P}-clang.patch
+)
+
+src_prepare() {
+ default
+
+ tc-export AR
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS CHANGELOG CREDITS README TODO docs/*.{txt,pdf}
+}