-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating hydra support for freedrdp 3 #538
Changes from 9 commits
a881980
b0c1a9d
bc6e8ae
fdc460c
70fb9e4
9c300ea
54dd566
f5b3fe7
435ed44
fc196d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,8 @@ MANDIR="" | |
XHYDRA_SUPPORT="" | ||
FREERDP2_PATH="" | ||
WINPR2_PATH="" | ||
FREERDP3_PATH="" | ||
WINPR3_PATH="" | ||
SMBC_PATH="" | ||
SMBC_IPATH="" | ||
|
||
|
@@ -1017,7 +1019,6 @@ fi | |
MCACHED_IPATH="" | ||
fi | ||
|
||
|
||
echo "Checking for Freerdp2 (libfreerdp2.so, freerdp/*.h, libwinpr2.so, winpr/*.h) ..." | ||
|
||
for i in $LIBDIRS ; do | ||
|
@@ -1083,13 +1084,85 @@ fi | |
echo " ... found" | ||
fi | ||
if [ "X" = "X$FREERDP2_PATH" -o "X" = "X$FREERDP2_IPATH" -o "X" = "X$WINPR2_PATH" -o "X" = "X$WINPR2_IPATH" ]; then | ||
echo " ... NOT found, module rdp disabled" | ||
echo " ... NOT found, checking freerdp3 module next..." | ||
FREERDP2_PATH="" | ||
FREERDP2_IPATH="" | ||
WINPR2_PATH="" | ||
WINPR2_IPATH="" | ||
fi | ||
|
||
echo "Checking for Freerdp3 (libfreerdp3.so, freerdp/*.h, libwinpr3.so, winpr/*.h) ..." | ||
|
||
for i in $LIBDIRS ; do | ||
if [ "X" = "X$FREERDP2_PATH" ] && [ "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" | ||
fi | ||
fi | ||
if [ "X" = "X$FREERDP2_PATH" ] && [ "X" = "X$FREERDP3_PATH" ]; then | ||
TMP_LIB=`/bin/ls $i/libfreerdp3*.so* 2> /dev/null | grep libfreerdp3` | ||
if [ -n "$TMP_LIB" ]; then | ||
FREERDP3_PATH="$i" | ||
fi | ||
fi | ||
done | ||
|
||
FREERDP3_IPATH= | ||
for i in $INCDIRS ; do | ||
if [ "X" = "X$FREERDP2_IPATH" ] && [ "X" = "X$FREERDP3_IPATH" ]; then | ||
if [ -f "$i/freerdp/freerdp.h" ]; then | ||
FREERDP3_IPATH="$i/freerdp3" | ||
fi | ||
if [ -f "$i/freerdp3/freerdp/freerdp.h" ]; then | ||
FREERDP3_IPATH="$i/freerdp3" | ||
fi | ||
fi | ||
done | ||
|
||
for i in $LIBDIRS ; do | ||
if [ "X" = "X$WINPR2_PATH" ] && [ "X" = "X$WINPR3_PATH" ]; then | ||
if [ -f "$i/libwinpr3.so" -o -f "$i/libwinpr3.dylib" -o -f "$i/libwinpr3.a" ]; then | ||
WINPR3_PATH="$i" | ||
fi | ||
fi | ||
if [ "X" = "X$WINPR2_PATH" ] && [ "X" = "X$WINPR3_PATH" ]; then | ||
TMP_LIB=`/bin/ls $i/libwinpr3.dll.a 2> /dev/null | grep winpr` | ||
if [ -n "$TMP_LIB" ]; then | ||
WINPR3_PATH="$i" | ||
fi | ||
fi | ||
done | ||
|
||
WINPR3_IPATH= | ||
for i in $INCDIRS ; do | ||
if [ "X" = "X$WINPR2_IPATH" ] && [ "X" = "X$WINPR3_IPATH" ]; then | ||
if [ -f "$i/winpr.h" ]; then | ||
WINPR3_IPATH="$i" | ||
fi | ||
if [ -f "$i/winpr3/winpr/winpr.h" ]; then | ||
WINPR3_IPATH="$i/winpr3" | ||
fi | ||
fi | ||
done | ||
|
||
if [ "X" != "X$DEBUG" ]; then | ||
echo DEBUG: FREERDP3_PATH=$FREERDP3_PATH/ | ||
echo DEBUG: FREERDP3_IPATH=$FREERDP3_IPATH/ | ||
echo DEBUG: WINPR3_PATH=$WINPR3_PATH/ | ||
echo DEBUG: WINPR3_IPATH=$WINPR3_IPATH/ | ||
fi | ||
|
||
if [ -n "$FREERDP3_PATH" -a -n "$FREERDP3_IPATH" -a -n "$WINPR3_PATH" -a -n "$WINPR3_IPATH" ]; then | ||
echo " ... found" | ||
fi | ||
if [ "X" = "X$FREERDP3_PATH" -o "X" = "X$FREERDP3_IPATH" -o "X" = "X$WINPR3_PATH" -o "X" = "X$WINPR3_IPATH" ]; then | ||
echo " ... NOT found, module rdp disabled" | ||
FREERDP3_PATH="" | ||
FREERDP3_IPATH="" | ||
WINPR3_PATH="" | ||
WINPR3_IPATH="" | ||
fi | ||
|
||
echo "Checking for Mongodb (libmongoc-1.0.so, mongoc.h, libbson-1.0.so, bson.h) ..." | ||
|
||
for i in $LIBDIRS ; do | ||
|
@@ -1342,6 +1415,8 @@ if [ -n "$FIREBIRD_PATH" -o \ | |
-n "$MONGOD_PATH" -o \ | ||
-n "$FREERDP2_PATH" -o \ | ||
-n "$WINPR2_PATH" -o \ | ||
-n "$FREERDP3_PATH" -o \ | ||
-n "$WINPR3_PATH" -o \ | ||
-n "$SMBC_PATH" \ | ||
]; then | ||
if [ "$SYSS" = "Darwin" ] && [ ! -d "/lib" ]; then | ||
|
@@ -1426,11 +1501,17 @@ if [ -n "$BSON_PATH" ]; then | |
XDEFINES="$XDEFINES -DLIBBSON" | ||
fi | ||
if [ -n "$FREERDP2_PATH" ]; then | ||
XDEFINES="$XDEFINES -DLIBFREERDP2" | ||
XDEFINES="$XDEFINES -DLIBFREERDP" | ||
fi | ||
if [ -n "$WINPR2_PATH" ]; then | ||
XDEFINES="$XDEFINES -DLIBWINPR2" | ||
fi | ||
if [ -n "$FREERDP3_PATH" ]; then | ||
XDEFINES="$XDEFINES -DLIBFREERDP" | ||
fi | ||
if [ -n "$WINPR3_PATH" ]; then | ||
XDEFINES="$XDEFINES -DLIBWINPR3" | ||
fi | ||
if [ -n "$SMBC_PATH" ]; then | ||
XDEFINES="$XDEFINES -DLIBSMBCLIENT" | ||
fi | ||
|
@@ -1459,6 +1540,8 @@ for i in $SSL_PATH \ | |
$BSON_PATH \ | ||
$FREERDP2_PATH \ | ||
$WINPR2_PATH \ | ||
$FREERDP3_PATH \ | ||
$WINPR3_PATH \ | ||
$SMBC_PATH; do | ||
if [ "$OLDPATH" = "$i" ]; then | ||
OLDPATH="$i" | ||
|
@@ -1518,9 +1601,12 @@ fi | |
if [ -n "$MONGODB_IPATH" ]; then | ||
XIPATHS="$XIPATHS -I$MONGODB_IPATH -I$BSON_IPATH" | ||
fi | ||
if [ -n "$FREERDP2_IPATH" ]; then | ||
if [ -n "$FREERDP3_IPATH" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one is wrong, you moved the check to RDP3, but then copy RDP2_IPATH. as the real RDP3 one is below this has to be $FREERDP2_IPATH :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this bug is still present There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Working on this today and will update when finished |
||
XIPATHS="$XIPATHS -I$FREERDP2_IPATH -I$WINPR2_IPATH" | ||
fi | ||
if [ -n "$FREERDP3_IPATH" ]; then | ||
XIPATHS="$XIPATHS -I$FREERDP3_IPATH -I$WINPR3_IPATH" | ||
fi | ||
if [ -n "$SMBC_IPATH" ]; then | ||
XIPATHS="$XIPATHS -I$SMBC_IPATH" | ||
fi | ||
|
@@ -1605,6 +1691,12 @@ fi | |
if [ -n "$WINPR2_PATH" ]; then | ||
XLIBS="$XLIBS -lwinpr2" | ||
fi | ||
if [ -n "$FREERDP3_PATH" ]; then | ||
XLIBS="$XLIBS -lfreerdp3" | ||
fi | ||
if [ -n "$WINPR3_PATH" ]; then | ||
XLIBS="$XLIBS -lwinpr3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here you have not reestablished the previous librdp2 for XLIBS, only librdp3. same for the include paths above and defines etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just fixed the XLIBS and XDEFINES paths |
||
fi | ||
if [ -n "$SMBC_PATH" ]; then | ||
XLIBS="$XLIBS -lsmbclient" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why that? that would only be needed if a new shared library would be installed (which hydra does not have).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for "libfreerdp3.so.3" which is loaded as a shared library, not sure why this is the case for v3 and not for v2. This is the error I get when ldconfig is not done:
/usr/local/bin/hydra: error while loading shared libraries: libfreerdp3.so.3: cannot open shared object file: No such file or directory