hi,

below an update from 9.1 to 9.2. Getting rid of a few patches, lightly tested 
SSH brute force, works for me, as well as triggering it via xhydra.

so far seems to work for me.

any feedback, tests etc. welcome, otherwise OK to update?

cheers,
Sebastian


Index: Makefile
===================================================================
RCS file: /cvs/ports/security/hydra/Makefile,v
retrieving revision 1.63
diff -u -r1.63 Makefile
--- Makefile    14 Feb 2021 13:42:13 -0000      1.63
+++ Makefile    11 Jul 2021 21:05:44 -0000
@@ -3,11 +3,9 @@
 COMMENT-main=  parallelized network logon cracker
 COMMENT-gui=   GTK frontend for hydra

-VERSION=       9.1
+VERSION=       9.2
 PKGNAME-main=  hydra-${VERSION}
 PKGNAME-gui=   hydra-gui-${VERSION}
-
-REVISION=      0

 CATEGORIES=    security

Index: distinfo
===================================================================
RCS file: /cvs/ports/security/hydra/distinfo,v
retrieving revision 1.18
diff -u -r1.18 distinfo
--- distinfo    13 Nov 2020 21:33:44 -0000      1.18
+++ distinfo    11 Jul 2021 21:05:44 -0000
@@ -1,2 +1,2 @@
-SHA256 (thc-hydra-9.1.tar.gz) = zgilFIwK5f9LCkry9/FcWUa8k5pX6uG7tt2hnzRBAnM=
-SIZE (thc-hydra-9.1.tar.gz) = 611846
+SHA256 (thc-hydra-9.2.tar.gz) = GijwZHY/kUT47FdEFqVu9RwKsa4iduNaic7tT1lOxdI=
+SIZE (thc-hydra-9.2.tar.gz) = 614176
Index: patches/patch-Makefile_am
===================================================================
RCS file: /cvs/ports/security/hydra/patches/patch-Makefile_am,v
retrieving revision 1.5
diff -u -r1.5 patch-Makefile_am
--- patches/patch-Makefile_am   13 Nov 2020 21:33:44 -0000      1.5
+++ patches/patch-Makefile_am   11 Jul 2021 21:05:44 -0000
@@ -7,8 +7,8 @@
  WARN_CLANG=-Wformat-nonliteral -Wstrncat-size -Wformat-security 
-Wsign-conversion -Wconversion -Wfloat-conversion -Wshorten-64-to-32 
-Wuninitialized -Wmissing-variable-declarations  -Wmissing-declarations
  WARN_GCC=-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral 
-Wformat-truncation=2 -Wnull-dereference -Wstrict-overflow=2 
-Wstringop-overflow=4 -Walloca-larger-than=4096 -Wtype-limits -Wconversion 
-Wtrampolines -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
-fno-common -Wcast-align
  CFLAGS ?= -g
--OPTS=-I. -O3 $(CFLAGS) -fcommon
-+OPTS=-I. $(CFLAGS) -fcommon
+-OPTS=-I. -O3 $(CFLAGS) -fcommon -Wl,--allow-multiple-definition
++OPTS=-I. $(CFLAGS) -fcommon -Wl,--allow-multiple-definition
  # -Wall -g -pedantic
  LIBS=-lm
  DESTDIR ?=
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/security/hydra/patches/patch-configure,v
retrieving revision 1.12
diff -u -r1.12 patch-configure
--- patches/patch-configure     9 Dec 2020 10:19:53 -0000       1.12
+++ patches/patch-configure     11 Jul 2021 21:05:44 -0000
@@ -3,7 +3,7 @@
 Index: configure
 --- configure.orig
 +++ configure
-@@ -170,6 +170,13 @@ fi
+@@ -172,6 +172,13 @@ fi
  STRIP="strip"
  echo

@@ -17,7 +17,7 @@
  echo "Checking for zlib (libz/zlib.h) ..."
  for i in $INCDIRS; do
     if [ -f "$i/zlib.h" ]; then
-@@ -267,13 +274,13 @@ if [ "$SSL_IPATH" = "/usr/include" ]; then
+@@ -269,13 +276,13 @@ if [ "$SSL_IPATH" = "/usr/include" ]; then
  fi

  echo "Checking for gcrypt (libgcrypt/gpg-error.h) ..."
@@ -33,7 +33,7 @@
      if [ "X" = "X$GPGERROR_IPATH" ]; then
          TMP_PATH=`/bin/ls $i/$SYSM*/gpg-error.h 2> /dev/null`
          if [ -n "$TMP_PATH" ]; then
-@@ -294,7 +301,7 @@ else
+@@ -296,7 +303,7 @@ else
  fi

  echo "Checking for idn (libidn) ..."
@@ -42,7 +42,7 @@
      if [ "X" = "X$IDN_PATH" ]; then
          if [ -f "$i/libidn.so" -o -f "$i/libidn.dylib" -o -f "$i/libidn.a" -o 
-f "$i/libidn.dll.a" -o -f "$i/libidn.la" ]; then
              IDN_PATH="$i"
-@@ -307,7 +314,7 @@ for i in $LIBDIRS ; do
+@@ -309,7 +316,7 @@ for i in $LIBDIRS ; do
          fi
      fi
  done
@@ -51,7 +51,7 @@
      if [ "X" != "X$IDN_PATH" ]; then
          if [ -f "$i/stringprep.h" ]; then
              IDN_IPATH="$i"
-@@ -379,7 +386,7 @@ if [ "X" = "X$CURSES_PATH" -o "X" = "X$CURSES_IPATH" ]
+@@ -381,7 +388,7 @@ if [ "X" = "X$CURSES_PATH" -o "X" = "X$CURSES_IPATH" ]
  fi

  echo "Checking for pcre (libpcre/pcre.h) ..."
@@ -60,7 +60,7 @@
      if [ "X" = "X$PCRE_PATH" ]; then
          if [ -f "$i/libpcre.so" -o -f "$i/libpcre.dylib" -o -f "$i/libpcre.a" 
  ]; then
              PCRE_PATH="$i"
-@@ -398,7 +405,7 @@ for i in $LIBDIRS ; do
+@@ -400,7 +407,7 @@ for i in $LIBDIRS ; do
          fi
      fi
  done
@@ -69,7 +69,7 @@
      if [ "X" != "X$PCRE_PATH" ]; then
          if [ -f "$i/pcre.h" ]; then
              PCRE_IPATH="$i"
-@@ -424,7 +431,7 @@ echo "Checking for Postgres (libpq/libpq-fe.h) ..."
+@@ -426,7 +433,7 @@ echo "Checking for Postgres (libpq/libpq-fe.h) ..."
  #    POSTGRES_PATH=""
  #    POSTGRES_IPATH=""
  #else
@@ -78,16 +78,16 @@
      if [ "X" = "X$POSTGRES_PATH" ]; then
          if [ -f "$i/libpq.so" -o -f "$i/libpq.dylib" -o -f "$i/libpq.a" ]; 
then
              POSTGRES_PATH="$i"
-@@ -444,7 +451,7 @@ echo "Checking for Postgres (libpq/libpq-fe.h) ..."
+@@ -446,7 +453,7 @@ echo "Checking for Postgres (libpq/libpq-fe.h) ..."
      fi
    done
    POSTGRES_IPATH=
 -  for i in $INCDIRS \
 +  for i in $INCDIRS_ALL \
-     /opt/p*sql*/include /usr/*p*sql*/include /usr/local/*psql*/include
+     /opt/p*sql*/include /usr/*p*sql*/include /usr/local/*psql*/include 
/mingw64/include
    do
      if [ "X" = "X$POSTGRES_IPATH" ]; then
-@@ -648,7 +655,7 @@ if [ "X" = "X$FIREBIRD_PATH" -o "X" = "X$FIREBIRD_IPAT
+@@ -650,7 +657,7 @@ if [ "X" = "X$FIREBIRD_PATH" -o "X" = "X$FIREBIRD_IPAT
  fi

  echo "Checking for MYSQL client (libmysqlclient/math.h) ..."
@@ -96,7 +96,7 @@
      if [ "X" = "X$MYSQL_PATH" ]; then
          if [ -f "$i/libmysqlclient.so" -o -f "$i/libmysqlclient.dylib" -o -f 
"$i/libmysqlclient.a" ]; then
              MYSQL_PATH="$i"
-@@ -668,7 +675,7 @@ for i in $LIBDIRS ; do
+@@ -670,7 +677,7 @@ for i in $LIBDIRS ; do
      fi
  done
  MYSQLINSUBDIR=""
@@ -105,7 +105,7 @@
      if [ "X" != "X$MYSQL_PATH" ]; then
          if [ -f "$i/mysql/mysql.h" ]; then
              MYSQL_IPATH="$i/mysql"
-@@ -819,7 +826,7 @@ if [ "$SAPR3_IPATH" = "/usr/include" ]; then
+@@ -821,7 +828,7 @@ if [ "$SAPR3_IPATH" = "/usr/include" ]; then
  fi

  echo "Checking for libssh (libssh/libssh.h) ..."
@@ -114,7 +114,7 @@
      if [ "X" = "X$SSH_PATH" ]; then
          if [ -f "$i/libssh.so" -o -f "$i/libssh.dylib" -o -f "$i/libssh.a"  
]; then
              SSH_PATH="$i"
-@@ -838,7 +845,7 @@ for i in $LIBDIRS ; do
+@@ -840,7 +847,7 @@ for i in $LIBDIRS ; do
          fi
      fi
  done
@@ -123,7 +123,7 @@
      if [ "X" = "X$SSH_IPATH" ]; then
          if [ -f "$i/libssh/libssh.h" ]; then
              SSH_IPATH="$i"
-@@ -971,7 +978,7 @@ fi
+@@ -973,7 +980,7 @@ fi

  echo "Checking for Memcached (libmemcached/memcached.h) ..."

@@ -132,7 +132,7 @@
      if [ "X" = "X$MCACHED_PATH" ]; then
          if [ -f "$i/libmemcached.so" -o -f "$i/libmemcached.dylib" -o -f 
"$i/libmemcached.a" ]; then
              MCACHED_PATH="$i"
-@@ -992,7 +999,7 @@ echo "Checking for Memcached (libmemcached/memcached.h
+@@ -994,7 +1001,7 @@ echo "Checking for Memcached (libmemcached/memcached.h
    done

    MCACHED_IPATH=
@@ -141,7 +141,7 @@
      if [ "X" = "X$MCACHED_IPATH" ]; then
          if [ -f "$i/memcached.h" ]; then
              MCACHED_IPATH="$i"
-@@ -1021,7 +1028,7 @@ fi
+@@ -1023,7 +1030,7 @@ fi

  echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/libwinpr3/winpr.h) ..."

@@ -150,7 +150,7 @@
      if [ "X" = "X$FREERDP3_PATH" ]; then
          if [ -f "$i/libfreerdp3.so" -o -f "$i/libfreerdp3.dylib" -o -f 
"$i/libfreerdp3.a" -o -f "$i/libfreerdp3.dll.a" ]; then
              FREERDP3_PATH="$i"
-@@ -1036,7 +1043,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1038,7 +1045,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
    done

    FREERDP3_IPATH=
@@ -159,7 +159,7 @@
      if [ "X" = "X$FREERDP3_IPATH" ]; then
          if [ -f "$i/freerdp/freerdp.h" ]; then
              FREERDP3_IPATH="$i/freerdp3"
-@@ -1047,7 +1054,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1049,7 +1056,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
      fi
    done

@@ -168,7 +168,7 @@
      if [ "X" = "X$WINPR3_PATH" ]; then
          if [ -f "$i/libwinpr3.so" -o -f "$i/libwinpr3.dylib" -o -f 
"$i/libwinpr3.a" ]; then
              WINPR3_PATH="$i"
-@@ -1062,7 +1069,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1064,7 +1071,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
    done

    WINPR3_IPATH=
@@ -177,7 +177,7 @@
      if [ "X" = "X$WINPR3_IPATH" ]; then
          if [ -f "$i/winpr.h" ]; then
              WINPR3_IPATH="$i"
-@@ -1094,7 +1101,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1096,7 +1103,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
    if [ "X" = "X$FREERDP3_PATH" -o "X" = "X$FREERDP3_IPATH" -o "X" = 
"X$WINPR3_PATH" -o "X" = "X$WINPR3_IPATH" ]; then
      echo "Checking for Freerdp2 (libfreerdp2/freerdp.h/libwinpr2/winpr.h) ..."

@@ -186,7 +186,7 @@
          if [ "X" = "X$FREERDP2_PATH" ]; then
              if [ -f "$i/libfreerdp2.so" -o -f "$i/libfreerdp2.dylib" -o -f 
"$i/libfreerdp2.a" -o -f "$i/libfreerdp2.dll.a" ]; then
                  FREERDP2_PATH="$i"
-@@ -1109,7 +1116,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1111,7 +1118,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
      done

      FREERDP2_IPATH=
@@ -195,7 +195,7 @@
          if [ "X" = "X$FREERDP2_IPATH" ]; then
              if [ -f "$i/freerdp/freerdp.h" ]; then
                  FREERDP2_IPATH="$i/freerdp2"
-@@ -1120,14 +1127,14 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1122,14 +1129,14 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
          fi
      done

@@ -212,7 +212,7 @@
              if [ -n "$TMP_LIB" ]; then
              WINPR2_PATH="$i"
              fi
-@@ -1135,7 +1142,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
+@@ -1137,7 +1144,7 @@ echo "Checking for Freerdp3 (libfreerdp3/freerdp.h/lib
      done

      WINPR2_IPATH=
@@ -221,7 +221,7 @@
          if [ "X" = "X$WINPR2_IPATH" ]; then
              if [ -f "$i/winpr.h" ]; then
                  WINPR2_IPATH="$i"
-@@ -1429,7 +1436,7 @@ if [ -n "$FIREBIRD_PATH" -o \
+@@ -1431,7 +1438,7 @@ if [ -n "$FIREBIRD_PATH" -o \
              XLIBPATHS="-L/usr/lib -L/usr/local/lib"
          fi
      else
Index: patches/patch-hydra-gtk_src_callbacks_c
===================================================================
RCS file: patches/patch-hydra-gtk_src_callbacks_c
diff -N patches/patch-hydra-gtk_src_callbacks_c
--- patches/patch-hydra-gtk_src_callbacks_c     14 Feb 2021 13:42:13 -0000      
1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-hydra-gtk_src_callbacks_c,v 1.6 2021/02/14 13:42:13 jasper Exp 
$
-
-Index: hydra-gtk/src/callbacks.c
---- hydra-gtk/src/callbacks.c.orig
-+++ hydra-gtk/src/callbacks.c
-@@ -63,7 +63,7 @@ int hydra_get_options(char *options[]) {
-   gchar *tmp;
-   GString *a;
-
--  options[0] = HYDRA_BIN;
-+  options[0] = hydra_bin;
-
-   /* get the port */
-   widget = lookup_widget(GTK_WIDGET(wndMain), "spnPort");
-@@ -585,7 +585,7 @@ int *popen_re_unbuffered(char *command) {
-
-     (void)hydra_get_options(options);
-
--    execv(HYDRA_BIN, options);
-+    execv(hydra_bin, options);
-
-     g_warning("%s %i: popen_rw_unbuffered: execv() returned", __FILE__, 
__LINE__);
-
Index: patches/patch-hydra-gtk_src_main_c
===================================================================
RCS file: patches/patch-hydra-gtk_src_main_c
diff -N patches/patch-hydra-gtk_src_main_c
--- patches/patch-hydra-gtk_src_main_c  14 Feb 2021 13:42:14 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
-$OpenBSD: patch-hydra-gtk_src_main_c,v 1.1 2021/02/14 13:42:14 jasper Exp $
-
-Index: hydra-gtk/src/main.c
---- hydra-gtk/src/main.c.orig
-+++ hydra-gtk/src/main.c
-@@ -18,10 +18,12 @@ char *hydra_path1 = "./hydra";
- char *hydra_path2 = "/usr/local/bin/hydra";
- char *hydra_path3 = "/usr/bin/hydra";
-
-+char *hydra_bin;
-+GtkWidget *wndMain;
-+guint message_id;
-+
- int main(int argc, char *argv[]) {
--  extern GtkWidget *wndMain;
-   int i;
--  extern guint message_id;
-   GtkWidget *output;
-   GtkTextBuffer *outputbuf;
-
-@@ -34,22 +36,22 @@ int main(int argc, char *argv[]) {
-   message_id = 0;
-
-   /* locate the hydra binary */
--  HYDRA_BIN = NULL;
-+  hydra_bin = NULL;
-   for (i = 0; i < argc - 1; i++) {
-     if (!strcmp(argv[i], "--hydra-path")) {
--      HYDRA_BIN = argv[i + 1];
-+      hydra_bin = argv[i + 1];
-       break;
-     }
-   }
-
--  if ((HYDRA_BIN != NULL) && (g_file_test(HYDRA_BIN, 
G_FILE_TEST_IS_EXECUTABLE))) {
-+  if ((hydra_bin != NULL) && (g_file_test(hydra_bin, 
G_FILE_TEST_IS_EXECUTABLE))) {
-     /* just for obfuscation *g* */
-   } else if (g_file_test(hydra_path1, G_FILE_TEST_IS_EXECUTABLE)) {
--    HYDRA_BIN = hydra_path1;
-+    hydra_bin = hydra_path1;
-   } else if (g_file_test(hydra_path2, G_FILE_TEST_IS_EXECUTABLE)) {
--    HYDRA_BIN = hydra_path2;
-+    hydra_bin = hydra_path2;
-   } else if (g_file_test(hydra_path3, G_FILE_TEST_IS_EXECUTABLE)) {
--    HYDRA_BIN = hydra_path3;
-+    hydra_bin = hydra_path3;
-   } else {
-     g_error("Please tell me where hydra is, use --hydra-path\n");
-     return -1;
Index: patches/patch-hydra-gtk_src_support_h
===================================================================
RCS file: patches/patch-hydra-gtk_src_support_h
diff -N patches/patch-hydra-gtk_src_support_h
--- patches/patch-hydra-gtk_src_support_h       14 Feb 2021 13:42:14 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-hydra-gtk_src_support_h,v 1.1 2021/02/14 13:42:14 jasper Exp $
-
-Index: hydra-gtk/src/support.h
---- hydra-gtk/src/support.h.orig
-+++ hydra-gtk/src/support.h
-@@ -37,6 +37,6 @@ GdkPixbuf *create_pixbuf(const gchar *filename);
- /* This is used to set ATK action descriptions. */
- void glade_set_atk_action_description(AtkAction *action, const gchar 
*action_name, const gchar *description);
-
--GtkWidget *wndMain;
--char *HYDRA_BIN;
--guint message_id;
-+extern GtkWidget *wndMain;
-+extern char *hydra_bin;
-+extern guint message_id;

Reply via email to