nmap updated to 7.30
This commit is contained in:
parent
8082f50a9c
commit
bb59447c42
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@ nmap-5.21.tar.bz2
|
||||
/nmap-7.10.tar.bz2
|
||||
/nmap-7.11.tar.bz2
|
||||
/nmap-7.12.tar.bz2
|
||||
/nmap-7.30.tar.bz2
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
--- nmap-7.00/ncat/ncat_connect.c.allresolve 2015-06-27 10:21:53.000000000 +0200
|
||||
+++ nmap-7.00/ncat/ncat_connect.c 2015-11-20 14:38:20.693918558 +0100
|
||||
diff -up nmap-7.30/ncat/ncat_connect.c.allresolve nmap-7.30/ncat/ncat_connect.c
|
||||
--- nmap-7.30/ncat/ncat_connect.c.allresolve 2016-07-19 12:07:58.000000000 +0200
|
||||
+++ nmap-7.30/ncat/ncat_connect.c 2016-10-03 10:56:08.892259479 +0200
|
||||
@@ -164,6 +164,7 @@ static struct conn_state cs = {
|
||||
0
|
||||
};
|
||||
@ -31,7 +31,7 @@ diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
}
|
||||
|
||||
zmem(&socks5msg,sizeof(socks5msg));
|
||||
@@ -956,7 +957,7 @@ int ncat_connect(void)
|
||||
@@ -967,7 +968,7 @@ int ncat_connect(void)
|
||||
|
||||
if (o.af != AF_INET)
|
||||
bye("Sorry, -g can only currently be used with IPv4.");
|
||||
@ -40,7 +40,7 @@ diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
|
||||
nsock_iod_set_ipoptions(cs.sock_nsi, ipopts, ipoptslen);
|
||||
free(ipopts); /* Nsock has its own copy */
|
||||
@@ -966,49 +967,18 @@ int ncat_connect(void)
|
||||
@@ -977,49 +978,18 @@ int ncat_connect(void)
|
||||
if (o.af == AF_UNIX) {
|
||||
if (o.proto == IPPROTO_UDP) {
|
||||
nsock_connect_unixsock_datagram(mypool, cs.sock_nsi, connect_handler, NULL,
|
||||
@ -97,7 +97,7 @@ diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
}
|
||||
} else {
|
||||
/* A proxy connection. */
|
||||
@@ -1044,6 +1014,8 @@ int ncat_connect(void)
|
||||
@@ -1055,6 +1025,8 @@ int ncat_connect(void)
|
||||
/* connect */
|
||||
rc = nsock_loop(mypool, -1);
|
||||
|
||||
@ -106,8 +106,8 @@ diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
if (o.verbose) {
|
||||
struct timeval end_time;
|
||||
double time;
|
||||
@@ -1067,19 +1039,73 @@ int ncat_connect(void)
|
||||
return rc == NSOCK_LOOP_ERROR ? 1 : 0;
|
||||
@@ -1085,21 +1057,74 @@ static void send_udp_null(nsock_pool nsp
|
||||
nsock_write(nsp, cs.sock_nsi, write_socket_handler, -1, NULL, NULL_PROBE, length);
|
||||
}
|
||||
|
||||
+static void try_nsock_connect(nsock_pool nsp, struct sockaddr_list *conn_addr)
|
||||
@ -158,10 +158,12 @@ diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
ncat_assert(type == NSE_TYPE_CONNECT || type == NSE_TYPE_CONNECT_SSL);
|
||||
|
||||
- if (status == NSE_STATUS_ERROR) {
|
||||
- loguser("%s.\n", socket_strerror(nse_errorcode(evt)));
|
||||
- if (!o.zerobyte||o.verbose)
|
||||
- loguser("%s.\n", socket_strerror(nse_errorcode(evt)));
|
||||
- exit(1);
|
||||
- } else if (status == NSE_STATUS_TIMEOUT) {
|
||||
- loguser("%s.\n", socket_strerror(ETIMEDOUT));
|
||||
- if (!o.zerobyte||o.verbose)
|
||||
- loguser("%s.\n", socket_strerror(ETIMEDOUT));
|
||||
- exit(1);
|
||||
+ if (status == NSE_STATUS_ERROR || status == NSE_STATUS_TIMEOUT) {
|
||||
+ int errcode = (status == NSE_STATUS_TIMEOUT)?ETIMEDOUT:nse_errorcode(evt);
|
||||
@ -180,15 +182,16 @@ diff -up nmap-7.00/ncat/ncat_connect.c.allresolve nmap-7.00/ncat/ncat_connect.c
|
||||
+ }
|
||||
+ else {
|
||||
+ free_sockaddr_list(targetaddrs);
|
||||
+ loguser("%s.\n", socket_strerror(errcode));
|
||||
+ if (!o.zerobyte||o.verbose)
|
||||
+ loguser("%s.\n", socket_strerror(errcode));
|
||||
+ exit(1);
|
||||
+ }
|
||||
} else {
|
||||
ncat_assert(status == NSE_STATUS_SUCCESS);
|
||||
}
|
||||
diff -up nmap-7.00/ncat/ncat_core.c.allresolve nmap-7.00/ncat/ncat_core.c
|
||||
--- nmap-7.00/ncat/ncat_core.c.allresolve 2015-11-15 15:08:02.000000000 +0100
|
||||
+++ nmap-7.00/ncat/ncat_core.c 2015-11-20 14:15:51.763905046 +0100
|
||||
diff -up nmap-7.30/ncat/ncat_core.c.allresolve nmap-7.30/ncat/ncat_core.c
|
||||
--- nmap-7.30/ncat/ncat_core.c.allresolve 2016-07-19 12:07:58.000000000 +0200
|
||||
+++ nmap-7.30/ncat/ncat_core.c 2016-10-03 10:45:50.689808852 +0200
|
||||
@@ -146,8 +146,7 @@ int num_listenaddrs = 0;
|
||||
union sockaddr_u srcaddr;
|
||||
size_t srcaddrlen;
|
||||
@ -199,7 +202,7 @@ diff -up nmap-7.00/ncat/ncat_core.c.allresolve nmap-7.00/ncat/ncat_core.c
|
||||
|
||||
/* Global options structure. */
|
||||
struct options o;
|
||||
@@ -211,19 +210,23 @@ void options_init(void)
|
||||
@@ -212,19 +211,23 @@ void options_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -228,7 +231,7 @@ diff -up nmap-7.00/ncat/ncat_core.c.allresolve nmap-7.00/ncat/ncat_core.c
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = af;
|
||||
@@ -240,8 +243,19 @@ static int resolve_internal(const char *
|
||||
@@ -241,8 +244,19 @@ static int resolve_internal(const char *
|
||||
if (result == NULL)
|
||||
return EAI_NONAME;
|
||||
ncat_assert(result->ai_addrlen > 0 && result->ai_addrlen <= (int) sizeof(struct sockaddr_storage));
|
||||
@ -250,7 +253,7 @@ diff -up nmap-7.00/ncat/ncat_core.c.allresolve nmap-7.00/ncat/ncat_core.c
|
||||
freeaddrinfo(result);
|
||||
|
||||
return 0;
|
||||
@@ -260,12 +274,42 @@ int resolve(const char *hostname, unsign
|
||||
@@ -261,12 +275,42 @@ int resolve(const char *hostname, unsign
|
||||
struct sockaddr_storage *ss, size_t *sslen, int af)
|
||||
{
|
||||
int flags;
|
||||
@ -294,9 +297,9 @@ diff -up nmap-7.00/ncat/ncat_core.c.allresolve nmap-7.00/ncat/ncat_core.c
|
||||
}
|
||||
|
||||
int fdinfo_close(struct fdinfo *fdn)
|
||||
diff -up nmap-7.00/ncat/ncat_core.h.allresolve nmap-7.00/ncat/ncat_core.h
|
||||
--- nmap-7.00/ncat/ncat_core.h.allresolve 2015-11-15 15:08:02.000000000 +0100
|
||||
+++ nmap-7.00/ncat/ncat_core.h 2015-11-20 14:15:51.763905046 +0100
|
||||
diff -up nmap-7.30/ncat/ncat_core.h.allresolve nmap-7.30/ncat/ncat_core.h
|
||||
--- nmap-7.30/ncat/ncat_core.h.allresolve 2016-07-19 12:07:58.000000000 +0200
|
||||
+++ nmap-7.30/ncat/ncat_core.h 2016-10-03 10:45:50.689808852 +0200
|
||||
@@ -132,14 +132,20 @@
|
||||
a IPV4 INADDR_ANY and a IPV6 in6addr_any at most or a user defined address */
|
||||
#define NUM_LISTEN_ADDRS 2
|
||||
@ -320,7 +323,7 @@ diff -up nmap-7.00/ncat/ncat_core.h.allresolve nmap-7.00/ncat/ncat_core.h
|
||||
|
||||
enum exec_mode {
|
||||
EXEC_PLAIN,
|
||||
@@ -227,6 +233,14 @@ void options_init(void);
|
||||
@@ -228,6 +234,14 @@ void options_init(void);
|
||||
int resolve(const char *hostname, unsigned short port,
|
||||
struct sockaddr_storage *ss, size_t *sslen, int af);
|
||||
|
||||
@ -335,10 +338,10 @@ diff -up nmap-7.00/ncat/ncat_core.h.allresolve nmap-7.00/ncat/ncat_core.h
|
||||
int fdinfo_close(struct fdinfo *fdn);
|
||||
int fdinfo_recv(struct fdinfo *fdn, char *buf, size_t size);
|
||||
int fdinfo_send(struct fdinfo *fdn, const char *buf, size_t size);
|
||||
diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
--- nmap-7.00/ncat/ncat_main.c.allresolve 2015-11-20 14:15:51.757905070 +0100
|
||||
+++ nmap-7.00/ncat/ncat_main.c 2015-11-20 14:15:51.764905042 +0100
|
||||
@@ -679,15 +679,20 @@ int main(int argc, char *argv[])
|
||||
diff -up nmap-7.30/ncat/ncat_main.c.allresolve nmap-7.30/ncat/ncat_main.c
|
||||
--- nmap-7.30/ncat/ncat_main.c.allresolve 2016-10-03 10:45:50.687808850 +0200
|
||||
+++ nmap-7.30/ncat/ncat_main.c 2016-10-03 10:45:50.690808853 +0200
|
||||
@@ -683,15 +683,20 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif /* HAVE_SYS_UN_H */
|
||||
|
||||
@ -363,7 +366,7 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
}
|
||||
|
||||
if (o.proxyaddr) {
|
||||
@@ -703,12 +708,12 @@ int main(int argc, char *argv[])
|
||||
@@ -707,12 +712,12 @@ int main(int argc, char *argv[])
|
||||
* (due to the colons in the IPv6 address and host:port separator).
|
||||
*/
|
||||
|
||||
@ -380,7 +383,7 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
}
|
||||
} else {
|
||||
bye("Invalid proxy type \"%s\".", o.proxytype);
|
||||
@@ -777,10 +782,10 @@ int main(int argc, char *argv[])
|
||||
@@ -791,10 +796,10 @@ int main(int argc, char *argv[])
|
||||
} else {
|
||||
#if HAVE_SYS_UN_H
|
||||
if (o.af == AF_UNIX) {
|
||||
@ -395,7 +398,7 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
o.target = argv[optind];
|
||||
optind++;
|
||||
} else
|
||||
@@ -794,7 +799,7 @@ int main(int argc, char *argv[])
|
||||
@@ -808,7 +813,7 @@ int main(int argc, char *argv[])
|
||||
* targetss contains data already and you don't want remove them
|
||||
*/
|
||||
if( !o.proxytype
|
||||
@ -404,7 +407,7 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
|
||||
bye("Could not resolve hostname \"%s\": %s.", o.target, gai_strerror(rc));
|
||||
optind++;
|
||||
@@ -832,21 +837,28 @@ int main(int argc, char *argv[])
|
||||
@@ -846,21 +851,28 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (o.proxytype && !o.listen)
|
||||
; /* Do nothing - port is already set to proxyport */
|
||||
@ -444,7 +447,7 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
|
||||
if (srcport != -1) {
|
||||
if (o.listen) {
|
||||
@@ -858,7 +870,7 @@ int main(int argc, char *argv[])
|
||||
@@ -872,7 +884,7 @@ int main(int argc, char *argv[])
|
||||
/* We have a source port but not an explicit source address;
|
||||
fill in an unspecified address of the same family as the
|
||||
target. */
|
||||
@ -453,7 +456,7 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
if (srcaddr.storage.ss_family == AF_INET)
|
||||
srcaddr.in.sin_addr.s_addr = INADDR_ANY;
|
||||
else if (srcaddr.storage.ss_family == AF_INET6)
|
||||
@@ -950,8 +962,8 @@ static int ncat_listen_mode(void)
|
||||
@@ -964,8 +976,8 @@ static int ncat_listen_mode(void)
|
||||
bye("/bin/sh is not executable, so `-c' won't work.");
|
||||
#endif
|
||||
|
||||
@ -464,9 +467,9 @@ diff -up nmap-7.00/ncat/ncat_main.c.allresolve nmap-7.00/ncat/ncat_main.c
|
||||
} else {
|
||||
size_t ss_len;
|
||||
int rc;
|
||||
diff -up nmap-7.00/ncat/util.c.allresolve nmap-7.00/ncat/util.c
|
||||
--- nmap-7.00/ncat/util.c.allresolve 2015-06-20 23:56:01.000000000 +0200
|
||||
+++ nmap-7.00/ncat/util.c 2015-11-20 14:15:51.764905042 +0100
|
||||
diff -up nmap-7.30/ncat/util.c.allresolve nmap-7.30/ncat/util.c
|
||||
--- nmap-7.30/ncat/util.c.allresolve 2016-04-04 17:38:44.000000000 +0200
|
||||
+++ nmap-7.30/ncat/util.c 2016-10-03 10:45:50.690808853 +0200
|
||||
@@ -503,7 +503,7 @@ int do_connect(int type)
|
||||
/* We need a socket that can be inherited by child processes in
|
||||
ncat_exec_win.c, for --exec and --sh-exec. inheritable_socket is from
|
||||
|
@ -5,9 +5,9 @@
|
||||
Summary: Network exploration tool and security scanner
|
||||
Name: nmap
|
||||
Epoch: 2
|
||||
Version: 7.12
|
||||
Version: 7.30
|
||||
#global prerelease TEST5
|
||||
Release: 2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
# Uses combination of licenses based on GPL license, but with extra modification
|
||||
# so it got its own license tag rhbz#1055861
|
||||
License: Nmap
|
||||
@ -221,6 +221,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/xnmap.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Oct 03 2016 Michal Hlavinka <mhlavink@redhat.com> - 2:7.30-1
|
||||
- nmap updated to 7.30
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:7.12-2
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user