On Tue, 21 Sep 2021 19:25:08 +0200 Solene Rapenne <sol...@perso.pw>: > hydra provides a wizard shell script asking questions to give you > the command for what you want to do. However it's not working with > our /bin/sh (I suppose it supposed /bin/sh is bash). sthen@ gave > me a sed command to fix the read (sh builtin) calls into something > compatible with sh. > > ok ? > > Index: Makefile > =================================================================== > RCS file: /home/reposync/ports/security/hydra/Makefile,v > retrieving revision 1.64 > diff -u -p -r1.64 Makefile > --- Makefile 14 Jul 2021 09:49:09 -0000 1.64 > +++ Makefile 21 Sep 2021 17:11:09 -0000 > @@ -6,6 +6,7 @@ COMMENT-gui= GTK frontend for hydra > VERSION= 9.2 > PKGNAME-main= hydra-${VERSION} > PKGNAME-gui= hydra-gui-${VERSION} > +REVISION= 0 > > CATEGORIES= security > > Index: patches/patch-hydra-wizard_sh > =================================================================== > RCS file: patches/patch-hydra-wizard_sh > diff -N patches/patch-hydra-wizard_sh > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-hydra-wizard_sh 21 Sep 2021 17:11:00 -0000 > @@ -0,0 +1,44 @@ > +$OpenBSD$ > + > +sh(1) builtin read command doesn't have -p parameter > + > +Index: hydra-wizard.sh > +--- hydra-wizard.sh.orig > ++++ hydra-wizard.sh > +@@ -5,21 +5,21 @@ > + echo > + echo "Welcome to the Hydra Wizard" > + echo > +-read -p "Enter the service to attack (eg: ftp, ssh, http-post-form): " > service > ++read service?"Enter the service to attack (eg: ftp, ssh, http-post-form): " > + test -z "$service" && { echo Error: service may not be empty ; exit 1 ; } > +-read -p "Enter the target to attack (or filename with targets): " target > ++read target?"Enter the target to attack (or filename with targets): " > + test -z "$target" && { echo Error: target may not be empty ; exit 1 ; } > +-read -p "Enter a username to test or a filename: " user > ++read user?"Enter a username to test or a filename: " > + test -z "$user" && { echo Error: user may not be empty ; exit 1 ; } > +-read -p "Enter a password to test or a filename: " pass > ++read pass?"Enter a password to test or a filename: " > + test -z "$pass" && { echo Error: pass may not be empty ; exit 1 ; } > + read -p "If you want to test for passwords (s)ame as login, (n)ull or > (r)everse login, enter these letters without spaces (e.g. \"sr\") or leave > empty otherwise: " pw > +-read -p "Port number (press enter for default): " port > ++read port?"Port number (press enter for default): " > + echo > + echo The following options are supported by the service module: > + hydra -U $service > + echo > +-read -p "If you want to add module options, enter them here (or leave > empty): " opt > ++read opt?"If you want to add module options, enter them here (or leave > empty): " > + echo > + > + ports="" > +@@ -38,7 +38,7 @@ test -n "$opt" && opts="-m '$opt'" > + echo The following command will be executed now: > + echo " hydra $users $passs -u $pws $ports $opts $targets $service" > + echo > +-read -p "Do you want to run the command now? [Y/n] " yn > ++read yn?"Do you want to run the command now? [Y/n] " > + test "$yn" = "n" -o "$yn" = "N" && { echo Exiting. ; exit 0 ; } > + echo > + hydra $users $passs -u $pws $ports $opts $targets $service >
ping