[arch-commits] Commit in ettercap/trunk (2 files)

2017-02-13 Thread Jelle van der Waa
Date: Monday, February 13, 2017 @ 19:25:24
  Author: jelle
Revision: 212165

upgpkg: ettercap 0.8.2-4

OpenSSL 1.1.0 rebuild

Added:
  ettercap/trunk/0001-First-draft-of-openssl-1.1-compatibility-layer-from-.patch
Modified:
  ettercap/trunk/PKGBUILD

-+
 0001-First-draft-of-openssl-1.1-compatibility-layer-from-.patch |  257 
++
 PKGBUILD|   12 
 2 files changed, 266 insertions(+), 3 deletions(-)

Added: 0001-First-draft-of-openssl-1.1-compatibility-layer-from-.patch
===
--- 0001-First-draft-of-openssl-1.1-compatibility-layer-from-.patch 
(rev 0)
+++ 0001-First-draft-of-openssl-1.1-compatibility-layer-from-.patch 
2017-02-13 19:25:24 UTC (rev 212165)
@@ -0,0 +1,257 @@
+From f0d63b27c82df2ad5f7ada6310727d841b43fbcc Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna 
+Date: Mon, 27 Jun 2016 12:41:33 +0200
+Subject: [PATCH] First draft of openssl 1.1 compatibility layer (from
+ https://github.com/curl/curl/commit/cfe16c22d7891a1f65ea8cd4c5352504a2afbddc)
+ Closes: #739
+
+---
+ src/dissectors/ec_ssh.c | 93 -
+ src/ec_sslwrap.c| 14 
+ 2 files changed, 106 insertions(+), 1 deletion(-)
+
+diff --git a/src/dissectors/ec_ssh.c b/src/dissectors/ec_ssh.c
+index f89200dc..26c86491 100644
+--- a/src/dissectors/ec_ssh.c
 b/src/dissectors/ec_ssh.c
+@@ -36,6 +36,10 @@
+ #include 
+ #include 
+ 
++#if (OPENSSL_VERSION_NUMBER >= 0x1010L)
++#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */
++#endif
++
+ #define SMSG_PUBLIC_KEY 2
+ #define CMSG_SESSION_KEY 3
+ #define CMSG_USER 4
+@@ -138,6 +142,11 @@ FUNC_DECODER(dissector_ssh)
+char tmp[MAX_ASCII_ADDR_LEN];
+u_int32 ssh_len, ssh_mod;
+u_char ssh_packet_type, *ptr, *key_to_put;
++#ifdef HAVE_OPAQUE_RSA_DSA_DH
++   BIGNUM *h_n, *s_n, *m_h_n, *m_s_n;
++   BIGNUM *h_e, *s_e, *m_h_e, *m_s_e;
++   BIGNUM *h_d, *s_d, *m_h_d, *m_s_d;
++#endif
+ 
+/* don't complain about unused var */
+(void) DECODE_DATA; 
+@@ -383,12 +392,25 @@ FUNC_DECODER(dissector_ssh)
+ if (session_data->ptrkey == NULL) { 
+/* Initialize RSA key structures (other fileds are set to 0) */
+session_data->serverkey = RSA_new();
++#ifdef HAVE_OPAQUE_RSA_DSA_DH
++   s_n = BN_new();
++   s_e = BN_new();
++   RSA_set0_key(session_data->serverkey, s_n, s_e, s_d);
++#else
+session_data->serverkey->n = BN_new();
+session_data->serverkey->e = BN_new();
++#endif
+ 
+session_data->hostkey = RSA_new();
++
++#ifdef HAVE_OPAQUE_RSA_DSA_DH
++   h_n = BN_new();
++   h_e = BN_new();
++   RSA_set0_key(session_data->hostkey, h_n, h_e, h_d);
++#else
+session_data->hostkey->n = BN_new();
+session_data->hostkey->e = BN_new();
++#endif
+ 
+/* Get the RSA Key from the packet */
+NS_GET32(server_mod,ptr);
+@@ -396,19 +418,37 @@ FUNC_DECODER(dissector_ssh)
+   DEBUG_MSG("Dissector_ssh Bougs Server_Mod");
+   return NULL;
+}
++#ifdef HAVE_OPAQUE_RSA_DSA_DH
++   RSA_get0_key(session_data->serverkey, _n, _e, _d);
++   get_bn(s_e, );
++   get_bn(s_n, );
++#else
+get_bn(session_data->serverkey->e, );
+get_bn(session_data->serverkey->n, );
++#endif
+ 
+NS_GET32(host_mod,ptr);
+if (ptr + (host_mod/8) > PACKET->DATA.data + PACKET->DATA.len) 
{
+   DEBUG_MSG("Dissector_ssh Bougs Host_Mod");
+   return NULL;
+}
++
++#ifdef HAVE_OPAQUE_RSA_DSA_DH
++   RSA_get0_key(session_data->hostkey, _n, _e, _d);
++   get_bn(h_e, );
++   get_bn(h_n, );
++#else
+get_bn(session_data->hostkey->e, );
+get_bn(session_data->hostkey->n, );
++#endif
+ 
++#ifdef HAVE_OPAQUE_RSA_DSA_DH
++   server_exp = BN_get_word(s_e);
++   host_exp   = BN_get_word(h_e);
++#else
+server_exp = *(session_data->serverkey->e->d);
+host_exp   = *(session_data->hostkey->e->d);
++#endif
+ 
+/* Check if we already have a suitable RSA key to substitute */
+index_ssl = _conn_key;
+@@ -424,7 +464,7 @@ FUNC_DECODER(dissector_ssh)
+   SAFE_CALLOC(*index_ssl, 1, sizeof(ssh_my_key));
+ 
+   /* Generate the new key */
+-  (*index_ssl)->myserverkey = (RSA 
*)RSA_generate_key(server_mod, server_exp, NULL, NULL);
++  (*index_ssl)->myserverkey = (RSA 
*)RSA_generate_key_ex(server_mod, server_exp, NULL, NULL);
+

[arch-commits] Commit in ettercap/trunk (2 files)

2011-08-06 Thread Giovanni Scafora
Date: Saturday, August 6, 2011 @ 07:42:31
  Author: giovanni
Revision: 134606

upgpkg: ettercap NG_0.7.3-17
Added dns support on x86_64, and config file to the backup field

Added:
  ettercap/trunk/ettercap-NG-0.7.3_dns_support_on_x86_64.patch
Modified:
  ettercap/trunk/PKGBUILD

---+
 PKGBUILD  |   11 --
 ettercap-NG-0.7.3_dns_support_on_x86_64.patch |   39 
 2 files changed, 47 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-08-06 09:41:48 UTC (rev 134605)
+++ PKGBUILD2011-08-06 11:42:31 UTC (rev 134606)
@@ -5,18 +5,21 @@
 pkgname=ettercap
 pkgver=NG_0.7.3
 _origver=NG-0.7.3
-pkgrel=16
+pkgrel=17
 pkgdesc=A network sniffer/interceptor/logger for ethernet LANs - console
 arch=('i686' 'x86_64')
 url=http://ettercap.sourceforge.net/;
 license=('GPL')
 depends=('ncurses' 'openssl' 'libpcap' 'zlib' 'pcre' 'libtool' 'libnet')
 makedepends=('libnet' 'pkgconfig')
+backup=('etc/etter.conf')
 options=(!libtool)
 
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${_origver}.tar.gz;
-01_pointers_and_ints_dont_mix.diff)
+01_pointers_and_ints_dont_mix.diff
+ettercap-NG-0.7.3_dns_support_on_x86_64.patch)
 md5sums=('28fb15cd024162c55249888fe1b97820'
- 'ad235cd90aaa3e168575d06efac4d862')
+ 'ad235cd90aaa3e168575d06efac4d862'
+ 'f3d66186eece056a6d71453f9f288623')
 
 build() {
   cd ${srcdir}/${pkgname}-${_origver}
@@ -28,6 +31,8 @@
 
   patch -Np1 -i ${srcdir}/01_pointers_and_ints_dont_mix.diff
 
+  [ $CARCH = x86_64 ]  patch -Np1 -i 
${srcdir}/ettercap-NG-0.7.3_dns_support_on_x86_64.patch
+
   ./configure --prefix=/usr \
   --sysconfdir=/etc \
   --mandir=/usr/share/man \

Added: ettercap-NG-0.7.3_dns_support_on_x86_64.patch
===
--- ettercap-NG-0.7.3_dns_support_on_x86_64.patch   
(rev 0)
+++ ettercap-NG-0.7.3_dns_support_on_x86_64.patch   2011-08-06 11:42:31 UTC 
(rev 134606)
@@ -0,0 +1,39 @@
+--- a/configure2011-08-06 12:50:26.0 +0200
 b/configure2011-08-06 13:01:56.0 +0200
+@@ -15732,7 +15732,7 @@
+ if ${ac_cv_search_dn_expand+:} false; then :
+ 
+ else
+-  ac_cv_search_dn_expand=no
++  ac_cv_search_dn_expand='-lresolv'
+ fi
+ rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+@@ -15790,14 +15790,14 @@
+  ac_ec_dns=yes
+ 
+ else
+-   if false; then
++if true; then
+   HAVE_DN_EXPAND_TRUE=
+   HAVE_DN_EXPAND_FALSE='#'
+ else
+   HAVE_DN_EXPAND_TRUE='#'
+   HAVE_DN_EXPAND_FALSE=
+ fi
+- ac_ec_dns=no
++ ac_ec_dns=yes
+ fi
+ 
+ 
+--- a/src/ec_log.c 2004-09-30 18:01:45.0 +0200
 b/src/ec_log.c 2011-08-06 13:04:30.0 +0200
+@@ -190,7 +190,7 @@
+   if (fd-cfd == NULL)
+  SEMIFATAL_ERROR(%s, gzerror(fd-cfd, zerr));
+} else {
+-  fd-fd = open(filename, O_CREAT | O_TRUNC | O_RDWR | O_BINARY);
++  fd-fd = open(filename, O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0666);
+   if (fd-fd == -1)
+  SEMIFATAL_ERROR(Can't create %s: %s, filename, strerror(errno));
+}