Full Code of vanhauser-thc/thc-hydra for AI

master bf7c6cf725b1 cached
129 files
2.4 MB
628.9k tokens
524 symbols
1 requests
Download .txt
Showing preview only (2,514K chars total). Download the full file or copy to clipboard to get everything.
Repository: vanhauser-thc/thc-hydra
Branch: master
Commit: bf7c6cf725b1
Files: 129
Total size: 2.4 MB

Directory structure:
gitextract_b5cyuhwz/

├── .clang-format
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── workflows/
│       └── release.yml
├── .gitignore
├── .travis.yml
├── Android.mk
├── CHANGES
├── CITATION.cff
├── Dockerfile
├── INSTALL
├── LICENSE
├── LICENSE_OPENSSL
├── Makefile.am
├── Makefile.orig
├── Makefile.unix
├── PROBLEMS
├── README
├── TODO
├── _config.yml
├── bfg.c
├── bfg.h
├── configure
├── crc32.c
├── crc32.h
├── d3des.c
├── d3des.h
├── dpl4hydra.sh
├── dpl4hydra_full.csv
├── dpl4hydra_local.csv
├── hmacmd5.c
├── hmacmd5.h
├── hydra-adam6500.c
├── hydra-afp.c
├── hydra-asterisk.c
├── hydra-cisco-enable.c
├── hydra-cisco.c
├── hydra-cobaltstrike.c
├── hydra-cvs.c
├── hydra-firebird.c
├── hydra-ftp.c
├── hydra-gtk/
│   ├── AUTHORS
│   ├── COPYING
│   ├── ChangeLog
│   ├── Makefile.am
│   ├── NEWS
│   ├── README
│   ├── README-autoconf
│   ├── autogen.sh
│   ├── configure.ac
│   ├── make_xhydra.sh
│   ├── src/
│   │   ├── Makefile.am
│   │   ├── callbacks.c
│   │   ├── callbacks.h
│   │   ├── interface.c
│   │   ├── interface.h
│   │   ├── main.c
│   │   ├── support.c
│   │   └── support.h
│   ├── xhydra.glade
│   └── xhydra.gladep
├── hydra-http-form.c
├── hydra-http-proxy-urlenum.c
├── hydra-http-proxy.c
├── hydra-http.c
├── hydra-http.h
├── hydra-icq.c
├── hydra-imap.c
├── hydra-irc.c
├── hydra-ldap.c
├── hydra-logo.rc
├── hydra-memcached.c
├── hydra-mod.c
├── hydra-mod.h
├── hydra-mongodb.c
├── hydra-mssql.c
├── hydra-mysql.c
├── hydra-ncp.c
├── hydra-nntp.c
├── hydra-oracle-listener.c
├── hydra-oracle-sid.c
├── hydra-oracle.c
├── hydra-pcanywhere.c
├── hydra-pcnfs.c
├── hydra-pop3.c
├── hydra-postgres.c
├── hydra-radmin2.c
├── hydra-rdp.c
├── hydra-redis.c
├── hydra-rexec.c
├── hydra-rlogin.c
├── hydra-rpcap.c
├── hydra-rsh.c
├── hydra-rtsp.c
├── hydra-s7-300.c
├── hydra-sapr3.c
├── hydra-sip.c
├── hydra-smb.c
├── hydra-smb2.c
├── hydra-smtp-enum.c
├── hydra-smtp.c
├── hydra-snmp.c
├── hydra-socks5.c
├── hydra-ssh.c
├── hydra-sshkey.c
├── hydra-svn.c
├── hydra-teamspeak.c
├── hydra-telnet.c
├── hydra-telnet.h
├── hydra-time.c
├── hydra-vmauthd.c
├── hydra-vnc.c
├── hydra-wizard.sh
├── hydra-xmpp.c
├── hydra.1
├── hydra.c
├── hydra.h
├── libpq-fe.h
├── ntlm.c
├── ntlm.h
├── performance.h
├── postgres_ext.h
├── pw-inspector-logo.rc
├── pw-inspector.1
├── pw-inspector.c
├── sasl.c
├── sasl.h
├── xhydra.1
└── xhydra.desktop

================================================
FILE CONTENTS
================================================

================================================
FILE: .clang-format
================================================
---
Language:        Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands:   true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:   
  AfterClass:      false
  AfterControlStatement: false
  AfterEnum:       false
  AfterFunction:   false
  AfterNamespace:  false
  AfterObjCDeclaration: false
  AfterStruct:     false
  AfterUnion:      false
  AfterExternBlock: false
  BeforeCatch:     false
  BeforeElse:      false
  IndentBraces:    false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit:     512
CommentPragmas:  '^ IWYU pragma:'
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat:   false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:   
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IncludeBlocks:   Preserve
IncludeCategories: 
  - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
    Priority:        2
  - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
    Priority:        3
  - Regex:           '.*'
    Priority:        1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth:     2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments:  true
SortIncludes:    true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard:        Cpp11
TabWidth:        2
UseTab:          Never
...



================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**IMPORTANT**
This is just for reporting *BUGS* not help on how to hack, how to use hydra, command line options or how to get it compiled. Please search for help via search engines. Issues asking for this here will be closed.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
  * Ensure that you have tested the bug to be present in the current github code. You might be using an outdated version that comes with your Linux distribution!
  * You must provide full command line options.

Steps to reproduce the behavior:
1. ...
2. ...
3. ...

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
Note that all messages must be in *English*, not in Chinese, Russian, etc.

**Desktop (please complete the following information):**
 - OS: [e.g. Ubuntu 20.04]
 - hydra version [e.g. current github state]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**IMPORTANT**
Please note that hydra is still maintained however not actively developed. If you would like to see specific feature here it it recommended implement it yourself and send a pull request - or look for someone to do that for you :-)

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/workflows/release.yml
================================================
name: release

on:
  push:
    branches: [master, main]
    tags-ignore: ['**']
    paths-ignore: [README, TODO, PROBLEMS]
  pull_request:
    paths-ignore: [README, TODO, PROBLEMS]

jobs:
  docker-image:
    name: Build the docker image
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3

      - uses: docker/setup-qemu-action@v2

      - uses: docker/setup-buildx-action@v2

      - uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - uses: gacts/github-slug@v1 # Action page: <https://github.com/gacts/github-slug>
        id: slug

      - uses: docker/build-push-action@v3 # Action page: <https://github.com/docker/build-push-action>
        with:
          context: .
          file: Dockerfile
          push: true
          platforms: linux/amd64, linux/arm64
#         ,linux/arm/v6, linux/arm/v7
          tags: vanhauser/hydra:latest
        


================================================
FILE: .gitignore
================================================
*~
*.o
Makefile
Makefile.in
hydra
hydra.exe
hydra.restore
xhydra
xhydra.exe
hydra-gtk/INSTALL
hydra-gtk/Makefile.in
hydra-gtk/aclocal.m4
hydra-gtk/autom4te.cache/
hydra-gtk/compile
hydra-gtk/config.h
hydra-gtk/config.h.in
hydra-gtk/config.log
hydra-gtk/config.status
hydra-gtk/configure
hydra-gtk/depcomp
hydra-gtk/errors
hydra-gtk/install-sh
hydra-gtk/missing
hydra-gtk/mkinstalldirs
hydra-gtk/src/.deps/
hydra-gtk/stamp-h.in
hydra-gtk/stamp-h1
pw-inspector
pw-inspector.exe


================================================
FILE: .travis.yml
================================================
language: c
sudo: required
dist: trusty
os:
  - linux
  - osx
arch:
  - amd64
  - ppc64le
compiler:
  - clang
  - gcc
matrix:
before_install:
  - if [ "$TRAVIS_OS_NAME" == "osx" ];then brew install libgcrypt; fi
before_script:
  ./configure
script:
  - make


================================================
FILE: Android.mk
================================================
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_CFLAGS:= -O3 -DLIBOPENSSL -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE \
               -DLIBNCP -DLIBPOSTGRES -DLIBSVN -DLIBSSH -DNO_RINDEX \
               -DHAVE_MATH_H -DOPENSSL_NO_DEPRECATED -DNO_RSA_LEGACY \
               -fdata-sections -ffunction-sections          

LOCAL_LDFLAGS:=-Wl,--gc-sections

LOCAL_C_INCLUDES:= \
	$(LOCAL_PATH)\
	external/openssl/include\
	external/libssh/include\
	external/libidn/lib\
	external/subversion/subversion/include\
	external/apr/include\
	external/libncp/include\
	external/libpcre
	
LOCAL_SRC_FILES:= \
	bfg.c\
	crc32.c\
	d3des.c\
	hmacmd5.c\
	hydra-afp.c\
	hydra-asterisk.c\
	hydra.c\
	hydra-cisco.c\
	hydra-cisco-enable.c\
	hydra-cvs.c\
	hydra-firebird.c\
	hydra-ftp.c\
	hydra-http.c\
	hydra-http-form.c\
	hydra-http-proxy.c\
	hydra-http-proxy-urlenum.c\
	hydra-icq.c\
	hydra-imap.c\
	hydra-irc.c\
	hydra-ldap.c\
	hydra-mod.c\
	hydra-memcached.c\
	hydra-mongodb.c\
	hydra-mssql.c\
	hydra-mysql.c\
	hydra-ncp.c\
	hydra-nntp.c\
	hydra-oracle.c\
	hydra-oracle-listener.c\
	hydra-oracle-sid.c\
	hydra-pcanywhere.c\
	hydra-pcnfs.c\
	hydra-pop3.c\
	hydra-postgres.c\
	hydra-rdp.c\
	hydra-redis.c\
	hydra-rexec.c\
	hydra-rlogin.c\
	hydra-rsh.c\
	hydra-rtsp.c\
	hydra-s7-300.c\
	hydra-sapr3.c\
	hydra-sip.c\
	hydra-smb.c\
	hydra-smtp.c\
	hydra-smtp-enum.c\
	hydra-snmp.c\
	hydra-socks5.c\
	hydra-ssh.c\
	hydra-sshkey.c\
	hydra-svn.c\
	hydra-teamspeak.c\
	hydra-telnet.c\
	hydra-vmauthd.c\
	hydra-vnc.c\
	hydra-xmpp.c\
	ntlm.c\
	sasl.c

LOCAL_STATIC_LIBRARIES := \
	libidn \
	libncp \
	libpcre \
	libpcrecpp \
	libpcreposix \
	libpq \
	libssh \
	libsvn_client-1 \
	libapr-1 \
	libaprutil-1 \
	libiconv\
	libneon\
	libssl_static\
	libcrypto_static\
	libmemcached
						
LOCAL_SHARED_LIBRARIES := \
	libsqlite\
	libexpat
					
LOCAL_MODULE:= hydra

include $(BUILD_EXECUTABLE)


================================================
FILE: CHANGES
================================================
Changelog for hydra
-------------------

Release 9.7-dev
* GTK3 support for xhydra by elboulangero
* mongo v2 support (thanks to devjunix)

Release 9.6
* freerdp v2 -> v3
* compile fixes (eg. gcc-15)
* pop3 capability fix
* mysql library upgrade
* http-form fixes
* postgres custom port support
* smb better expired support
* ssh legacy cipher support
* http 403 support
! Thanks for all the pull requests!

Release 9.5
* many modules did not support -W (all those that used a library for the
  connection). All (or most?) should be fixed now.
* http-form:
  - The help for http-form was wrong. the condition variable must always be
    the *last* parameter, not the third
  - Proxy support was not working correctly
* smb2: fix for updated libsmb2 which resulted in correct guessing attempts
  not being detected
* smtp: break early if the server does not allow authentication
* rdp: detect more return codes that say a user is disabled etc.


Release 9.4
* Switched from pcre/pcre3 to pcre2 as pcre/pcre3 will be dropped from Debian
* Small fix for weird RTSP servers
* Added "2=" optional parameter to http-post-form module to tell hydra that
  a "302" HTTP return code means success
* replaced wait3 with waitpid for better compatability


Release 9.3
* support Xcode compilation
* new module: cobaltstrike by ultimaiiii, thank you!
* fix for ssh to support -M or ip/range
* fix for rdp to detect empty passwords
* fix for http-form to no send empty headers
* fix for http on non-default ports when using with a proxy
* for vnc/cisco/... protocols that only check for a password, skip host
  after the password is found
* fix to support IPv6 addresses in -M
* fix to test all entries in -C files, not exiting after the first found
* make disappearing targets faster to terminate on
* added "make uninstall"


Release 9.2
* fix for http-post-form optional parameters
* enable gcc 10 support for xhydra too :)
* msys support
* removed rain mode (-r) because of inefficiency
* IPv6 support for Host: header for http based modules


Release 9.1
* rdb: support for libfreerdp3 (thanks to animetauren)
* new module: smb2 which also supports smb3 (uses libsmbclient-dev) (thanks to Karim Kanso for the module!)
* oracle: added success condition (thanks to kazkansouh), compile on Cygwin (thanks to maaaaz)
* rtsp: fixed crash in MD5 auth
* svn: updated to support past and new API
* http: now supports F=/S= string matching conditions (thanks to poucz@github)
* http-proxy: buffer fix, 404 success condition (thanks to kazkansouh)
* mysql: changed not to use mysql db as a default. if the user has not access to this db auth fails ...
* sasl: buffer fix (thanks to TenGbps)
* fixed help for https modules (thanks to Jab2870)
* added -K command line switch to disable redo attempts (good for mass scanning)
* forgot to have the -m option in the hydra help output
* gcc-10 support and various cleanups by Jeroen Roovers, thanks!
* added .clang-format and formatted all code


Release 9.0
* rdp: Revamped rdp module to use FreeRDP library (thanks to loianhtuan@github for the patch!)
* Added memcached module
* Added mongodb module
* http: http module now supports a= option to select http authentication type
* JSON output does now truncate the file if exists.
* Fixed svn module memory leaks
* Fixed rtsp module potential buffer overflow
* Fixed http module DIGEST-MD5 mode


Release 8.9.1
* Clarification for rdp error message
* CIDR notation (hydra -l test -p test 192.168.0.0/24 ftp) was not detected, fixed


Release 8.8
* New web page: https://github.com/vanhauser-thc/thc-hydra
* added PROBLEMS file with known issues
* rdp: disabled the module as it does not support the current protocol. If you want to add it contact me
* ldap: fixed a dumb strlen on a potential null pointer
* http-get/http-post:
   - now supports H=/h= parameters same as http-form (thanks to mathewmarcus@github for the patch)
   - 403/404 errors are now always registered as failed attempts
* mysql module: a non-default port was not working, fixed
* added -w timeout support to ssh module
* fixed various memory leaks in http-form module
* corrected hydra return code to be 0 on success
* added patch from debian maintainers which fixes spellings
* fixed weird crash on x64 systems
* many warning fixes by crondaemon


Release 8.6
* added radmin2 module by catatonic prime - great work!
* smb module now checks if SMBv1 is supported by the server and if signing is required
* http-form module now supports URLs up to 6000 bytes (thanks to petrock6@github for the patch)
* Fix for SSL connections that failed with error:00000000:lib(0):func(0):reason(0) (thanks gaia@github for reporting)
* Added new command line option:
   -c TIME: seconds between login attempts (over all threads, so -t 1 is recommended)
* Options put after -R (for loading a restore file) are now honored (and were disallowed before)
* merged several patches by Diadlo@github to make the code easier readable. thanks for that!
* merged a patch by Diadlo@github that moves the help output to the invididual module


Release 8.5
* New command line option:
   -b : format option for -o output file (json only so far, happy for patches supporting others :) ) - thanks to veggiespam for the patch
* ./configure now honors the CC enviroment variable if present
* Fix for the restore file crash on some x64 platforms (finally! thanks to lukas227!)
* Changed the format of the restore file to detect cross platform copies
* Fixed a bug in the NCP module
* Favor strrchr() over rindex()
* Added refactoring patch by diadlo
* Updated man page with missing command line options


Release 8.4
! Reports came in that the rdp module is not working reliable sometimes, most likely against new Windows versions. please test, report and if possible send a fix
* Proxy support re-implemented:
  - HYDRA_PROXY[_HTTP] environment can be a text file with up to 64 entries
  - HYDRA_PROXY_AUTH was deprecated, set login/password in HTTP_PROXY[_HTTP]
* New protocol: adam6500 - this one is work in progress, please test and report
* New protocol: rpcap - thanks to Petar Kaleychev <petar.kaleychev@gmail.com>
* New command line options:
   -y : disables -x 1aA interpretation, thanks to crondaemon for the patch
   -I : ignore an existing hydra.restore file (don't wait for 10 seconds)
* hydra-svn: works now with the current libsvn version
* hydra-ssh: initial check for password auth support now uses login supplied
* Fixed dpl4hydra to be able to update from the web again
* Fixed crash when -U was used without any service (thanks to thecarterb for reporting)
* Updated default password lists
* The protocols vnc, xmpp, telnet, imap, nntp and pcanywhere got accidentially long sleep commands due a patch in 8.2, fixed
* Added special error message for clueless users :)


Release 8.3
* Support for upcoming OpenSSL 1.1 added. needs testing.
* Fixed hydra redo bug (issue #113)
* Updated xhydra for new hydra features and options
* Some more command line error checking
* Ensured unneeded sockets are closed

Release 8.2
* Added RTSP module, thanks to jjavi89 for supplying!
* Added patch for ssh that fixes hydra stopping to connect, thanks to ShantonRU for the patch
* Added new -O option to hydra to support SSL servers that do not suport TLS
* Added xhydra gtk patche by Petar Kaleychev to support modules that do not use usernames
* Added patch to redis for initial service checking by Petar Kaleychev - thanks a lot!
* Added support in hydra-http for http-post (content length 0)
* Fixed important bug in http-*://server/url command line processing
* Added SSL SNI support
* Fixed bug in HTTP Form redirection following - thanks for everyone who reported and especially to Hayden Young for setting up a test page for debugging
* Better library finding in ./configure for SVN + support for Darwin Homebrew (and further enhanced)
* Fixed http-form module crash that only occurs on *BSD/OSX systems. Thanks to zdk for reporting!
* Fixed for SSL connection to support TLSv1.2 etc.
* Support for different RSA keylengths, thanks to fann95 for the patch
* Fixed a bug where the cisco-enable module was not working with the password-only logon mode
* Fixed an out of memory bug in http-form
* Fixed imap PLAIN method
* Fixed -x option to bail if it would generate too many passwords (more than 4 billion)
* Added warning if HYDRA_PROXY_CONNECT environment is detected, that is an outdated setting
* Added --fhs switch to configure (for Linux distribution usage)
* ... your patch?


Release 8.1
* David Maciejak, my co-maintainer moved to a different job and country and can not help with Hydra anymore - sadly! Wish you all the best!
* Added patch from Ander Juaristi which adds h/H header options for http-form-*, great work, thanks!
* Fixed the -M option, works now with many many targets :-)
* -M option now supports ports, add a colon in between: "host:port", or, if IPv6, "[ipv6ipaddress]:port"
* Found login:password combinations are now printed with the name specified (hostname or IP), not always IP
* Fixed for cisco-enable if an intial Login/Password is used (thanks to joswr1te for reporting)
* Added patch by tux-mind for better MySQL compilation and an Android patches and Makefile. Thanks!
* Added xhydra gtk patches by Petar Kaleychev to support -h, -U, -f, -F, -q and -e r options, thanks!
* Added patch for teamspeak to better identify server errors and auth failures (thanks to Petar Kaleychev)
* Fixed a crash in the cisco module (thanks to Anatoly Mamaev for reporting)
* Small fix for HTTP form module for redirect pages where a S= string match would not work (thanks to mkosmach for reporting)
* Updated configure to detect subversion packages on current Cygwin
* Fixed RDP module to support the port option (thanks to and.enshin(at)gmail.com)


Release 8.0
! Development moved to a public github repository: https://github.com/vanhauser-thc/thc-hydra
* Added module for redis (submitted by Alejandro Ramos, thanks!)
* Added patch which adds Unicode support for the SMB module (thanks to Max Kosmach)
* Added initial interactive password authentication test for ssh (thanks to Joshua Houghton)
* Added patch for xhydra that adds bruteforce generator to the GUI (thanks to Petar Kaleychev)
* Target on the command line can now be a CIDR definition, e.g. 192.168.0.0/24
* with -M <targetfile>, you can now specify a port for each entry (use "target:port" per line)
* Verified that hydra compiles cleanly on QNX / Blackberry 10 :-)
* Bugfixes for -x option:
  - password tries were lost when connection errors happened (thanks to Vineet Kumar for reporting)
  - fixed crash when used together with -e option 
* Fixed a bug that hydra would not compile without libssh (introduced in v7.6)
* Various bugfixes if many targets where attacked in parallel
* Cygwin's Postgresql is working again, hence configure detection re-enabled
* Added gcc compilation security options (if detected to be supported by configure script)
* Enhancements to the secure compilation options
* Checked code with cppcheck and fixed some minor issues.
* Checked code with Coverity. Fixed a lot of small and medium issues.


Release 7.6
* Added a wizard script for hydra based on a script by Shivang Desai <shivang.ice.2010@gmail.com>
* Added module for Siemens S7-300 (submitted by Alexander Timorin and Sergey Gordeychik, thanks!)
* HTTP HEAD/GET: MD5 digest auth was not working, fixed (thanks to Paul Kenyon)
* SMTP Enum: HELO is now always sent, better 500 error detection
* hydra main:
   - fixed a bug in the IPv6 address parsing when a port was supplied
   - added info message for pop3, imap and smtp protocol usage
* hydra GTK: missed some services, added
* dpl4hydra.sh:
   - added Siemens S7-300 common passwords to default password list
   - more broad searching in the list
* Performed code indention on all C files :-)
* Makefile patch to ensure .../etc directory is there (thanks to vonnyfly)


Release 7.5
* Moved the license from GPLv3 to AGPLv3 (see LICENSE file)
* Added module for Asterisk Call Manager
* Added support for Android where some functions are not available
* hydra main:
   - reduced the screen output if run without -h, full screen with -h
   - fix for IPv6 and port parsing with service://[ipv6address]:port/OPTIONS
   - fixed -o output (thanks to www417)
   - warning if HYDRA_PROXY is defined but the module does not use it
   - fixed an issue with large input files and long entries
* hydra library:
   - SSL connections are now fixed to SSLv3 as some SSL servers fail otherwise, report if this gives you problems
   - removed support for old OPENSSL libraries
* HTTP Form module:
   - login and password values are now encoded if special characters are present
   - ^USER^ and ^PASS^ are now also supported in H= header values
   - if you the colon as a value in your option string, you can now escape it with \: - but do not encode a \ with \\
* Mysql module: protocol 10 is now supported
* SMTP, POP3, IMAP modules: Disabled the TLS in default. TLS must now be
  defined as an option "TLS" if required. This increases performance.
* Cisco module: fixed a small bug (thanks to Vitaly McLain)
* Postgres module: libraries on Cygwin are buggy at the moment, module is therefore
  disabled on Cygwin


Release 7.4.3 FIX RELEASES for bugs introduced in 7.4
* Quickfix for people who do not have libssh installed (won't compile otherwise)
* Quickfix for http-get/http-head and irc module which would not run due a new feature.
* Fix for the ssh module that breaks an endless loop if a service becomes unavailable (thanks to shark0der(at)gmail(dot)com for reporting)


Release 7.4
* New module: SSHKEY - for testing for ssh private keys (thanks to deadbyte(at)toucan-system(dot)com!)
* Added support for win8 and win2012 server to the RDP module
* Better target distribution if -M is used
* Added colored output (needs libcurses)
* Better library detection for current Cygwin and OS X
* Fixed the -W option
* Fixed a bug when the -e option was used without -u, -l, -L or -C, only half of the logins were tested
* Fixed HTTP Form module false positive when no answer was received from the server 
* Fixed SMB module return code for invalid hours logon and LM auth disabled
* Fixed http-{get|post-form} from xhydra
* Added OS/390 mainframe 64bit support (thanks to dan(at)danny(dot)cz)
* Added limits to input files for -L, -P, -C and -M - people were using unhealthy large files! ;-)
* Added debug mode option to usage (thanks to Anold Black)


Release 7.3
* Hydra main:
    - Added -F switch to quit all targets if one pair was found (for -M)
    - Fixed a bug where hydra would terminate after reporting a successful
      login when an account would accept any password
    - Fixed a bug with very large wordlists (thanks to sheepdestroyer for reporting!)
    - Enhanced the module help
* configure script:
    - Added fix Oracle library inclusion, thanks to Brandon Archer!
    - Added --nostrip option to prevent binary stripping (requested by Fedora
      maintainer)
* Added a Makefile patch by the Debian maintainers to support their
  SecurityHardeningBuildFlags for the wheezy build as requested
* dpl4hydra: added install directory support
* All code: message cleanups
* SNMP module
    - originally already supported write and v2 although this was not in the
      module help output. Added :-)
    - added SNMPv3 MD5/SHA1 authentication support, though beta still
* HTTP module:
    - fixed HTTP NTLM auth session
    - implemented errata fix for HTTP digest md5-sess algorithm
    - set default path to /
* HTTP Form module:
    - set default path to /
    - support HTTP/1.0 redirects
    - fix failed condition check when pcre is not used
* IMAP module: fixed auth detection
* POP3 module: Updated auth and capability detection
* Oracle module: fixed bad handling
* Oracle listener module: fixed hash size handling
* Telnet/Cisco/Cisco-enable modules: support "press ENTER" prompts
* FTP module:
    - Fixed a bug where 530 messages were incorrectly handled
    - Clarification for the usage of ftps
* Mysql module: added patch from Redhat/Fedora that fixes compile problems
* Added IDN and PCRE support for Cygwin


Release 7.2
* Speed-up http modules auth mechanism detection
* Fixed -C colonfile mode when empty login/passwords were used (thanks to
  will(at)configitnow(dot)com for reporting)
* The -f switch was not working for postgres, afp, socks5, firebird and ncp,
  thanks to Richard Whitcroft for reporting!
* Fixed NTLM auth in http-proxy/http-proxy-url module
* Fixed URL when being redirected in http-form module, thanks to gash(at)chaostreff(dot)at
* Fix MSSQL success login condition, thanks to whistle_master(at)live(dot)com
* Fix http form module: optional headers and 3xx status redirect, thx to Gash
* Fix in configure script for --prefix option, thanks to dazzlepod
* Update of the dpl4hydra script by Roland Kessler, thanks!
* Small fix for hydra man page, thanks to brad(at)comstyle(dot)com


Release 7.1
* Added HTTP Proxy URL enumeration module
* Added SOCKS4/SOCKS5 proxy support with authentication
* Added IPv6 support for SOCKS5 module
* Added -e r option to try the reversed login as password
* Rewrote -x functionality as the code caused too much trouble (thanks to
  murder.net7(at)gmail.com for reporting one of the issues)
* Fixed a bug with multiple hosts (-M) and http modules against targets that
  are virtual servers. Well spotted by Tyler Krpata!
* Fixed SVN IPv6 support and updated deprecated calls
* Fixed RDP failed child connection returned value and false positive issues
  reported by Wangchaohui, thanks!
* Fixed restore file functionality, was not working together with -o option
* Fix in http-form module for bug introduced in 7.0
* Fixed xhydra specific parameter value for http-proxy module
* minor enhancements


Release 7.0
* New main engine for hydra: better performance, flexibility and stability
* New option -u - loop around users, not passwords
* Option -e now also works with -x and -C
* Added RDP module, domain can be passed as argument
* Added other_domain option to smb module to test trusted domains
* Small enhancement for http and http-proxy module for standard ignoring servers
* Lots of bugfixes, especially with many tasks, multiple targets and restore file
* Fixes for a few http-form issues
* Fix smb module NTLM hash use
* Fixed Firebird module deprecated API call
* Fixed for dpl4hydra to work on old sed implementations (OS/X ...)
* Fixed makefile to install dpl4hydra (thx @sitecrea)
* Fixed local buffer overflow in debug output function (required -d to be used)
* Fixed xhydra running warnings and correct quit action event


Release 6.5
* Improved HTTP form module: getting cookie, fail or success condition, follow
  multiple redirections, support cookie gathering URL, multiple user defined
  headers
* Added interface support for IPv6, needed for connecting to link local fe80::
  addresses. Works only on Linux and OS/X. Information for Solaris and *BSD welcome
* Added -W waittime between connects option
* The -x bruteforce mode now allows for generated password amounts > 2 billion
* Fix if -L was used together with -x
* Fixes for http- modules when the http-...://target/options format was used
* Fixed a bug in the restore file write function that could lead to a crash
* Fixed XMPP module jabber init request and challenge response check,  thx "F e L o R e T"
* Fix: if a proxy was used, unresolveable targets were disabled. now its fine
* Fix for service://host/ usage if a colon was used after the URI without a
  port defined
 

Release 6.4
* Update SIP module to extract and use external IP addr return from server error to bypass NAT
* Update SIP module to use SASL lib
* Update email modules to check clear mode when TLS mode failed
* Update Oracle Listener module to work with Oracle DB 9.2
* Update LDAP module to support Windows 2008 active directory simple auth
* Fix to the connection adaptation engine which would loose planned attempts
* Fix make script for CentOS, reported by ya0wei
* Print error when a service limits connections and few pairs have to be tested
* Improved Mysql module to only init/close when needed
* Added patch from the FreeBSD maintainers
* Module usage help does not need a target to be specified anymore
* Configure script now honors /etc/ld.so.conf.d/ directory
* Add more SMB dialects


Release 6.3
* Added patch by Petar Kaleychev which adds nice icons to cygwin hydra files
* Added patch by Gauillaume Rousse which fixes a warning display
* New Oracle module (for databases via OCI, for TNS Listener passwd, for SID enumeration)
* New SMTP user enum module (using VRFY, EXPN or RCPT command)
* Memory leak fix for -x bruteforcing option reported by Alex Lau
* Fix for svn module, for some versions it needs one more lib, thanks to the
  Debian team for reporting!
* Fix ssh module, on connection refused a credential could be lost 
* Fix http-form module, a redirect was not always followed
* QA on all modules for memory leaks
* Better gtk detection (to not even try xhydra compilation when its useless)
* First blant attempt for configuring to x64 systems (Linux and *BSD)
* Updated network password cracker comparison on the web page (for hydra and new ncrack)
* Indented all source code


Release 6.2
* Added a patch by Jan Dlabal which adds password generation bruteforcing (no more password files :-) )
* Forgot to rename ssh2 to ssh in xhydra, fixed
* Add support for CRAM-MD5 and DIGEST-MD5 auth to ldap module
* Fix SASL PLAIN auth method issue
* Add TLS negotiation support for smtp-auth, pop3, imap, ftp and ldap
* Added man pages from Debian maintainers
* Checked Teamspeak module, works on TS2 protocol
* Add support for SCRAM-SHA1 (RFC 5802), first auth cracker to support it, yeah !
* New module: XMPP with TLS negotiation and LOGIN, PLAIN, CRAM-MD5, DIGEST-MD5, SCRAM-SHA1 support
* Add SCRAM-SHA1 auth to IMAP module
* Add module usage help (-U)
* Add support for RFC 4013: Internationalized Strings in SASL ("SASLPrep") 
* Rename smtpauth module to smtp
* Add SASL + TLS support for NNTP
* Bugfix SASL DIGEST-MD5, response could be wrong sometime, mainly on 64bits systems
* Bugfix rlogin module, some auth failure could not be detected accurately
* Bugfix rsh module, some auth failure could not be detected accurately
* New module: IRC is not dead ! use to find general server password and /oper credential
* Add SSL support for VMware Authentication Daemon module
* Bugfix CVS module, should work now, why does nobody report this ??
* Bugfix Telnet module, when line mode is not available
* Add support for new syntax <service-name>://<target>[:<port-number>][/<parameters>]
* Add TLS support for SIP
* STILL OPEN: Fixed a problem in hydra where a login+pw test was lost when an arm/child was quitting


Release 6.1
* More license updates for the files for the Debian guys
* Fix for the configure script to correctly detect postgresql
* Add checks for libssh v0.4 and support for ssh v1
* Merge all latest crypto code in sasl files
* Fix SVN compilation issue on openSUSE (tested with v11.3)


Release 6.0
* Added GPL exception clause to license to allow linking to OpenSSL - Debian people need this
* IPv6 support finally added. Note: sip and socks5 modules do not support IPv6 yet
* Changes to code and configure script to ensure clean compile on Solaris 11,
  OSX, FreeBSD 8.1, Cygwin and Linux
* Bugfix for SIP module, thanks to yori(at)counterhackchallenges(dot)com
* Compile fixes for systems without OpenSSL or old OpenSSL installations
* Eliminated compile time warnings
* xhydra updates to support the new features (david@)
* Added CRAM-MD5, DIGEST-MD5 auth mechanism to the smtp-auth module (david@)
* Added LOGIN, PLAIN, CRAM-(MD5,SHA1,SHA256) and DIGEST-MD5 auth mechanisms to the imap and pop3 modules (david@)
* Added APOP auth to POP3 module (david@)
* Added NTLM and DIGEST-MD5 to http-auth module and DIGEST-MD5 to http-proxy module (david@)
* Fixed VNC module for None and VLC auth (david@)
* Fixes for LDAP module (david@)
* Bugfix Telnet module linemode option negotiation using win7 (david@)
* Bugfix SSH module when max auth connection is reached (david@)


Release 5.9
* Update for the subversion module for newer SVN versions (thanks to David Maciejak @ GMAIL dot com)
* Another patch by David to add the PLAIN auth mechanism to the smtp-auth module
* mysql module now has two implementations and uses a library when found (again
  thanks to David Maciejak @ GMAIL dot com - what would hydra be without him)
* camiloculpian @ gmail dot com submitted a logo for hydra - looks cool, thanks!
* better FTP 530 error code detection
* bugfix for the SVN module for non-standard ports (again david@)


Release 5.8
* Added Apple Filing Protocol (thank to "never tired" David Maciejak @ GMAIL dot com)
* Fixed a big bug in the SSL option (-S)


Release 5.7 
* Added ncp support plus minor fixes (by David Maciejak @ GMAIL dot com)
* Added an old patch to fix a memory from SSL and speed it up too from kan(at)dcit.cz
* Removed unnecessary compiler warnings
* Enhanced the SSH2 module based on an old patch from aris(at)0xbadc0de.be
* Fixed small local defined overflow in the teamspeak module. Does it still work anyway??


Release 5.6  PRIVATE VERSION
###########
* Moved to GPLv3 License (lots of people wanted that)
* Upgraded ssh2 module to libssh-0.4.x (thanks to aris (at) 0xbadc0de.be for
  the 0.2 basis)
* Added firebird support (by David Maciejak @ GMAIL dot com)
* Added SIP MD5 auth patch (by Jean-Baptiste Aviat <jba [at] hsc [dot] `french tld`)
* Removed Palm and ARM support
* Fix for cygwin which falsely detected postgres library when there was none.
* Several small bugfixes


Release 5.4
###########
* Fixes to the http modules as some Apache installations are picky
* The MySQL module also works with mysqld-5.0, updated
* Added AS/400 return code checks to pop3 module
* Fixed memory leaks in the http-form module.
* Implemented a proposal by Jean-Baptiste.BEAUFRETON (at) turbomeca.fr to
  check for "530 user unknown" message in the ftp module
* Added a performance patch by alejandro.mendiondo (at) baicom.com. This one
  needs stability testing!
* Beautification to remove compiler warnings of modern gcc


Release 5.3
###########
* Added NTLM support modules for pop3, imap, smtp-auth and http-proxy.
  Work done by ilo (at) reversing.org. THANKS!
* Added a http form module, thanks to phil (at) irmplc.com
* Fixed a bug in the vnc module (thanks to kan (at) dcit.cz)
* Input files may *not* contain null bytes. I might fix that in the future
  but currently I have enough other things on my todo sheet.
  Thanks to didiln (at) gmail.com for reporting.


Release 5.2
###########
* Again again some fixes for the ssh2 module. This is the last try. If it
  finally does not work reliable, I am throwing out that library!
  Thanks to bykhe@mymail.ch for the patch
* Added a new module: VMWare-Auth! Thanks to david.maciejak@gmail.com!


Release 5.1
###########
* Again some fixed for the ssh2 module. Sorry. And still it might not work
  in all occasions. The libssh is not as mature as we all wish it would be :-(
* HYDRA_PROXY_AUTH was never used ... weird that nobody reported that. fixed.
* Fixed bug in the base64 encoding function
* Added an md5.h include which is needed since openssl 0.9.8
* Added an enhacement to the FTP module, thanks to piotr_sobolewski@o2.pl
* Fixed a bug when not using passwords and just -e n/s


Release 5.0
###########
! THIS IS A THC - TAX - 10TH ANNIVERSARY RELEASE ! HAVE FUN !
* Increadible speed-up for most modules :-)
* Added module for PC-Anywhere, thanks to david.maciejak(at)kyxar.fr!
* Added module for SVN, thanks to david.maciejak(at)kyxar.fr!
* Added --disable-xhydra option to configure, thanks to david.maciejak(at)kyxar.fr!
  - he is becoming the top supporter :-)
* Added module for SIP (VoIP), thanks to gh0st(at)staatsfeind.org
* Added support for newer sap r/3 rfcsdk
* Added check to the telnet module to work with Cisco AAA
* Fix for the VNC module, thanks to xmag
* Small enhancement to the mysql plugin by pjohnson(at)bosconet.org


Release 4.7
###########
* Updated ssh2 support to libssh v0.11 - you *must* use this version if
  you want to use ssh2! download from http://www.0xbadc0de.be/?part=libssh
  This hopefully fixes problems on/against Sun machines.
  After fixing, I also received a patch from david maciejak - thanks :-)
* Added an attack module for rlogin and rsh, thanks to
  david.maciejak(at)kyxar.fr!
* Added an attack module for the postgres database, thanks to
  diaul(at)devilopers.org! (and again: david maciejak sent on in as well)
* JoMo-Kun sent in an update for his smbnt module. cool new features:
  win2k native mode, xp anonymous account detection, machine name as password
* Hopefully made VNC 3.7 protocol versions to work. please report.
* Switched http and https service module to http-head, http-get and
  https-get, https-head. Some web servers want HEAD, others only GET
* An initial password for cisco-enable is now not required anymore. Some
  people had console access without password, so this was necessary.
* Fixed a bug in xhydra which did not allow custom ports > 100
! Soon to come: v5.0 - some cool new features to arrive on your pentest
  machine!


Release 4.6
###########
* Snakebyte delivered a module for Teamspeak
* Snakebyte updated the rexec module for the Hydra Palm version
* Snakebyte updated xhydra to support the new Telnet success response option
* Clarified the Licence
* Updated the ldap module to support v3, note that "ldap" is now specified as
  "ldap2" or "ldap3". Added wrong version detection.


Release 4.5
###########
* The configure script now detects Cygwin automatically :-)
* The telnet module now handles the OPT special input. Specify the string
  which is displayed after successfully a login. Use this if you have false
  positives.
* Made smtp-auth module more flexible in EHLO/HELO handling
* Fixed some glitches in the SAP/R3 module (correct sysnr, better port
  handling) thanks to ngregoire@exaprobe.com !
* Fixed some glitches in the http/https module
* Fixed a big bug in snakebyte's snmp module 
* Warning msg is now displayed if the deprecated icq module is used
* Added warning message to the ssh2 module during compilation as many people
  use the newest libssh version which is broken.


Release 4.4
###########
* Fixed another floating point exception *sigh*
* Fixed -C colon mode
* Added EHLO support for the smtp-auth module, required for some smtpd


Release 4.3
###########
* Fixed a divide by zero bug in the status report function
* Added functionality for skipping accounts (cvs is so nice to report this)
* Snakebyte sent in a patch for cvs for skipping nonexisting accounts
* <lerrahn@syss.de> sent in a patch to fix proxy support for the HTTP module
  without proxy authentication


Release 4.2
###########
* Snakebyte sent in modules for SNMP and CVS - great work!
* Snakebyte also expanded the gtk gui to support the two new modules
* Justin <connectjunkie@gmail.com> sent in a module for smtp-auth ... thanks!
* master_up@post.cz sent in some few patches to fix small glitches
* Incorporated a check from the openbsd port


Release 4.1
###########
* Snakebyte wrote a very nice GTK GUI for hydra! enjoy!
* due a bug, sometimes hydra would kill process -1 ... baaaad boy!
* found passwords are now also printed to stdout if -o option is used
* <je@sekure.net> reported that hydra wouldn't complain on ssh2 option if
  compiled without support, fixed
* <llevier@argosnet.com> made an official port for FreeBSD and sent me a
  diff to exchange the MD4 of libdes to openssl
* <vh@helith.net> noticed that hydra will crash on big wordlists as
  the result of the mallocs there were not checked, fixed
* Snakebyte expanded his PalmOS Version of hydra to nntp and fixed vnc
* Increased the wait time for children from 5 to 15 seconds, as e.g.
  snakebyte reported detection problems
* Fixed some display glitches


Release v4.0
############
#
# This is a summary of changes of the D1 to D5 beta releases and shows
# what makes v4.0 different from 3.1.
# Have fun. Lots of it.
#
# By the way: I need someone to program a nice GTK frontend for hydra,
# would YOU like to do that and receive the fame? Send an email to vh@thc.org !
#
* For the first time there is not only a UNIX/source release but additionally:
   ! Windows release (cygwin compile with dll's)
   ! PalmPilot release
   ! ARM processor release (for all your Zaurus, iPaq etc. running Linux)
* There are new service attack modules:
   ! ms-sql
   ! sap r/3 (requires a library)
   ! ssh v2 (requires a library)
* Enhancements/Fixes to service attack modules:
   ! vnc module didnt work correctly, fixed
   ! mysql module supports newer versions now
   ! http module received a minor fix and has better virtual host support now
   ! http-proxy supports now an optional URL
   ! socks5 checks now for false positives and daemons without authentication
* The core code (hydra.c) was rewritten from scratch
   ! rewrote the internal distribution functions from scratch. code is now
     safer, less error prone, easier to read.
   ! multiple target support rewritten which now includes intelligent load
     balancing based on success, error and load rate
   ! intelligently detect maximum connect numbers for services (per server if
     multiple targets are used)
   ! intelligent restore file writing
   ! Faster (up to 15%)
   ! Full Cygwin and Cygwin IPv6 support
* added new tool: pw-inspector - it can be used to just try passwords which
  matches the target's password policy
#
# This should be more than enough! :-)
#

... the rest below is history ...

###########################################################################
#
# New Hydra v4.0 code branch
#
Release D5
* added patches by kan@dcit.cz which enhance the proxy module and provide
  a small fix for the http module
* small beautifcations to make the compiler happy
! This is the final beta version before public release
  - please test everything!

Release D4
* Tick made an update to his configure-arm
* snakebyte@gmx.de added imap, vnc and cisco module support to PalmPilot
* fixed VNC module
* enhanced mysql module to work also with 4.0.x (and all future protocol 10
  mysql protocol types)
* enhanced socks5 module to identify daemons which do not require
  authentication, and false positive check (otherwise dante would report all
  tries as successful)
* fixed a bug in configure for D3 which resulted in compile problems on
  several platforms requiring libcrypto

Release D3
* added sapr3 attack module (requires libsdk.a and saprfc.h)
* added ssh2 attack module (requires libssh)
* snakebyte@gmx.de added telnet module support for PalmPilot
* fixed the mssql module, should work now
* fixed -e option bug
* fixed -C option bug (didnt work at all!!)
* fixed double detection (with -e option) plus added simple dictionary
  double detection
* target port is now displayed on start

Release D2
* added better virtual host support to the www/http/https/ssl module
  (based on a patch from alla@scanit.be)
* added ARM support (does not work for libdes yet, ssl works), done by
  Tick <tick@thc.org>
* added Palm support (well, in reality it is more a rewrite which can use
  the hydra-modules), done by snakebyte <snakebyte@gmx.de>
* added ms-sql attack module (code based on perl script form HD Moore
  <hdm@digitaloffense.net>, thanks for contributing)

Release D1 (3 March 2003)
* rewrote the internal distribution functions from scratch. code is now
  safer, less error prone, easier to read.
* multiple target support rewritten which now includes intelligent load
  balancing based on success, error and load rate
* intelligently detect maximum connect numbers for services (per server if
  multiple targets are used)
* intelligent restore file writing
* Faster (up to 15%)
* Full Cygwin and Cygwin IPv6 support
* added new tool: pw-inspector - it can be used to just try passwords which
  matches the target's password policy

###########################################################################

v3.0 (FEBRUARY 2004)		PUBLIC RELEASE
* added a restore function to enable you to continue aborted/crashed
  sessions. Just type "hydra -R" to continue a session.
  NOTE: this does not work with the -M option! This feature is then disabled!
* added a module for http proxy authentication cracking ("http-proxy") :-)
* added HTTP and SSL/CONNECT proxy support. SSL/CONNECT proxy support works
  for *all* TCP protocols, you just need to find a proxy which allows you to
  CONNECT on port 23 ...
  The environment variable HYDRA_PROXY_HTTP defines the web proxy. The
  following syntax is valid: HYDRA_PROXY_HTTP="http://123.45.67.89:8080/"
  Same for HYDRA_PROXY_CONNECT.
  If you require authentication for the proxy, use the HYDRA_PROXY_AUTH
  environment variable:
    HYDRA_PROXY_AUTH="login:password"
* fixed parallel host scanning engine (thanks to m0j0.j0j0 for reporting)
* A status, speed and time to completion report is now printed every minute.
* finally updated the README

v2.9 (FEBRUARY 2004)		PRIVATE RELEASE
...

v2.8 (JANUARY 2004)		PRIVATE RELEASE
...

v2.7 (JANUARY 2004)		PUBLIC RELEASE
* small fix for the parallel host code (thanks to m0j0@foofus.net)

v2.6 (DECEMBER 2003)		PUBLIC RELEASE
* fixed a compiling problem for picky compilers.

v2.5 (NOVEMBER 2003)		PUBLIC RELEASE
* added a big patch from m0j0@foofus.net which adds:
    - AAA authentication to the cisco-enable module
    - Running the attacks on hosts in parallel
    - new smbnt module, which uses lanman hashes for authentication, needs libdes
  ! great work and thanks !
* changed code to compile easily on FreeBSD
* changed configure to compile easily on MacOS X - Panther (cool OS btw ...)

v2.4 (AUGUST 2003)		PUBLIC RELEASE
* public release
=== 2.3 stuff===
* added mysql module (thanks to mcbethh@u-n-f.com)
* small fix in vnc (thanks to the Nessus team)
* added credits for vnc-module (FX/Phenolite)
* new ./configure script for better Solaris and *BSD support (copied from amap)
* updated to new email/www addresses => www.thc.org

v2.2 (OCTOBER 2002)		PUBLIC RELEASE
* fixed a bug in the -P passwordfile handling ... uhhh ... thanks to all
  the many people who reported that bug!
* added check if a password in -P passwordfile was already done via the
  -e n|s switch

v2.1 (APRIL 2002)		PUBLIC RELEASE
* added ldap cracking mode (thanks to myself, eh ;-)
* added -e option to try null passwords ("-e n") and passwords equal to the
  login ("-e s"). When specifying -e, -p/-P is optional (and vice versa)
* when a login is found, hydra will now go on with the next login

v2.0 (APRIL 2002)		PRIVATE RELEASE
! with v1.1.14 of Nessus, Hydra is a Nessus plugin!
* incorporated code to make hydra a nessus plugin (thanks to deraison@cvs.nessus.org !)
* added smb/samba/CIFS cracking mode (thanks to deraison@cvs.nessus.org !)
* added cisco-enable cracking mode (thanks to J.Marx@secunet.de !)
* minor enhancements and fixes

v1.7 (MARCH 2002)		PRIVATE RELEASE
* configure change to better detect OpenSSL
* ported to Solaris

v1.6 (FEBRUARY 2002)		PUBLIC RELEASE
* added socks5 support (thanks to bigbud@weed.tc !)

v1.5 (DECEMBER 2001)		PRIVATE RELEASE
* added -S option for SSL support (for all TCP based protocols)
* added -f option to stop attacking once a valid login/pw has been discovered
* made modules more hydra-mod compliant
* configure stuff thrown out - was not really used and too complicated,
  wrote my own, lets hope it works everywhere ;-)

v1.4 (DECEMBER 2001)		PUBLIC RELEASE
* added REXEC cracking module
* added NNTP cracking module
* added VNC cracking module (plus the 3DES library, which is needed) - some
  of the code ripped from FX/Phenolite :-) thanks a lot
* added PCNFS cracking module
* added ICQ cracking module (thanks to ocsic <pisco@private.as>!!)
* for the pcnfs cracking module, I had to add the hydra_connect_udp function
* added several compactibility stuff to work with all the M$ crap

v1.3 (September 2001)		PUBLIC RELEASE
* uh W2K telnetd sends null bytes in negotiation mode. workaround implemented.
* Rewrote the finish functions which would sometimes hang. Shutdowns are faster
  now as well.
* Fixed the line count (it was always one to much)
* Put more information in the outpufile (-o)
* Removed some configure crap.

v1.2 (August 2001)		PRIVATE RELEASE
* Fixed a BIG bug which resulted in accounts being checked serveral times. ugh
* Fixed the bug which showed the wrong password for a telnet hack. Works for
  me. please test.
* Added http basic authentication cracking. Works for me. please test.
* Fixed the ftp cracker module for occasions where a long welcome message was
  displayed for ftp.
* Removed some compiler warnings.

v1.1 (May 2001)			PUBLIC RELEASE
* Added wait+reconnect functionality to hydra-mod
* Additional wait+reconnect for cisco module
* Added small waittimes to all attack modules to prevent too fast reconnects
* Added cisco Username/Password support to the telnet module
* Fixed a deadlock in the modules, plus an additional one in the telnet module

v1.0 (April 2001)		PUBLIC RELEASE
* Verified that all service modules really work, no fix necessary ;-)
  ... so let's make it public
* Changed the LICENCE

v0.6 (April 2001)		PRIVATE RELEASE
* Added hydra-cisco.c for the cisco 3 times "Password:" type
* Added hydra-imap.c for the imap service
* Fixed a bug in hydra-mod.c: empty logins resulted in an empty
  hydra_get_next_password() :-(, additionally the blocking/recv works better
  now. (no, not better - perfect ;-)
* Fixed a bug in hydra-telnet.c: too many false alarms for success due some
  mis-thinking on my side and I also implemented a more flexible checking
* Fixed hydra-ftp.c to allow more weird reactions
* Fixed all ;-) memory leaks

v0.5 (December 2000)		PUBLIC RELEASE
* NOTE WE HAVE GOT A NEW WWW ADDRESS -> www.thehackerschoice.com
* added telnet protocol
* exchanged snprintf with sprintf(%.250s) to let it compile on more platforms
  but still have buffer overflow protection.
* fixed a bug in Makefile.in (introduced by Plasmo ,-)

v0.4 (August 2000)		PUBLIC RELEASE
* Plasmoid added a ./configure script. thanks!

v0.3 (August 2000)
* first release


================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - given-names: Marc
    family-names: Heuse
    name-particle: "van Hauser"
    email: vh@thc.org
    affiliation: The Hacker's Choice
title: "hydra"
version: 9.2
type: software
date-released: 2021-03-15
url: "https://github.com/vanhauser-thc/thc-hydra"
keywords:
  - scanning
  - passwords
  - hacking
  - pentesting
  - securiy
license: AGPL-3.0-or-later


================================================
FILE: Dockerfile
================================================
FROM debian:bookworm-slim

ARG HYDRA_VERSION="github"

LABEL \
    org.opencontainers.image.url="https://github.com/vanhauser-thc/thc-hydra" \
    org.opencontainers.image.source="https://github.com/vanhauser-thc/thc-hydra" \
    org.opencontainers.image.version="$HYDRA_VERSION" \
    org.opencontainers.image.vendor="vanhauser-thc" \
    org.opencontainers.image.title="hydra" \
    org.opencontainers.image.licenses="GNU AFFERO GENERAL PUBLIC LICENSE"

COPY . /src

RUN set -x \
    && apt-get update \
    && apt-get -y install \
        #libmysqlclient-dev \
        default-libmysqlclient-dev \
        libgpg-error-dev \
        #libmemcached-dev \
        #libgcrypt11-dev \
        libgcrypt-dev \
        #libgcrypt20-dev \
        #libgtk-3-dev \
        libpcre3-dev \
        #firebird-dev \
        libidn11-dev \
        libssh-dev \
        #libsvn-dev \
        libssl-dev \
        #libpq-dev \
        make \
        curl \
        gcc \
        1>/dev/null \
    # The next line fixes the curl "SSL certificate problem: unable to get local issuer certificate" for linux/arm
    && c_rehash

# Get hydra sources and compile
RUN cd /src \
        && make clean \
        && ./configure \
        && make \
        && make install

# Make clean
RUN apt-get purge -y make gcc \
    && apt-get autoremove -y \
    && rm -rf /var/lib/apt/lists/* \
    && rm -rf /src

# Verify hydra installation
RUN hydra -h || error_code=$? \
    && if [ ! "${error_code}" -eq 255 ]; then echo "Wrong exit code for 'hydra help' command"; exit 1; fi \
    # Unprivileged user creation
    && echo 'hydra:x:10001:10001::/tmp:/sbin/nologin' > /etc/passwd \
    && echo 'hydra:x:10001:' > /etc/group

ARG INCLUDE_SECLISTS="true"

RUN set -x \
    && if [ "${INCLUDE_SECLISTS}" = "true" ]; then \
        mkdir /tmp/seclists \
        && curl -SL "https://api.github.com/repos/danielmiessler/SecLists/tarball" -o /tmp/seclists/src.tar.gz \
        && tar xzf /tmp/seclists/src.tar.gz -C /tmp/seclists \
        && mv /tmp/seclists/*SecLists*/Passwords /opt/passwords \
        && mv /tmp/seclists/*SecLists*/Usernames /opt/usernames \
        && chmod -R u+r /opt/passwords /opt/usernames \
        && rm -Rf /tmp/seclists \
        && ls -la /opt/passwords /opt/usernames \
    ;fi

# Use an unprivileged user
USER 10001:10001

ENTRYPOINT ["hydra"]


================================================
FILE: INSTALL
================================================
type "./configure", then "make" and finally "sudo make install"

For special modules you need to install software packages before
you run "./configure":
  Ubuntu/Debian:  apt-get install libssl-dev libssh-dev libidn11-dev libpcre3-dev libmysqlclient-dev libpq-dev libsvn-dev firebird-dev libncurses5-dev
  Redhat/Fedora:  yum install openssl-devel pcre-devel ncpfs-devel postgresql-devel libssh-devel subversion-devel libncurses-devel
  OpenSuSE:       zypper install libopenssl-devel pcre-devel libidn-devel ncpfs-devel libssh-devel postgresql-devel subversion-devel libncurses-devel

For xhydra (GTK GUI) you need to install autoconf and the GTK3 development files:
  Ubuntu/Debian:  apt-get install autoconf libgtk-3-dev
  Redhat/Fedora:  yum install autoconf gtk3-devel
  OpenSuSE:       zypper install autoconf gtk3-devel

For Termux/Android you need the following setup:

Install the necessary dependencies
  # pkg install -y x11-repo
  # pkg install -y clang make openssl openssl-tool wget openssh coreutils gtk3
And then compiling hydra
  # ./configure --prefix=$PREFIX
  # make
  # make install


To use xhydra, you will need to install a graphical output in termux, you can be guided from this article:

https://wiki.termux.com/wiki/Graphical_Environment


For the Oracle login module, install the basic and SDK packages:
 https://www.oracle.com/database/technologies/instant-client/downloads.html



================================================
FILE: LICENSE
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.


================================================
FILE: LICENSE_OPENSSL
================================================
/* 
 * (c) 2002, 2003, 2004 by Jason McLaughlin and Riadh Elloumi
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * is provided AS IS, WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, and
 * NON-INFRINGEMENT.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc.
 *
 * Free Software Foundation
 * 51 Franklin Street, Fifth Floor
 * Boston, MA 02110-1335
 * USA
 *
 * Telephone: +1-617-542-5942
 * Fax: +1-617-542-2652
 * General email: info@fsf.org
 *
 * In addition, as a special exception, the copyright holders give
 * permission to link the code of portions of this program with the
 * OpenSSL library under certain conditions as described in each
 * individual source file, and distribute linked combinations
 * including the two.
 * You must obey the GNU General Public License in all respects
 * for all of the code used other than OpenSSL.  If you modify
 * file(s) with this exception, you may extend this exception to your
 * version of the file(s), but you are not obligated to do so.  If you
 * do not wish to do so, delete this exception statement from your
 * version.  If you delete this exception statement from all source
 * files in the program, then also delete it here.
 */

Certain source files in this program permit linking with the OpenSSL
library (http://www.openssl.org), which otherwise wouldn't be allowed
under the GPL.  For purposes of identifying OpenSSL, most source files
giving this permission limit it to versions of OpenSSL having a license
identical to that listed in this file (LICENSE.OpenSSL).  It is not
necessary for the copyright years to match between this file and the
OpenSSL version in question.  However, note that because this file is
an extension of the license statements of these source files, this file
may not be changed except with permission from all copyright holders
of source files in this program which reference this file.


  LICENSE ISSUES
  ==============

  The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
  the OpenSSL License and the original SSLeay license apply to the toolkit.
  See below for the actual license texts. Actually both licenses are BSD-style
  Open Source licenses. In case of any license issues related to OpenSSL
  please contact openssl-core@openssl.org.

  OpenSSL License
  ---------------

/* ====================================================================
 * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    openssl-core@openssl.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

 Original SSLeay License
 -----------------------

/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 * 
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 * 
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young (eay@cryptsoft.com)"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from 
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 * 
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */



================================================
FILE: Makefile.am
================================================
#
# Makefile for Hydra - (c) 2001-2023 by van Hauser / THC <vh@thc.org>
#
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 -Wno-deprecated-declarations
CPPFLAGS += -D_GNU_SOURCE -Wno-deprecated-declarations -Wno-pointer-sign -Wno-format-truncation -Wno-format-overflow
# -Wall -g -pedantic
LIBS=-lm
DESTDIR ?=
BINDIR = /bin
MANDIR = /man/man1/
DATADIR = /etc
PIXDIR = /share/pixmaps
APPDIR = /share/applications

SRC = hydra-vnc.c hydra-pcnfs.c hydra-rexec.c hydra-nntp.c hydra-socks5.c \
      hydra-telnet.c hydra-cisco.c hydra-http.c hydra-ftp.c hydra-imap.c \
      hydra-pop3.c hydra-smb.c hydra-icq.c hydra-cisco-enable.c hydra-ldap.c \
      hydra-memcached.c hydra-mongodb.c hydra-mysql.c hydra-mssql.c hydra-xmpp.c \
      hydra-http-proxy-urlenum.c hydra-snmp.c hydra-cvs.c hydra-smtp.c \
      hydra-smtp-enum.c hydra-sapr3.c hydra-ssh.c hydra-sshkey.c hydra-teamspeak.c \
      hydra-postgres.c hydra-rsh.c hydra-rlogin.c hydra-oracle-listener.c \
      hydra-svn.c hydra-pcanywhere.c hydra-sip.c hydra-oracle.c hydra-vmauthd.c \
      hydra-asterisk.c hydra-firebird.c hydra-afp.c hydra-ncp.c hydra-rdp.c \
      hydra-oracle-sid.c hydra-http-proxy.c hydra-http-form.c hydra-irc.c \
      hydra-s7-300.c hydra-redis.c hydra-adam6500.c hydra-rtsp.c \
      hydra-rpcap.c hydra-radmin2.c hydra-cobaltstrike.c \
      hydra-time.c crc32.c d3des.c bfg.c ntlm.c sasl.c hmacmd5.c hydra-mod.c \
      hydra-smb2.c
OBJ = hydra-vnc.o hydra-pcnfs.o hydra-rexec.o hydra-nntp.o hydra-socks5.o \
      hydra-telnet.o hydra-cisco.o hydra-http.o hydra-ftp.o hydra-imap.o \
      hydra-pop3.o hydra-smb.o hydra-icq.o hydra-cisco-enable.o hydra-ldap.o \
      hydra-memcached.o hydra-mongodb.o hydra-mysql.o hydra-mssql.o hydra-cobaltstrike.o hydra-xmpp.o \
      hydra-http-proxy-urlenum.o hydra-snmp.o hydra-cvs.o hydra-smtp.o \
      hydra-smtp-enum.o hydra-sapr3.o hydra-ssh.o hydra-sshkey.o hydra-teamspeak.o \
      hydra-postgres.o hydra-rsh.o hydra-rlogin.o hydra-oracle-listener.o \
      hydra-svn.o hydra-pcanywhere.o hydra-sip.o hydra-oracle-sid.o hydra-oracle.o \
      hydra-vmauthd.o hydra-asterisk.o hydra-firebird.o hydra-afp.o \
      hydra-ncp.o hydra-http-proxy.o hydra-http-form.o hydra-irc.o \
      hydra-redis.o hydra-rdp.o hydra-s7-300.c hydra-adam6500.o hydra-rtsp.o \
      hydra-rpcap.o hydra-radmin2.o \
      crc32.o d3des.o bfg.o ntlm.o sasl.o hmacmd5.o hydra-mod.o hydra-time.o \
      hydra-smb2.o
BINS = hydra pw-inspector

EXTRA_DIST = README README.arm README.palm CHANGES TODO INSTALL LICENSE \
             hydra-mod.h hydra.h crc32.h d3des.h

all:	pw-inspector hydra $(XHYDRA_SUPPORT) 
	@echo
	@echo Now type "make install"

hydra:	hydra.c $(OBJ)
	$(CC) $(OPTS) $(SEC) $(LDSEC) $(LIBS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o hydra $(HYDRA_LOGO) hydra.c $(OBJ) $(LIBS) $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
	@echo
	@echo If men could get pregnant, abortion would be a sacrament
	@echo

xhydra:	
	-cd hydra-gtk && sh ./make_xhydra.sh

pw-inspector: pw-inspector.c
	$(CC) $(OPTS) $(SEC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o pw-inspector $(PWI_LOGO) pw-inspector.c

.c.o:	
	$(CC) $(OPTS) $(SEC) $(CFLAGS) $(CPPFLAGS) -c $< $(XDEFINES) $(XIPATHS)

strip:	all
	-strip $(BINS)
	-echo OK > /dev/null && test -x xhydra && strip xhydra || echo OK > /dev/null

install:	strip
	-mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)
	cp -f hydra-wizard.sh $(BINS) $(DESTDIR)$(PREFIX)$(BINDIR) && cd $(DESTDIR)$(PREFIX)$(BINDIR) && chmod 755 hydra-wizard.sh $(BINS)
	-echo OK > /dev/null && test -x xhydra && cp xhydra $(DESTDIR)$(PREFIX)$(BINDIR) && cd $(DESTDIR)$(PREFIX)$(BINDIR) && chmod 755 xhydra || echo OK > /dev/null
	-sed -e "s|^INSTALLDIR=.*|INSTALLDIR="$(PREFIX)"|" dpl4hydra.sh | sed -e "s|^LOCATION=.*|LOCATION="$(DATADIR)"|" > $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
	-chmod 755 $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
	-mkdir -p $(DESTDIR)$(PREFIX)$(DATADIR)
	-cp -f *.csv $(DESTDIR)$(PREFIX)$(DATADIR)
	-mkdir -p $(DESTDIR)$(PREFIX)$(MANDIR)
	-cp -f hydra.1 xhydra.1 pw-inspector.1 $(DESTDIR)$(PREFIX)$(MANDIR)
	-mkdir -p $(DESTDIR)$(PREFIX)$(PIXDIR)
	-cp -f xhydra.png $(DESTDIR)$(PREFIX)$(PIXDIR)/
	-mkdir -p $(DESTDIR)$(PREFIX)$(APPDIR)
	-desktop-file-install --dir $(DESTDIR)$(PREFIX)$(APPDIR) xhydra.desktop

clean:
	rm -rf xhydra pw-inspector hydra *.o core *.core *.stackdump *~ Makefile.in Makefile dev_rfc hydra.restore arm/*.ipk arm/ipkg/usr/bin/* hydra-gtk/src/*.o hydra-gtk/src/xhydra hydra-gtk/stamp-h hydra-gtk/config.status hydra-gtk/errors hydra-gtk/config.log hydra-gtk/src/.deps hydra-gtk/src/Makefile hydra-gtk/Makefile
	cp -f Makefile.orig Makefile

uninstall:
	-rm -f $(DESTDIR)$(PREFIX)$(BINDIR)/xhydra $(DESTDIR)$(PREFIX)$(BINDIR)/hydra $(DESTDIR)$(PREFIX)$(BINDIR)/pw-inspector $(DESTDIR)$(PREFIX)$(BINDIR)/hydra-wizard.sh $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
	-rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/dpl4hydra_full.csv $(DESTDIR)$(PREFIX)$(DATADIR)/dpl4hydra_local.csv
	-rm -f $(DESTDIR)$(PREFIX)$(MANDIR)/hydra.1 $(DESTDIR)$(PREFIX)$(MANDIR)/xhydra.1 $(DESTDIR)$(PREFIX)$(MANDIR)/pw-inspector.1
	-rm -f $(DESTDIR)$(PREFIX)$(PIXDIR)/xhydra.png
	-rm -f $(DESTDIR)$(PREFIX)$(APPDIR)/xhydra.desktop


================================================
FILE: Makefile.orig
================================================
all:
	@echo Error: you must run "./configure" first

clean:
	cp -f Makefile.orig Makefile

uninstall:
	@echo Error: you must run "./configure" first


================================================
FILE: Makefile.unix
================================================
STRIP=strip


================================================
FILE: PROBLEMS
================================================
List of known issues:
=====================

* Cygwin: more than 30 tasks (-t 31 or more) will lead to a stack smash
* OS X: brew installed modules are not compiled correctly and will crash hydra


================================================
FILE: README
================================================

				  H Y D R A

                      (c) 2001-2023 by van Hauser / THC
             <vh@thc.org> https://github.com/vanhauser-thc/thc-hydra
       Many modules were written by David (dot) Maciejak @ gmail (dot) com
                 BFG code by Jan Dlabal <dlabaljan@gmail.com>

  		    Licensed under AGPLv3 (see LICENSE file)

           Please do not use in military or secret service organizations,
                          or for illegal purposes.
      (This is the wish of the author and non-binding. Many people working
       in these organizations do not care for laws and ethics anyway.
            You are not one of the "good" ones if you ignore this.)

           NOTE: No, this is not meant to be a markdown doc! old school!


Hydra in the most current GitHub state can be directly downloaded via Docker:
```
docker pull vanhauser/hydra
```


INTRODUCTION
------------
Number one of the biggest security holes are passwords, as every password
security study shows.
This tool is a proof-of-concept code to give researchers and security
consultants the possibility of showing how easy it would be to gain unauthorized
access from a remote to a system.

THIS TOOL IS FOR LEGAL PURPOSES ONLY!

There are already several login hacker tools available; however, none of them
support more than one protocol to attack or support parallelized
connects.

It was tested to compile cleanly on Linux, Windows/Cygwin, Solaris,
FreeBSD/OpenBSD, QNX (Blackberry 10), and MacOS.

Currently, this tool supports the following protocols:
 Asterisk, AFP, Cisco AAA, Cisco auth, Cisco enable, CVS, Firebird, FTP,
 HTTP-FORM-GET, HTTP-FORM-POST, HTTP-GET, HTTP-HEAD, HTTP-POST, HTTP-PROXY,
 HTTPS-FORM-GET, HTTPS-FORM-POST, HTTPS-GET, HTTPS-HEAD, HTTPS-POST,
 HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MEMCACHED, MONGODB, MS-SQL, MYSQL, NCP, NNTP, Oracle Listener,
 Oracle SID, Oracle, PC-Anywhere, PCNFS, POP3, POSTGRES, Radmin, RDP, Rexec, Rlogin,
 Rsh, RTSP, SAP/R3, SIP, SMB, SMTP, SMTP Enum, SNMP v1+v2+v3, SOCKS5,
 SSH (v1 and v2), SSHKEY, Subversion, Teamspeak (TS2), Telnet, VMware-Auth,
 VNC and XMPP.

However, the module engine for new services is very easy, so it won't take a
long time until even more services are supported.
Your help in writing, enhancing, or fixing modules is highly appreciated!! :-)



WHERE TO GET
------------
You can always find the newest release/production version of Hydra at its
project page at https://github.com/vanhauser-thc/thc-hydra/releases
If you are interested in the current development state, the public development
repository is on GitHub:
  svn co https://github.com/vanhauser-thc/thc-hydra
 or
  git clone https://github.com/vanhauser-thc/thc-hydra
Use the development version at your own risk. It contains new features and
new bugs. Things might not work!

Alternatively (and easier), you can pull it as a Docker container:
```
docker pull vanhauser/hydra
```


HOW TO COMPILE
--------------
To configure, compile, and install Hydra, just type:

```
./configure
make
make install
```

If you want the SSH module, you have to set up libssh (not libssh2!) on your
system,  get it from https://www.libssh.org, for ssh v1 support you also need
to add the "-DWITH_SSH1=On" option in the cmake command line.
IMPORTANT: If you compile on macOS, you must do this - do not install libssh via Homebrew.

If you use Ubuntu/Debian, this will install the supplementary libraries needed
for a few optional modules (note that some might not be available on your distribution):

```
apt-get install libssl-dev libssh-dev libidn11-dev libpcre3-dev \
                 libgtk-3-dev libmysqlclient-dev libpq-dev libsvn-dev \
                 firebird-dev libmemcached-dev libgpg-error-dev \
                 libgcrypt11-dev libgcrypt20-dev freetds-dev
```

This enables all optional modules and features except for Oracle,
SAP R/3, NCP, and the Apple filing protocol - which you will need to download and
install from the vendor's websites.

For all other Linux derivatives and BSD-based systems, use the system
software installer and look for similarly named libraries, like in the
command above. In all other cases, you have to download all source libraries
and compile them manually.



SUPPORTED PLATFORMS
-------------------
- All UNIX platforms (Linux, *BSD, Solaris, etc.)
- MacOS (basically a BSD clone)
- Windows with Cygwin (both IPv4 and IPv6)
- Mobile systems based on Linux, MacOS, or QNX (e.g. Android, iPhone, Blackberry 10, Zaurus, iPaq)



HOW TO USE
----------
If you just enter `hydra`, you will see a short summary of the important
options available.
Type `./hydra -h` to see all available command line options.

Note that NO login/password file is included. Generate them yourself.
A default password list is, however, present; use "dpl4hydra.sh" to generate
a list.

For Linux users, a GTK GUI is available; try `./xhydra`

For the command line usage, the syntax is as follows:
 For attacking one target or a network, you can use the new "://" style:
  hydra [some command line options] PROTOCOL://TARGET:PORT/MODULE-OPTIONS
 The old mode can be used for these, too, and additionally, if you want to
 specify your targets from a text file; you *must* use this one:

```
hydra [some command line options] [-s PORT] TARGET PROTOCOL [MODULE-OPTIONS]
```

Via the command line options, you specify which logins to try, which passwords,
if SSL should be used, how many parallel tasks should be used for attacking, etc.

PROTOCOL is the protocol you want to use for attacking, e.g., ftp, SMTP,
http-get or many others are available
TARGET is the target you want to attack
MODULE-OPTIONS are optional values that are special per PROTOCOL module

FIRST - select your target
 You have three options on how to specify the target you want to attack:
 1. A single target on the command line: just put the IP or DNS address in
 2. A network range on the command line: CIDR specification like "192.168.0.0/24"
 3. A list of hosts in a text file: one line per entry (see below)

SECOND - select your protocol
 Try to avoid telnet, as it is unreliable for detecting a correct or false login attempt.
 Use a port scanner to see which protocols are enabled on the target.

THIRD - check if the module has optional parameters
 hydra -U PROTOCOL
 e.g. hydra -U smtp

FOURTH - the destination port
 This is optional; if no port is supplied, the default common port for the
 PROTOCOL is used.
 If you specify SSL to use ("-S" option), the SSL common port is used by default.


If you use "://" notation, you must use "[" "]" brackets if you want to supply
IPv6 addresses or CIDR ("192.168.0.0/24") notations to attack:
  hydra [some command line options] ftp://[192.168.0.0/24]/
  hydra [some command line options] -6 smtps://[2001:db8::1]/NTLM

Note that everything Hydra does is IPv4 only!
If you want to attack IPv6 addresses, you must add the "-6" command line option.
All attacks are then IPv6 only!

If you want to supply your targets via a text file, you can not use the ://
notation, but use the old style and just supply the protocol (and module options):
  hydra [some command line options] -M targets.txt ftp
You can also supply the port for each target entry by adding ":<port>" after a
target entry in the file, e.g.:

```
foo.bar.com
target.com:21
unusual.port.com:2121
default.used.here.com
127.0.0.1
127.0.0.1:2121
```

Note that if you want to attach IPv6 targets, you must supply the -6 option
and *must* put IPv6 addresses in brackets in the file(!) like this:

```
foo.bar.com
target.com:21
[fe80::1%eth0]
[2001::1]
[2002::2]:8080
[2a01:24a:133:0:00:123:ff:1a]
```

LOGINS AND PASSWORDS
--------------------
You have many options on how to attack with logins and passwords
With -l for login and -p for password, you tell Hydra that this is the only
login and/or password to try.
With -L for logins and -P for passwords, you supply text files with entries.
e.g.:

```
hydra -l admin -p password ftp://localhost/
hydra -L default_logins.txt -p test ftp://localhost/
hydra -l admin -P common_passwords.txt ftp://localhost/
hydra -L logins.txt -P passwords.txt ftp://localhost/
```

Additionally, you can try passwords based on the login via the "-e" option.
The "-e" option has three parameters:

```
s - try the login as password
n - try an empty password
r - reverse the login and try it as a password
```

If you want to, e.g., try "try login as password and "empty password", you
specify "-e sn" on the command line.

But there are two more modes for trying passwords than -p/-P:
You can use a text file where a login and password pair is separated by a colon,
e.g.:

```
admin:password
test:test
foo:bar
```

This is a common default account style listing that is also generated by the
dpl4hydra.sh default account file generator supplied with Hydra.
You use such a text file with the -C option - note that in this mode you
can not use -l/-L/-p/-P options (-e nsr however you can).
Example:

```
hydra -C default_accounts.txt ftp://localhost/
```

And finally, there is a brute-force mode with the -x option (which you can not
use with -p/-P/-C):

```
-x minimum_length:maximum_length:charset
```

The charset definition is `a` for lowercase letters, `A` for uppercase letters,
`1` for numbers and for anything else, what you supply is their real representation.
Examples:

```
-x 1:3:a generate passwords from length 1 to 3 with all lowercase letters
-x 2:5:/ generate passwords from length 2 to 5 containing only slashes
-x 5:8:A1 generate passwords from length 5 to 8 with uppercase and numbers
-x '3:3:aA1&~#\\ "\'<{([-|_^@)]=}>$%*?./§,;:!`' -v generates length 3 passwords with all 95 characters, and verbose.
```

Example:

```
hydra -l ftp -x 3:3:a ftp://localhost/
```

SPECIAL OPTIONS FOR MODULES
---------------------------
Via the third command line parameter (TARGET SERVICE OPTIONAL) or the -m
command line option, you can pass one option to a module.
Many modules use this; a few require it!

To see the special option of a module, type:

  hydra -U <module>

e.g.

  ./hydra -U http-post-form

The special options can be passed via the -m parameter, as 3rd command line
option or in the service://target/option format.

Examples (they are all equal):

```
./hydra -l test -p test -m PLAIN 127.0.0.1 imap
./hydra -l test -p test 127.0.0.1 imap PLAIN
./hydra -l test -p test imap://127.0.0.1/PLAIN
```

RESTORING AN ABORTED/CRASHED SESSION
------------------------------------
When Hydra is aborted with Control-C, killed, or crashes, it leaves a
"hydra.restore" file behind, which contains all necessary information to
restore the session. This session file is written every 5 minutes.
NOTE: the hydra.restore file can NOT be copied to a different platform (e.g.
from little endian to big endian, or from Solaris to AIX)

HOW TO SCAN/CRACK OVER A PROXY
------------------------------
The environment variable HYDRA_PROXY_HTTP defines the web proxy (this works
just for the HTTP services!).
The following syntax is valid:

```
HYDRA_PROXY_HTTP="http://123.45.67.89:8080/"
HYDRA_PROXY_HTTP="http://login:password@123.45.67.89:8080/"
HYDRA_PROXY_HTTP="proxylist.txt"
```

The last example is a text file containing up to 64 proxies (in the same
format definition as the other examples).

For all other services, use the HYDRA_PROXY variable to scan/crack.
It uses the same syntax. eg:

```
HYDRA_PROXY=[connect|socks4|socks5]://[login:password@]proxy_addr:proxy_port
```

for example:

```
HYDRA_PROXY=connect://proxy.anonymizer.com:8000
HYDRA_PROXY=socks4://auth:pw@127.0.0.1:1080
HYDRA_PROXY=socksproxylist.txt
```

ADDITIONAL HINTS
----------------
* Sort your password files by likelihood and use the -u option to find
  passwords much faster!
* uniq your dictionary files! This can save you a lot of time :-)
    cat words.txt | sort | uniq > dictionary.txt
* If you know that the target is using a password policy (allowing users
  only to choose a password with a minimum length of 6, containing at least one
  letter and one number, etc. use the tool pw-inspector, which comes along
  with the hydra package, to reduce the password list:
    cat dictionary.txt | pw-inspector -m 6 -c 2 -n > passlist.txt


RESULTS OUTPUT
--------------

The results are output to stdio along with the other information.  Via the -o
command line option, the results can also be written to a file.  Using -b,
the format of the output can be specified.  Currently, these are supported:

* `text`   - plain text format
* `jsonv1` - JSON data using version 1.x of the schema (defined below).
* `json`   - JSON data using the latest version of the schema; currently, there
             is only version 1.

If using JSON output, the results file may not be valid JSON if there are
serious errors in booting Hydra.


JSON Schema
-----------
Here is an example of the JSON output.  Notes on some of the fields:

* `errormessages` - an array of zero or more strings that are normally printed
   to stderr at the end of Hydra's run.  The text is very free-form.
* `success` - indication if Hydra ran correctly without error (**NOT** if
   passwords were detected).  This parameter is either the JSON value `true`
   or `false` depending on completion.
* `quantityfound` - How many username+password combinations were discovered.
* `jsonoutputversion` - Version of the schema, 1.00, 1.01, 1.11, 2.00,
   2.03, etc.  Hydra will make the second tuple of the version to always be two
   digits to make it easier for downstream processors (as opposed to v1.1 vs
   v1.10).  The minor-level versions are additive, so 1.02 will contain more
   fields than version 1.00 and will be backward compatible.  Version 2.x will
   break something from the version 1.x output.

Version 1.00 example:
```
{
    "errormessages": [
        "[ERROR] Error Message of Something",
        "[ERROR] Another Message",
        "These are very free form"
    ],
    "generator": {
        "built": "2021-03-01 14:44:22",
        "commandline": "hydra -b jsonv1 -o results.json ... ...",
        "jsonoutputversion": "1.00",
        "server": "127.0.0.1",
        "service": "http-post-form",
        "software": "Hydra",
        "version": "v8.5"
    },
    "quantityfound": 2,
    "results": [
        {
            "host": "127.0.0.1",
            "login": "bill@example.com",
            "password": "bill",
            "port": 9999,
            "service": "http-post-form"
        },
        {
            "host": "127.0.0.1",
            "login": "joe@example.com",
            "password": "joe",
            "port": 9999,
            "service": "http-post-form"
        }
    ],
    "success": false
}
```


SPEED
-----
Through the parallelizing feature, this password cracker tool can be very
fast; however, it depends on the protocol. The fastest are generally POP3
and FTP.
Experiment with the task option (-t) to speed things up! The higher - the
faster ;-) (but too high - and it disables the service)



STATISTICS
----------
Run against a SuSE Linux 7.2 on localhost with a "-C FILE" containing
295 entries (294 tries invalid logins, 1 valid). Every test was run three
times (only for "1 task" just once), and the average was noted down.

```
			P A R A L L E L    T A S K S
SERVICE	1	4	8	16	32	50	64	100	128
------- --------------------------------------------------------------------
telnet	23:20	5:58	2:58	1:34	1:05	0:33	0:45*	0:25*	0:55*
ftp	45:54	11:51	5:54	3:06	1:25	0:58	0:46	0:29	0:32
pop3	92:10	27:16	13:56	6:42	2:55	1:57	1:24	1:14	0:50
imap	31:05	7:41	3:51	1:58	1:01	0:39	0:32	0:25	0:21
```

(*)
Note: telnet timings can be VERY different for 64 to 128 tasks! e.g. with
128 tasks, running four times, resulted in timings between 28 and 97 seconds!
The reason for this is unknown...

guesses per task (rounded up):

  295	74	38	19	10	6	5	3	3

guesses possible per connect (depends on the server software and config):

  telnet	4
	ftp	6
	pop3	1
	imap	3



BUGS & FEATURES
---------------
Hydra:
Email me or David if you find bugs or if you have written a new module.
vh@thc.org (and put "antispam" in the subject line)


You should use PGP to encrypt emails to vh@thc.org :

```
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v3.3.3 (vh@thc.org)

mQINBFIp+7QBEADQcJctjohuYjBxq7MELAlFDvXRTeIqqh8kqHPOR018xKL09pZT
KiBWFBkU48xlR3EtV5fC1yEt8gDEULe5o0qtK1aFlYBtAWkflVNjDrs+Y2BpjITQ
FnAPHw0SOOT/jfcvmhNOZMzMU8lIubAVC4cVWoSWJbLTv6e0DRIPiYgXNT5Quh6c
vqhnI1C39pEo/W/nh3hSa16oTc5dtTLbi5kEbdzml78TnT0OASmWLI+xtYKnP+5k
Xv4xrXRMVk4L1Bv9WpCY/Jb6J8K8SJYdXPtbaIi4VjgVr5gvg9QC/d/QP2etmw3p
lJ1Ldv63x6nXsxnPq6MSOOw8+QqKc1dAgIA43k6SU4wLq9TB3x0uTKnnB8pA3ACI
zPeRN9LFkr7v1KUMeKKEdu8jUut5iKUJVu63lVYxuM5ODb6Owt3+UXgsSaQLu9nI
DZqnp/M6YTCJTJ+cJANN+uQzESI4Z2m9ITg/U/cuccN/LIDg8/eDXW3VsCqJz8Bf
lBSwMItMhs/Qwzqc1QCKfY3xcNGc4aFlJz4Bq3zSdw3mUjHYJYv1UkKntCtvvTCN
DiomxyBEKB9J7KNsOLI/CSst3MQWSG794r9ZjcfA0EWZ9u6929F2pGDZ3LiS7Jx5
n+gdBDMe0PuuonLIGXzyIuMrkfoBeW/WdnOxh+27eemcdpCb68XtQCw6UQARAQAB
tB52YW4gSGF1c2VyICgyMDEzKSA8dmhAdGhjLm9yZz6JAjkEEwECACMCGwMCHgEC
F4AFAlIp/QcGCwkIAwcCBhUKCQgLAgUWAwIBAAAKCRDI8AEqhCFiv2R9D/9qTCJJ
xCH4BUbWIUhw1zRkn9iCVSwZMmfaAhz5PdVTjeTelimMh5qwK2MNAjpR7vCCd3BH
Z2VLB2Eoz9MOgSCxcMOnCDJjtCdCOeaxiASJt8qLeRMwdMOtznM8MnKCIO8X4oo4
qH8eNj83KgpI50ERBCj/EMsgg07vSyZ9i1UXjFofFnbHRWSW9yZO16qD4F6r4SGz
dsfXARcO3QRI5lbjdGqm+g+HOPj1EFLAOxJAQOygz7ZN5fj+vPp+G/drONxNyVKp
QFtENpvqPdU9CqYh8ssazXTWeBi/TIs0q0EXkzqo7CQjfNb6tlRsg18FxnJDK/ga
V/1umTg41bQuVP9gGmycsiNI8Atr5DWqaF+O4uDmQxcxS0kX2YXQ4CSQJFi0pml5
slAGL8HaAUbV7UnQEqpayPyyTEx1i0wK5ZCHYjLBfJRZCbmHX7SbviSAzKdo5JIl
Atuk+atgW3vC3hDTrBu5qlsFCZvbxS21PJ+9zmK7ySjAEFH/NKFmx4B8kb7rPAOM
0qCTv0pD/e4ogJCxVrqQ2XcCSJWxJL31FNAMnBZpVzidudNURG2v61h3ckkSB/fP
JnkRy/yxYWrdFBYkURImxD8iFD1atj1n3EI5HBL7p/9mHxf1DVJWz7rYQk+3czvs
IhBz7xGBz4nhpCi87VDEYttghYlJanbiRfNh3okCOAQTAQIAIgUCUin7tAIbAwYL
CQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQyPABKoQhYr8OIA//cvkhoKay88yS
AjMQypach8C5CvP7eFCT11pkCt1DMAO/8Dt6Y/Ts10dPjohGdIX4PkoLTkQDwBDJ
HoLO75oqj0CYLlqDI4oHgf2uzd0Zv8f/11CQQCtut5oEK72mGNzv3GgVqg60z2KR
2vpxvGQmDwpDOPP620tf/LuRQgBpks7uazcbkAE2Br09YrUQSCBNHy8kirHW5m5C
nupMrcvuFx7mHKW1z3FuhM8ijG7oRmcBWfVoneQgIT3l2WBniXg1mKFhuUSV8Erc
XIcc11qsKshyqh0GWb2JfeXbAcTW8/4IwrCP+VfAyLO9F9khP6SnCmcNF9EVJyR6
Aw+JMNRin7PgvsqbFhpkq9N+gVBAufz3DZoMTEbsMTtW4lYG6HMWhza2+8G9XyaL
ARAWhkNVsmQQ5T6qGkI19thB6E/T6ZorTxqeopNVA7VNK3RVlKpkmUu07w5bTD6V
l3Ti6XfcSQqzt6YX2/WUE8ekEG3rSesuJ5fqjuTnIIOjBxr+pPxkzdoazlu2zJ9F
n24fHvlU20TccEWXteXj9VFzV/zbPEQbEqmE16lV+bO8U7UHqCOdE83OMrbNKszl
7LSCbFhCDtflUsyClBt/OPnlLEHgEE1j9QkqdFFy90l4HqGwKvx7lUFDnuF8LYsb
/hcP4XhqjiGcjTPYBDK254iYrpOSMZSIRgQQEQIABgUCUioGfQAKCRBDlBVOdiii
tuddAJ4zMrge4qzajScIQcXYgIWMXVenCQCfYTNQPGkHVyp3dMhJ0NR21TYoYMC5
Ag0EUin7tAEQAK5/AEIBLlA/TTgjUF3im6nu/rkWTM7/gs5H4W0a04kF4UPhaJUR
gCNlDfUnBFA0QD7Jja5LHYgLdoHXiFelPhGrbZel/Sw6sH2gkGCBtFMrVkm3u7tt
x3AZlprqqRH68Y5xTCEjGRncCAmaDgd2apgisJqXpu0dRDroFYpJFNH3vw9N2a62
0ShNakYP4ykVG3jTDC4MSl2q3BO5dzn8GYFHU0CNz6nf3gZR+48BG+zmAT77peTS
+C4Mbd6LmMmB0cuS2kYiFRwE2B69UWguLHjpXFcu9/85JJVCl2CIab7l5hpqGmgw
G/yW8HFK04Yhew7ZJOXJfUYlv1EZzR5bOsZ8Z9inC6hvFmxuCYCFnvkiEI+pOxPA
oeNOkMaT/W4W+au0ZVt3Hx+oD0pkJb5if0jrCaoAD4gpWOte6LZA8mAbKTxkHPBr
rA9/JFis5CVNI688O6eDiJqCCJjPOQA+COJI+0V+tFa6XyHPB4LxA46RxtumUZMC
v/06sDJlXMNpZbSd5Fq95YfZd4l9Vr9VrvKXfbomn+akwUymP8RDyc6Z8BzjF4Y5
02m6Ts0J0MnSYfEDqJPPZbMGB+GAgAqLs7FrZJQzOZTiOXOSIJsKMYsPIDWE8lXv
s77rs0rGvgvQfWzPsJlMIx6ryrMnAsfOkzM2GChGNX9+pABpgOdYII4bABEBAAGJ
Ah8EGAECAAkFAlIp+7QCGwwACgkQyPABKoQhYr+hrg/9Er0+HN78y6UWGFHu/KVK
d8M6ekaqjQndQXmzQaPQwsOHOvWdC+EtBoTdR3VIjAtX96uvzCRV3sb0XPB9S9eP
gRrO/t5+qTVTtjua1zzjZsMOr1SxhBgZ5+0U2aoY1vMhyIjUuwpKKNqj2uf+uj5Y
ZQbCNklghf7EVDHsYQ4goB9gsNT7rnmrzSc6UUuJOYI2jjtHp5BPMBHh2WtUVfYP
8JqDfQ+eJQr5NCFB24xMW8OxMJit3MGckUbcZlUa1wKiTb0b76fOjt0y/+9u1ykd
X+i27DAM6PniFG8BfqPq/E3iU20IZGYtaAFBuhhDWR3vGY4+r3OxdlFAJfBG9XDD
aEDTzv1XF+tEBo69GFaxXZGdk9//7qxcgiya4LL9Kltuvs82+ZzQhC09p8d3YSQN
cfaYObm4EwbINdKP7cr4anGFXvsLC9urhow/RNBLiMbRX/5qBzx2DayXtxEnDlSC
Mh7wCkNDYkSIZOrPVUFOCGxu7lloRgPxEetM5x608HRa3hDHoe5KvUBmmtavB/aR
zlGuZP1S6Y7S13ytiULSzTfUxJmyGYgNo+4ygh0i6Dudf9NLmV+i9aEIbLbd6bni
1B/y8hBSx3SVb4sQVRe3clBkfS1/mYjlldtYjzOwcd02x599KJlcChf8HnWFB7qT
zB3yrr+vYBT0uDWmxwPjiJs=
=ytEf
-----END PGP PUBLIC KEY BLOCK-----
```

================================================
FILE: TODO
================================================

./configure:
 - add test for -march=native

--- this is old ---

Prio 1:
* add cookie support to hydra-http.c
* hydra-smb more than 1 connection?
* add help hints?
* test teamspeak, icq
* check all modules to ensure no check is lost because of a timeout, buf == NULL etc.
* optimize smtp module
* optimize ssl performance
* add snmpv3 privacy support
* http: option to specify an url for testing if the login was right or wrong
* does hydra-oracle work with service names? (often SIDs do not work anymore)
* fix crash for -R on x64
* IPv6 addresses in txt file does not work
* prot://ipv6addr:port does not have []


Prio 2:
* add support for IPv6 Link Local Addresses like fe80::1%eth0 for Solaris and *BSD
* add crack info when key is pressed
* hydra-smb support NTLMv2 (when its fixed)
* support for 802.1x EAP via libpcap
* TN3270, and TN3270 user enumeration
* Support nmap -o and -oM output files


Prio 3:
* Specify user-agent for http-form module as extra optional option
* IPv6 support for sip
* add RIP, OSPF, BGP, PIM
* add diameter support
* round robin proxy support ?
* add tn5250 support
* Add Sybase support, using freetds lib (can be used for ms-sql)
* Add Informix ?


================================================
FILE: _config.yml
================================================
title: "thc-hydra" 
theme: jekyll-theme-midnight


================================================
FILE: bfg.c
================================================

/* code original by Jan Dlabal <dlabaljan@gmail.com>, partially rewritten by vh. */

#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __sun
#include <sys/int_types.h>
#elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#include "bfg.h"

bf_option bf_options;

#ifdef HAVE_MATH_H

extern int32_t debug;

static int32_t add_single_char(char ch, char flags, int32_t *crs_len) {
  if ((ch >= '2' && ch <= '9') || ch == '0') {
    if ((flags & BF_NUMS) > 0) {
      printf("[ERROR] character %c defined in -x although the whole number "
             "range was already defined by '1', ignored\n",
             ch);
      return 0;
    }
    // printf("[WARNING] adding character %c for -x, note that '1' will add all
    // numbers from 0-9\n", ch);
  }
  if (tolower((int32_t)ch) >= 'b' && tolower((int32_t)ch) <= 'z') {
    if ((ch <= 'Z' && (flags & BF_UPPER) > 0) || (ch > 'Z' && (flags & BF_UPPER) > 0)) {
      printf("[ERROR] character %c defined in -x although the whole letter "
             "range was already defined by '%c', ignored\n",
             ch, ch <= 'Z' ? 'A' : 'a');
      return 0;
    }
    // printf("[WARNING] adding character %c for -x, note that '%c' will add all
    // %scase letters\n", ch, ch <= 'Z' ? 'A' : 'a', ch <= 'Z' ? "up" : "low");
  }
  (*crs_len)++;
  if (BF_CHARSMAX - *crs_len < 1) {
    free(bf_options.crs);
    fprintf(stderr, "Error: charset specification exceeds %d characters.\n", BF_CHARSMAX);
    return 1;
  } else {
    bf_options.crs[*crs_len - 1] = ch;
    bf_options.crs[*crs_len] = '\0';
  }
  return 0;
}
// return values : 0 on success, 1 on error
//
// note that we check for -x .:.:ab but not for -x .:.:ba
//
int32_t bf_init(char *arg) {
  int32_t i = 0;
  int32_t crs_len = 0;
  char flags = 0;
  char *tmp = strchr(arg, ':');

  if (!tmp) {
    fprintf(stderr, "Error: Invalid option format for -x\n");
    return 1;
  } else {
    tmp[0] = '\0';
  }
  bf_options.from = atoi(arg);
  if (bf_options.from < 1 || bf_options.from > 127) {
    fprintf(stderr, "Error: minimum length must be between 1 and 127, format: "
                    "-x min:max:types\n");
    return 1;
  }
  arg = tmp + 1;
  tmp++;
  if (!arg[0]) {
    fprintf(stderr, "Error: no maximum length specified for -x min:max:types!\n");
    return 1;
  }
  tmp = strchr(arg, ':');
  if (!tmp) {
    fprintf(stderr, "Error: Invalid option format for -x\n");
    return 1;
  } else {
    tmp[0] = '\0';
  }
  bf_options.to = atoi(arg);
  tmp++;

  if (bf_options.from > bf_options.to) {
    fprintf(stderr, "Error: you specified a minimum length higher than the "
                    "maximum length!\n");
    return 1;
  }

  if (tmp[0] == 0) {
    fprintf(stderr, "Error: charset not specified!\n");
    return 1;
  }
  bf_options.crs = malloc(sizeof(char) * BF_CHARSMAX);

  if (bf_options.crs == NULL) {
    fprintf(stderr, "Error: can't allocate enough memory!\n");
    return 1;
  }
  bf_options.crs[0] = 0;

  for (; tmp[i]; i++) {
    if (bf_options.disable_symbols) {
      if (add_single_char(tmp[i], flags, &crs_len) == -1)
        return 1;
    } else {
      switch (tmp[i]) {
      case 'a':
        crs_len += 26;
        if (BF_CHARSMAX - crs_len < 1) {
          free(bf_options.crs);
          fprintf(stderr, "Error: charset specification exceeds %d characters.\n", BF_CHARSMAX);
          return 1;
        } else if (flags & BF_LOWER) {
          free(bf_options.crs);
          fprintf(stderr, "Error: 'a' specified more than once in charset!\n");
          return 1;
        } else {
          strcat(bf_options.crs, "abcdefghijklmnopqrstuvwxyz");
          flags |= BF_LOWER;
        }
        break;

      case 'A':
        crs_len += 26;
        if (BF_CHARSMAX - crs_len < 1) {
          free(bf_options.crs);
          fprintf(stderr, "Error: charset specification exceeds %d characters.\n", BF_CHARSMAX);
          return 1;
        } else if (flags & BF_UPPER) {
          free(bf_options.crs);
          fprintf(stderr, "Error: 'A' specified more than once in charset!\n");
          return 1;
        } else {
          strcat(bf_options.crs, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
          flags |= BF_UPPER;
        }
        break;

      case '1':
        crs_len += 10;
        if (BF_CHARSMAX - crs_len < 1) {
          free(bf_options.crs);
          fprintf(stderr, "Error: charset specification exceeds %d characters.\n", BF_CHARSMAX);
          return 1;
        } else if (flags & BF_NUMS) {
          free(bf_options.crs);
          fprintf(stderr, "Error: '1' specified more than once in charset!\n");
          return 1;
        } else {
          strcat(bf_options.crs, "0123456789");
          flags |= BF_NUMS;
        }
        break;

      default:
        if (add_single_char(tmp[i], flags, &crs_len) == -1)
          return 1;
        break;
      }
    }
  }

  bf_options.crs_len = crs_len;
  bf_options.current = bf_options.from;

  memset((char *)bf_options.state, 0, sizeof(bf_options.state));

  if (debug)
    printf("[DEBUG] bfg INIT: from %u, to %u, len: %u, set: %s\n", bf_options.from, bf_options.to, bf_options.crs_len, bf_options.crs);

  return 0;
}

uint64_t bf_get_pcount() {
  int32_t i;
  double count = 0;
  uint64_t foo;

  for (i = bf_options.from; i <= bf_options.to; i++)
    count += (pow((double)bf_options.crs_len, (double)i));
  if (count >= 0xffffffff) {
    fprintf(stderr, "\n[ERROR] definition for password bruteforce (-x) "
                    "generates more than 4 billion passwords - this is not a bug in the program, it is just not feasible to try so many attempts. Try a calculator how long that would take. duh.\n");
    exit(-1);
  }

  foo = count / 1;
  return foo;
}

char *bf_next() {
  int32_t i, pos = bf_options.current - 1;

  if (bf_options.current > bf_options.to)
    return NULL; // we are done

  if ((bf_options.ptr = malloc(BF_CHARSMAX)) == NULL) {
    fprintf(stderr, "Error: Can not allocate memory for -x data!\n");
    return NULL;
  }

  for (i = 0; i < bf_options.current; ++i)
    bf_options.ptr[i] = bf_options.crs[bf_options.state[i]];
  // we don't subtract the same depending on wether the length is odd or even
  bf_options.ptr[bf_options.current] = 0;

  if (debug) {
    printf("[DEBUG] bfg IN: len %u, from %u, current %u, to %u, state:", bf_options.crs_len, bf_options.from, bf_options.current, bf_options.to);
    for (i = 0; i < bf_options.current; i++)
      printf(" %u", bf_options.state[i]);
    printf(", x: %s\n", bf_options.ptr);
  }

  // we revert the ordering of the bruteforce to fix the first static character
  while (pos >= 0 && (++bf_options.state[pos]) >= bf_options.crs_len) {
    bf_options.state[pos] = 0;
    pos--;
  }

  if (pos < 0 || pos >= bf_options.current) {
    bf_options.current++;
    memset((char *)bf_options.state, 0, sizeof(bf_options.state));
  }

  return bf_options.ptr;
}

#endif


================================================
FILE: bfg.h
================================================
/*    (c) 2008 Jan Dlabal <dlabaljan@gmail.com>                               */
/*                                                                            */
/*     This file is part of the bfg.                                          */
/*                                                                            */
/*     bfgen is free software: you can redistribute it and/or modify          */
/*     it under the terms of the GNU General Public License as published by   */
/*     the Free Software Foundation, either version 3 of the License, or      */
/*     any later version.                                                     */
/*                                                                            */
/*     bfgen is distributed in the hope that it will be useful,               */
/*     but WITHOUT ANY WARRANTY; without even the implied warranty of         */
/*     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          */
/*     GNU General Public License for more details.                           */
/*                                                                            */
/*     You should have received a copy of the GNU General Public License      */
/*     along with bfgen. If not, see <http://www.gnu.org/licenses/>.          */

#ifndef BF_H
#define BF_H

#define BF_NAME "bfg"
#define BF_VERSION "v0.3"
#define BF_YEAR "2009"
#define BF_WEBSITE "http://houbysoft.com/bfg/"

#define BF_BUFLEN 1024
#define BF_CHARSMAX                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \
  256 /* how many max possibilities there are for characters, normally it's                                                                                                                                                                                                                                                                                                                                                                                                                                                    \
         2^8 = 256 */

#define BF_LOWER 1
#define BF_UPPER 2
#define BF_NUMS 4

typedef struct {
  unsigned char from;
  unsigned char to;
  unsigned char current;
  unsigned char state[BF_CHARSMAX]; /* which position has which character */
  unsigned char pos;                /* where in current string length is the position */
  unsigned char crs_len;            /* length of selected charset */
  char *arg;                        /* argument received for bfg commandline option */
  char *crs;                        /* internal representation of charset */
  char *ptr;                        /* ptr to the last generated password */
  uint32_t disable_symbols;
} bf_option;

extern bf_option bf_options;

#ifdef HAVE_MATH_H
extern uint64_t bf_get_pcount();
extern int32_t bf_init(char *arg);
extern char *bf_next();
#endif

#endif


================================================
FILE: configure
================================================
#!/bin/sh
#
# uname -s = Linux | OpenBSD | FreeBSD | Darwin
# uname -m = i636 or x86_64

if [ "$1" = "-h" -o "$1" = "--help" ]; then
  echo Options:
  echo "  --prefix=path              path to install hydra and its datafiles to"
  echo "  --fhs                      install according to the File System Hierarchy Standard"
  echo "  --with-oracle=prefix       prefix for oracle include dir"
  echo "  --with-oracle-lib=prefix   prefix for oracle lib dir"
  echo "  --with-ssl=prefix          prefix for SSL headers"
  echo "  --with-ssl-lib=prefix      prefix for SSL libraries"
  echo "  --disable-xhydra           disable compilation of hydra GUI"
  echo "  --nostrip                  do not per default strip binaries before install"
  echo "  --debug                    show debug output to trace errors"
  echo "  --help                     this here"
  echo
  echo If the CC environment variable is set, this is used as the compiler for the configure tests. The default is \"gcc\" otherwise.
  echo You can also set PKG_CONFIG if necessary.
  exit 0
fi

test -z "$CC" && CC=gcc
test -z "$PKG_CONFIG" && PKG_CONFIG=pkg-config

FHS=""
SIXFOUR=""
DEBUG=""
PREFIX=""
NOSTRIP=""
ORACLE_PATH=""
ORACLE_IPATH=""
WORACLE_PATH=""
WORACLE_LIB_PATH=""
SSL_PATH=""
SSL_IPATH=""
WSSL_PATH=""
WSSL_LIB_PATH=""
CURSES_PATH=""
CURSES_IPATH=""
CRYPTO_PATH=""
GPGERROR_IPATH=""
IDN_PATH=""
IDN_IPATH=""
PR29_IPATH=""
PCRE_PATH=""
PCRE_IPATH=""
POSTGRES_PATH=""
FIREBIRD_PATH=""
FIREBIRD_IPATH=""
MYSQL_PATH=""
MYSQL_IPATH=""
MCACHED_PATH=""
MCACHED_IPATH=""
MONGODB2_PATH=""
MONGODB2_IPATH=""
BSON2_PATH=""
BSON2_IPATH=""
MONGODB_PATH=""
MONGODB_IPATH=""
BSON_PATH=""
BSON_IPATH=""
AFP_PATH=""
AFP_IPATH=""
NCP_PATH=""
NCP_IPATH=""
SVN_PATH=""
SVN_IPATH=""
APR_IPATH=""
SAPR3_PATH=""
SAPR3_IPATH=""
SSH_PATH=""
SSH_IPATH=""
NSL_PATH=""
SOCKET_PATH=""
MANDIR=""
XHYDRA_SUPPORT=""
FREERDP2_PATH=""
WINPR2_PATH=""
FREERDP3_PATH=""
WINPR3_PATH=""
SMBC_PATH=""
SMBC_IPATH=""

if [ '!' "X" = "X$*" ]; then
  while [ $# -gt 0 ] ; do
    if [ "X" = "X$PREFIX" ]; then
  	  PREFIX_TMP=`echo "$1"|sed 's/.*--prefix=//'`
	  if [ "$PREFIX_TMP" != "$1" ]; then
		  PREFIX=$PREFIX_TMP
	  fi
    fi
    if [ "X" = "X$NOSTRIP" ]; then
  	  NOSTRIP_TMP=`echo "$1"|sed 's/.*--nostrip//'`
	  if [ -z "$NOSTRIP_TMP" ]; then
		  NOSTRIP="yes"
	  fi
    fi
    if [ "X" = "X$FHS" ]; then
  	  FHS_TMP=`echo "$1"|sed 's/.*--fhs//'`
	  if [ -z "$FHS_TMP" ]; then
		  FHS="yes"
	  fi
    fi
    if [ "X" = "X$DEBUG" ]; then
  	  DEBUG_TMP=`echo "$1"|sed 's/.*--debug//'`
	  if [ -z "$DEBUG_TMP" ]; then
		  DEBUG="yes"
	  fi
    fi
    if [ "X" = "X$XHYDRA_SUPPORT" ]; then
       XHYDRA_SUPPORT_TMP=`echo "$1"|sed 's/.*--disable-xhydra//'`
       if [ -z "$XHYDRA_SUPPORT_TMP" ]; then
	     XHYDRA_SUPPORT="disable"
       fi
    fi
    if [ "X" = "X$WORACLE_PATH" ]; then
  	  WORACLE_PATH_TMP=`echo "$1"|sed 's/.*--with-oracle=//'`
	  if [ "$WORACLE_PATH_TMP" != "$1" ]; then
		  WORACLE_PATH="$WORACLE_PATH_TMP"
	  fi
    fi
    if [ "X" = "X$WORACLE_LIB_PATH" ]; then
  	  WORACLE_LIB_PATH_TMP=`echo "$1"|sed 's/.*--with-oracle-lib=//'`
	  if [ "$WORACLE_LIB_PATH_TMP" != "$1" ]; then
		  WORACLE_LIB_PATH="$WORACLE_LIB_PATH_TMP"
	  fi
    fi
    shift
  done
fi

echo
echo "Starting hydra auto configuration ..."
rm -f Makefile.in
SYSS=`uname -s 2> /dev/null`
SYSO=`uname -o 2> /dev/null`
SYSM=`uname -m 2> /dev/null`
if [ "$SYSS" = "Linux" -o "$SYSS" = "OpenBSD" -o "$SYSS" = "FreeBSD" -o "$SYSS" = "NetBSD" -o "$SYSS" = "Darwin" ]; then
  SF=`uname -m | grep 64`
  if [ `uname -m` = "s390x" ]; then
    SF=64
  fi
  if [ "x$SF" = "x" ]; then
    SIXFOUR=""
    echo Detected 32 Bit $SYSS OS
  else
    SIXFOUR=64
    echo Detected 64 Bit $SYSS OS
  fi
fi
# On macOS /usr/include only exists if one has installed the Command Line Tools package.
# If this is an Xcode-only system we need to look inside the SDK for headers.
SDK_PATH=""
if [ "$SYSS" = "Darwin" -a ! -d "/usr/include" ]; then
  SDK_PATH=`xcrun --show-sdk-path`
fi
LIBDIRS=`cat /etc/ld.so.conf /etc/ld.so.conf.d/* 2> /dev/null | grep -v '^#' | sort | uniq`
if [ "$SIXFOUR" = "64" ]; then
  LIBDIRS="$LIBDIRS /lib64 /usr/lib64 /usr/local/lib64 /opt/local/lib64"
fi
if [ -d "/Library/Developer/CommandLineTools/usr/lib" ]; then
  LIBDIRS="$LIBDIRS /Library/Developer/CommandLineTools/usr/lib /Library/Developer/CommandLineTools/lib"
fi
LIBDIRS="$LIBDIRS /lib /usr/lib /usr/local/lib /opt/local/lib /mingw64/lib /mingw64/bin"
INCDIRS="$SDK_PATH/usr/include /usr/local/include /opt/include /opt/local/include /mingw64/include"
if [ -n "$PREFIX" ]; then
    if [ -d "$PREFIX/lib" ]; then
        LIBDIRS="$LIBDIRS $PREFIX/lib"
    fi
    if [ -d "$PREFIX/include" ]; then
        INCDIRS="$INCDIRS $PREFIX/include"
    fi
fi
STRIP="strip"
echo

echo "Checking for zlib (libz/zlib.h) ..."
for i in $INCDIRS; do
   if [ -f "$i/zlib.h" ]; then
	HAVE_ZLIB="y"
   fi
done

if [ -n "$HAVE_ZLIB" ]; then
   echo "                                ... found"
else
   echo "                                ... zlib not found, gzip support disabled"
fi

echo "Checking for sybdb (sybdb.h) ..."
for i in $INCDIRS; do
   if [ -f "$i/sybdb.h" ]; then
	HAVE_SYBDB="y"
   fi
done

if [ -n "$HAVE_SYBDB" ]; then
   echo "                                ... found"
else
   echo "                                ... sybdb not found, MSSQL module will lack TDSv7 support"
fi

echo "Checking for sybfront (sybfront.h) ..."
for i in $INCDIRS; do
   if [ -f "$i/sybfront.h" ]; then
	HAVE_SYBFRONT="y"
   fi
done

if [ -n "$HAVE_SYBFRONT" ]; then
   echo "                                ... found"
else
   echo "                                ... sybfront not found, MSSQL module will lack TDSv7 support"
fi

echo "Checking for openssl (libssl/libcrypto/ssl.h/sha.h) ..."
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: SSL_LIB=$LIBDIRS `ls -d /*ssl /usr/*ssl /opt/*ssl /usr/local/*ssl /opt/local/*ssl /*ssl/lib /usr/*ssl/lib /opt/*ssl/lib /usr/local/*ssl/lib /opt/local/*ssl/lib 2> /dev/null`
   echo DEBUG: SSL_INC=$INCDIRS `ls -d /*ssl/include /opt/*ssl/include /usr/*ssl/include /usr/local/*ssl/include 2> /dev/null`
fi

if [ "X" != "X$WSSL_LIB_PATH" ]; then
    SSL_PATH="$i"
    CRYPTO_PATH="$i"
else
  for i in $LIBDIRS \
  /*ssl /usr/*ssl /opt/*ssl /usr/local/*ssl /opt/local/*ssl \
  /*ssl/lib /usr/*ssl/lib /opt/*ssl/lib /usr/local/*ssl/lib /opt/local/*ssl/lib
  do
    if [ "X" = "X$SSL_PATH" ]; then
        if [ -f "$i/libssl.so" -o -f "$i/libssl.dylib" -o -f "$i/libssl.a" ]; then
            SSL_PATH="$i"
        fi
    fi
    if [ "X" = "X$SSL_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libssl.so* /bin/cygssl*.dll 2> /dev/null | grep ssl`
        if [ -n "$TMP_LIB" ]; then
          SSL_PATH="$i"
        fi
    fi
    if [ "X" = "X$CRYPTO_PATH" ]; then
        if [ -f "$i/libcrypto.so" -o -f "$i/libcrypto.dylib" -o -f "$i/libcrypto.a" ]; then
            CRYPTO_PATH="$i"
        fi
    fi
    if [ "X" = "X$CRYPTO_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libcrypto.so* /bin/cygcrypto*.dll 2> /dev/null | grep crypto`
        if [ -n "$TMP_LIB" ]; then
          CRYPTO_PATH="$i"
        fi
    fi
  done
fi

SSLNEW=""
if [ "X" = "X$SSL_PATH" ]; then
      SSL_PATH="$i"
      SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
else
  for i in $INCDIRS /*ssl/include /opt/*ssl/include /usr/*ssl/include /usr/local/*ssl/include
  do
    if [ "X" = "X$SSL_IPATH" ]; then
        if [ -f "$i/openssl/ssl.h" ]; then
            SSL_IPATH="$i"
            SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
        fi
    fi
  done
fi
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: SSL_PATH=$SSL_PATH/libssl
   echo DEBUG: CRYPTO_PATH=$CRYPTO_PATH/libcrypto
   echo DEBUG: SSL_INC=$SSL_IPATH/openssl/ssl.h
fi

if [ "X" = "X$SSL_PATH" ]; then
    SSL_IPATH=""
    CRYPTO_PATH=""
fi
if [ "X" = "X$SSL_IPATH" ]; then
    SSL_PATH=""
    CRYPTO_PATH=""
fi
if [  -n "$SSL_PATH" -a "X" = "X$SSLNEW" ]; then
    echo "                                                    ... found but OLD"
    echo "NOTE: your OpenSSL package is outdated, update it!"
fi
if [ -n "$SSL_PATH" -a '!' "X" = "X$SSLNEW" ]; then
    echo "                                                    ... found"
fi
if [ "X" = "X$SSL_PATH" ]; then
    echo "                                                    ... NOT found, SSL support disabled"
    echo "Get it from http://www.openssl.org"
fi
if [ "$SSL_IPATH" = "/usr/include" ]; then
    SSL_IPATH=""
fi

echo "Checking for gcrypt (libgcrypt/gpg-error.h) ..."
for i in $LIBDIRS ; do
    if [ -f "$i/libgcrypt.so" -o -f "$i/libgcrypt.dylib" -o -f "$i/libgcrypt.a" -o -f "$i/libgcrypt.dll.a" -o -f "$i/libgcrypt.la" ]; then
	  HAVE_GCRYPT="y"
    fi
done

for i in $INCDIRS ; do
    if [ "X" = "X$GPGERROR_IPATH" ]; then
        TMP_PATH=`/bin/ls $i/$SYSM*/gpg-error.h 2> /dev/null`
        if [ -n "$TMP_PATH" ]; then
            GPGERROR_IPATH="$i"
        else
            if [ -f "$i/gpg-error.h" ]; then
                GPGERROR_IPATH="$i"
            fi
        fi
    fi
done

if [ -n "$HAVE_GCRYPT" -a "X" != "X$GPGERROR_IPATH" ]; then
    echo "                                            ... found"
else
    echo "                                            ... gcrypt not found, radmin2 module disabled"
    HAVE_GCRYPT=""
fi

echo "Checking for idn (libidn) ..."
for i in $LIBDIRS ; do
    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"
        fi
    fi
    if [ "X" = "X$IDN_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libidn.so* /bin/libidn*.dll 2> /dev/null | grep ssl`
        if [ -n "$TMP_LIB" ]; then
          IDN_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" != "X$IDN_PATH" ]; then
        if [ -f "$i/stringprep.h" ]; then
            IDN_IPATH="$i"
        fi
    fi
    if [ "X" != "X$IDN_PATH" ]; then
        if [ -f "$i/pr29.h" ]; then
            PR29_IPATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: IDN_PATH=$IDN_PATH/libidn
   echo DEBUG: IDN_IPATH=$IDN_IPATH/stringprep.h
   echo DEBUG: PR29_IPATH=$PR29_IPATH/pr29.h
fi
if [ -n "$IDN_PATH" -a -n "$IDN_IPATH" ]; then
    echo "                          ... found"
fi
#pr29 is optional
if [ "X" = "X$IDN_PATH" -o "X" = "X$IDN_IPATH" ]; then
    echo "                          ... NOT found, unicode logins and passwords will not be supported"
    IDN_PATH=""
    IDN_IPATH=""
    PR29_IPATH=""
fi

echo "Checking for curses (libcurses/term.h) ..."
for i in $LIBDIRS; do
    if [ "X" = "X$CURSES_PATH" ]; then
        if [ -f "$i/libcurses.so" -o -f "$i/libcurses.dylib" -o -f "$i/libcurses.a"   ]; then
            CURSES_PATH="$i"
        fi
    fi
    if [ "X" = "X$CURSES_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libcurses.so.* 2> /dev/null | grep curses.`
        if [ -n "$TMP_LIB" ]; then
            CURSES_PATH="$i"
        fi
    fi
    if [ "X" = "X$CURSES_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libcurses.dll* 2> /dev/null | grep curses.`
        if [ -n "$TMP_LIB" ]; then
            CURSES_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" != "X$CURSES_PATH" ]; then
        if [ -f "$i/term.h" ]; then
            CURSES_IPATH="$i"
        fi
        if [ -f "$i/ncurses/term.h" ]; then
            CURSES_IPATH="$i/ncurses"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: CURSES_PATH=$CURSES_PATH/libcurses
   echo DEBUG: CURSES_IPATH=$CURSES_IPATH/term.h
fi
if [ -n "$CURSES_PATH" -a -n "$CURSES_IPATH" ]; then
    echo "                                       ... found, color output enabled"
fi
if [ "X" = "X$CURSES_PATH" -o "X" = "X$CURSES_IPATH" ]; then
    echo "                                       ... NOT found, color output disabled"
    CURSES_PATH=""
    CURSES_IPATH=""
fi

echo "Checking for pcre2 (libpcre/pcre.h) ..."
for i in $LIBDIRS ; do
    if [ "X" = "X$PCRE_PATH" ]; then
        if [ -f "$i/libpcre2-8.so" -o -f "$i/libpcre2-8.dylib" -o -f "$i/libpcre2-8.a"   ]; then
            PCRE_PATH="$i"
        fi
    fi
    if [ "X" = "X$PCRE_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libpcre2*.so* 2> /dev/null | grep libpcre.`
        if [ -n "$TMP_LIB" ]; then
          PCRE_PATH="$i"
        fi
    fi
    if [ "X" = "X$PCRE_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libpcre2*.dll* 2> /dev/null | grep libpcre.`
        if [ -n "$TMP_LIB" ]; then
          PCRE_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" != "X$PCRE_PATH" ]; then
        if [ -f "$i/pcre2.h" ]; then
            PCRE_IPATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: PCRE_PATH=$PCRE_PATH/libpcre
   echo DEBUG: PCRE_IPATH=$PCRE_IPATH/pcre2.h
fi
if [ -n "$PCRE_PATH" -a -n "$PCRE_IPATH" ]; then
    echo "                                    ... found"
fi
if [ "X" = "X$PCRE_PATH" -o "X" = "X$PCRE_IPATH" ]; then
    echo "                                    ... NOT found, server response checks will be less reliable"
    PCRE_PATH=""
    PCRE_IPATH=""
fi

echo "Checking for Postgres (libpq/libpq-fe.h) ..."
#if [ "$SYSO" = "Cygwin" ]; then
#    echo "                                             ... DISABLED - postgres is buggy in Cygwin at the moment"
#    POSTGRES_PATH=""
#    POSTGRES_IPATH=""
#else
  for i in $LIBDIRS ; do
    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"
        fi
    fi
    if [ "X" = "X$POSTGRES_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libpq.so* 2> /dev/null | grep pq`
        if [ -n "$TMP_LIB" ]; then
          POSTGRES_PATH="$i"
        fi
    fi
    if [ "X" = "X$POSTGRES_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libpq.dll* 2> /dev/null | grep pq`
        if [ -n "$TMP_LIB" ]; then
          POSTGRES_PATH="$i"
        fi
    fi
  done
  POSTGRES_IPATH=
  for i in $INCDIRS \
    /opt/p*sql*/include /usr/*p*sql*/include /usr/local/*psql*/include /mingw64/include
  do
    if [ "X" = "X$POSTGRES_IPATH" ]; then
        if [ -f "$i/libpq-fe.h" ]; then
            POSTGRES_IPATH="$i"
        fi
        if [ -f "$i/pgsql/libpq-fe.h" ]; then
            POSTGRES_IPATH="$i/pgsql"
        fi
        if [ -f "$i/postgresql/libpq-fe.h" ]; then
            POSTGRES_IPATH="$i/postgresql"
        fi
    fi
  done

if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: POSTGRES_PATH=$POSTGRES_PATH/libpq
   echo DEBUG: POSTGRES_IPATH=$POSTGRES_IPATH/libpq-fe.h
fi
  if [ -n "$POSTGRES_PATH" -a -n "$POSTGRES_IPATH" ]; then
    echo "                                         ... found"
  fi
  if [ "X" = "X$POSTGRES_PATH" -o "X" = "X$POSTGRES_IPATH" ]; then
    echo "                                         ... NOT found, module postgres disabled"
    POSTGRES_PATH=""
    POSTGRES_IPATH=""
  fi
#fi

echo "Checking for SVN (libsvn_client-1/libapr-1/libaprutil-1) ..."
for i in $LIBDIRS ; do
    if [ "X" = "X$SVN_PATH" ]; then
        if [ -f "$i/libsvn_client-1.so" ]; then
            SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        if [ -f "$i/libapr-1.so" -a -f "$i/libaprutil-1.so" ]; then
	    APR_PATH="$i"
        fi
    fi
    if [ "X" = "X$SVN_PATH" ]; then
        if [ -f "$i/libsvn_client-1.dll.a" ]; then
            SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        if [ -f "$i/libapr-1.dll.a" -a -f "$i/libaprutil-1.dll.a" ]; then
	    APR_PATH="$i"
        fi
    fi
    if [ "X" = "X$SVN_PATH" ]; then
        if [ -f "$i/libsvn_client-1.dylib" ]; then
            SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        if [ -f "$i/libapr-1.dylib" -a -f "$i/libaprutil-1.dylib" ]; then
	    APR_PATH="$i"
        fi
    fi
    if [ "X" = "X$SVN_PATH" ]; then
        if [ -f "$i/libsvn_client-1.a" ]; then
            SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        if [ -f "$i/libapr-1.a" -a -f "$i/libaprutil-1.a" ]; then
	    APR_PATH="$i"
        fi
    fi
    if [ "X" = "X$SVN_PATH" ]; then
        if [ -f "$i/libsvn_client-1.0.dylib" ]; then
            SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        if [ -f "$i/libapr-1.0.dylib" -a -f "$i/libaprutil-1.0.dylib" ]; then
	    APR_PATH="$i"
        fi
    fi
    if [ "X" = "X$SVN_PATH" ]; then
        TMP_LIB1=`/bin/ls $i/libsvn_client*.so* 2> /dev/null | grep libsvn_client.`
        if [ -n "$TMP_LIB1" ]; then
          SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        TMP_LIB2=`/bin/ls $i/libapr-1*.so* 2> /dev/null | grep libsvn_client.`
        TMP_LIB3=`/bin/ls $i/libaprutil-1*.so* 2> /dev/null | grep libsvn_client.`
        if [ -n "$TMP_LIB2" -a -n "$TMP_LIB3" ]; then
	  APR_PATH="$i"
        fi
    fi
    if [ "X" = "X$SVN_PATH" ]; then
        TMP_LIB1=`/bin/ls $i/libsvn_client*.dll* 2> /dev/null | grep libsvn_client.`
        if [ -n "$TMP_LIB1" ]; then
          SVN_PATH="$i"
        fi
    fi
    if [ "X" = "X$APR_PATH" ]; then   
        TMP_LIB2=`/bin/ls $i/libapr-1*.dll* 2> /dev/null | grep libsvn_client.`
        TMP_LIB3=`/bin/ls $i/libaprutil-1*.dll* 2> /dev/null | grep libsvn_client.`
        if [ -n "$TMP_LIB2" -a -n "$TMP_LIB3" ]; then
	  APR_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" = "X$SVN_IPATH" ]; then
        if [ -d "$i/subversion-1" ]; then
            SVN_IPATH="$i/subversion-1"
        fi
        if [ -d "$i/svn" ]; then
            SVN_IPATH="$i/svn"
        fi
    fi  
    if [ "X" = "X$APR_IPATH" ]; then
        if [ -d "$i/apr-1.0" ]; then
            APR_IPATH="$i/apr-1.0"
        fi
        if [ -d "$i/apr-1" ]; then
            APR_IPATH="$i/apr-1"
        fi
        if [ -d "$i/apr" ]; then
            APR_IPATH="$i/apr"
        fi
    fi  
done
SYS_PARAM=""
if [ -f "$SDK_PATH/usr/include/sys/param.h" ]; then
  SYS_PARAM=-DHAVE_SYS_PARAM_H
fi
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: SVN_PATH=$SVN_PATH/libsvn_client-1
   echo DEBUG: APR_PATH=$APR_PATH/libapr
   echo DEBUG: SVN_IPATH=$APR_IPATH/
   echo DEBUG: APR_IPATH=$APR_IPATH/
fi

if [ "X" = "X$SVN_PATH" -o "X" = "X$SVN_IPATH" -o "X" = "X$APR_IPATH" ]; then
    SVN_PATH=""
    SVN_IPATH=""
    APR_IPATH=""
fi
if [ "$SVN_IPATH" = "/usr/include" ]; then
    SVN_IPATH=""
fi
if [ "$APR_IPATH" = "/usr/include" ]; then
    APR_IPATH=""
fi

if [ -n "$SVN_PATH" -a -n "$APR_PATH" ]; then
    echo "                                                         ... found"
fi
if [ "X" = "X$SVN_PATH" -o "X" = "X$APR_PATH" ]; then
    echo "                                                         ... NOT found, module svn disabled"
fi

echo "Checking for firebird (libfbclient) ..."
for i in $LIBDIRS ; do
    if [ "X" = "X$FIREBIRD_PATH" ]; then
        if [ -f "$i/libfbclient.so" -o -f "$i/libfbclient.dylib" -o -f "$i/libfbclient.a" ]; then
            FIREBIRD_PATH="$i"
        fi
    fi
    if [ "X" = "X$FIREBIRD_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libfbclient.so.* 2> /dev/null | grep libfbclient.`
        if [ -n "$TMP_LIB" ]; then
          FIREBIRD_PATH="$i"
        fi
    fi
    if [ "X" = "X$FIREBIRD_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libfbclient.dll* 2> /dev/null | grep libfbclient.`
        if [ -n "$TMP_LIB" ]; then
          FIREBIRD_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" != "X$FIREBIRD_PATH" ]; then
        if [ -f "$i/ibase.h" ]; then
            FIREBIRD_IPATH="$i"
        fi
        if [ -f "$i/firebird/ibase.h" ]; then
            FIREBIRD_IPATH="$i/firebird"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: FIREBIRD_PATH=$FIREBIRD_PATH/libfbclient
   echo DEBUG: FIREBIRD_IPATH=$FIREBIRD_IPATH/ibase.h
fi
if [ -n "$FIREBIRD_PATH" -a -n "$FIREBIRD_IPATH" ]; then
    echo "                                    ... found"
fi
if [ "X" = "X$FIREBIRD_PATH" -o "X" = "X$FIREBIRD_IPATH" ]; then
    echo "                                    ... NOT found, module firebird disabled"
    FIREBIRD_PATH=""
    FIREBIRD_IPATH=""
fi

echo "Checking for MYSQL client (libmysqlclient/math.h) ..."
for i in $LIBDIRS ; do
    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"
        fi
    fi
    if [ "X" = "X$MYSQL_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libmysqlclient.so.* 2> /dev/null | grep libmysqlclient.`
        if [ -n "$TMP_LIB" ]; then
          MYSQL_PATH="$i"
        fi
    fi
    if [ "X" = "X$MYSQL_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libmysqlclient.dll* 2> /dev/null | grep libmysqlclient.`
        if [ -n "$TMP_LIB" ]; then
          MYSQL_PATH="$i"
        fi
    fi
done
MYSQLINSUBDIR=""
for i in $INCDIRS ; do
    if [ "X" != "X$MYSQL_PATH" ]; then
        if [ -f "$i/mysql/mysql.h" ]; then
            MYSQL_IPATH="$i/mysql"
            MYSQLINSUBDIR="mysql/"
        fi
        if [ -f "$i/mysql.h" ]; then
            MYSQL_IPATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: MYSQL_PATH=$MYSQL_PATH/libmysqlclient
   echo DEBUG: MYSQL_IPATH=$MYSQL_IPATH/mysql.h
fi
MATH=""
if [ -f "$SDK_PATH/usr/include/math.h" ]; then
   MATH="-DHAVE_MATH_H"
   if [ -n "$MYSQL_PATH" -a -n "$MYSQL_IPATH" -a -n "$MATH" ]; then
      echo "                                                  ... found"
   else
      echo "                                                  ... NOT found, module Mysql will not support version > 4.x"
      MYSQL_PATH=""
      MYSQL_IPATH=""
   fi
else
      echo "                                       ... math.h not found, module Mysql disabled"
fi
echo "Checking for AFP (libafpclient) ..."
for i in $LIBDIRS ; do
    if [ "X" = "X$AFP_PATH" ]; then
        if [ -f "$i/libafpclient.so" -o -f "$i/libafpclient.so" -o -f "$i/libafpclient.a"   ]; then
            AFP_PATH="$i"
        fi
    fi
    if [ "X" = "X$AFP_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libafpclient.so.* 2> /dev/null | grep libafpclient.`
        if [ -n "$TMP_LIB" ]; then
          AFP_PATH="$i"
        fi
    fi
    if [ "X" = "X$AFP_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libafpclient.dll* 2> /dev/null | grep libafpclient.`
        if [ -n "$TMP_LIB" ]; then
          AFP_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" != "X$AFP_PATH" ]; then
        if [ -f "$i/afpfs-ng/afp.h" ]; then
            AFP_IPATH="$i/afpfs-ng"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: AFP_PATH=$AFP_PATH/libafpclient
   echo DEBUG: AFP_IPATH=$AFP_IPATH/afp.h
fi
if [ -n "$AFP_PATH" -a -n "$AFP_IPATH" ]; then
    echo "                                ... found"
fi
if [ "X" = "X$AFP_PATH" -o "X" = "X$AFP_IPATH" ]; then
    echo "                                ... NOT found, module Apple Filing Protocol disabled - Apple sucks anyway"
    AFP_PATH=""
    AFP_IPATH=""
fi

echo "Checking for NCP (libncp/nwcalls.h) ..."
for i in $LIBDIRS ; do
    if [ "X" = "X$NCP_PATH" ]; then
        if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a"  ]; then
            NCP_PATH="$i"
        fi
    fi
    if [ "X" = "X$NCP_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.`
        if [ -n "$TMP_LIB" ]; then
            NCP_PATH="$i"
        fi
    fi
    if [ "X" = "X$NCP_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.`
        if [ -n "$TMP_LIB" ]; then
            NCP_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" != "X$NCP_PATH" ]; then
        if [ -f "$i/ncp/nwcalls.h" ]; then
            NCP_IPATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: NCP_PATH=$NCP_PATH/libncp
   echo DEBUG: NCP_IPATH=$NCP_IPATH/ncp/nwcalls.h
fi
if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then
    echo "                                    ... found"
fi
if [ "X" = "X$NCP_PATH" -o "X" = "X$NCP_IPATH" ]; then
    echo "                                    ... NOT found, module NCP disabled"
    NCP_PATH=""
    NCP_IPATH=""
fi

echo "Checking for SAP/R3 (librfc/saprfc.h) ..."
for i in $LIBDIRS  ; do
    if [ "X" = "X$SAPR3_PATH" ]; then
        if [ -f "$i/librfc.a" -o -f "$i/librfc.dylib" -o "$i/librfc32.dll" ]; then
            SAPR3_PATH="$i"
        fi
    fi
    if [ "X" = "X$SAPR3_PATH" ]; then
        TMP_LIB=`/bin/ls $i/librfc.* $i/librfc32.* 2> /dev/null | grep librfc`
        if [ -n "$TMP_LIB" ]; then
          SAPR3_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" = "X$SAPR3_IPATH" ]; then
        if [ -f "$i/saprfc.h" ]; then
            SAPR3_IPATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: SAPR3_PATH=$SAPR3_PATH/librfc
   echo DEBUG: SAPR3_IPATH=$SAPR3_IPATH/saprfc.h
fi
if [ "X" = "X$SAPR3_PATH" ]; then
    SAPR3_IPATH=""
fi
if [ "X" = "X$SAPR3_IPATH" ]; then
    SAPR3_PATH=""
fi
if [ -n "$SAPR3_PATH" ]; then
    echo "                                      ... found"
fi
if [ "X" = "X$SAPR3_PATH" ]; then
    echo "                                      ... NOT found, module sapr3 disabled"
    echo "Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp"
fi
if [ "$SAPR3_IPATH" = "/usr/include" ]; then
    SAPR3_IPATH=""
fi

echo "Checking for libssh (libssh/libssh.h) ..."
for i in $LIBDIRS ; do
    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"
        fi
    fi
    if [ "X" = "X$SSH_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libssh.so* 2> /dev/null | grep libssh.`
        if [ -n "$TMP_LIB" ]; then
          SSH_PATH="$i"
        fi
    fi
    if [ "X" = "X$SSH_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libssh.dll* 2> /dev/null | grep libssh.`
        if [ -n "$TMP_LIB" ]; then
          SSH_PATH="$i"
        fi
    fi
done
for i in $INCDIRS ; do
    if [ "X" = "X$SSH_IPATH" ]; then
        if [ -f "$i/libssh/libssh.h" ]; then
            SSH_IPATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: SSH_PATH=$SSH_PATH/libssh
   echo DEBUG: SSH_IPATH=$SSH_IPATH/libssh/libssh.h
fi
if [ "X" = "X$SSH_PATH" ]; then
    SSH_IPATH=""
fi
if [ "X" = "X$SSH_IPATH" ]; then
    SSH_PATH=""
fi
if [ -n "$SSH_PATH" ]; then
    echo "                                      ... found"
fi
if [ "X" = "X$SSH_PATH" ]; then
    echo "                                      ... NOT found, module ssh disabled"
    echo 'Get it from http://www.libssh.org'
fi
if [ "$SSH_IPATH" = "/usr/include" ]; then
    SSH_IPATH=""
fi

echo "Checking for Oracle (libocci/libclntsh/oci.h/libaio/liboci) ..."
#assume if we find oci.h other headers should also be in that dir
#for libs we will test the 2
if [ "X" != "X$WORACLE_PATH" ]; then
    INCDIRS="$INCDIRS $WORACLE_PATH"
fi
if [ "X" != "X$WORACLE_LIB_PATH" ]; then
    LIBDIRS="$LIBDIRS $WORACLE_LIB_PATH"
fi
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: ORACLE_LIB=$LIBDIRS
   echo DEBUG: ORACLE_INC=$INCDIRS
fi

for i in $LIBDIRS ; do
    if [ "X" = "X$ORACLE_PATH" ]; then
        if [ -f "$i/libocci.so" -a -f "$i/libclntsh.so" ]; then
            ORACLE_PATH="$i"
        fi
    fi
    if [ "X" = "X$ORACLE_PATH" ]; then
        if [ -f "$i/libocci.dylib" -a -f "$i/libclntsh.dylib" ]; then
            ORACLE_PATH="$i"
        fi
    fi
    if [ "X" = "X$ORACLE_PATH" ]; then
        if [ -f "$i/libocci.a" -a -f "$i/libclntsh.a" ]; then
            ORACLE_PATH="$i"
        fi
    fi
    if [ "X" = "X$ORACLE_PATH" ]; then
        if [ -f "$i/liboci.a" -a -f "$i/oci.dll" ]; then
            ORACLE_PATH="$i"
        fi
    fi
    if [ "X" = "X$ORACLE_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libocci.so.* 2> /dev/null | grep occi.`
        if [ -n "$TMP_LIB" ]; then
            ORACLE_PATH="$i"
        fi
        if [ "X" != "X$ORACLE_PATH" ]; then
          TMP_LIB=`/bin/ls $i/libclntsh.so.* 2> /dev/null | grep clntsh.`
          if [ -z "$TMP_LIB" ]; then
            ORACLE_PATH=""
          fi
        fi
    fi
    if [ "X" = "X$ORACLE_PATH" ]; then
        TMP_LIB=`/bin/ls $i/oci.dll* 2> /dev/null | grep occi.`
        if [ -n "$TMP_LIB" ]; then
            ORACLE_PATH="$i"
        fi
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: ORACLE_PATH=$ORACLE_PATH/libocci
fi
#check for Kernel Asynchronous I/O (AIO) lib support, no need on Cygwin
if [ "X" != "X$ORACLE_PATH" -a "$SYSO" != "Cygwin" ]; then
  LIBAIO=""
  for i in $LIBDIRS ; do
     if [ "X" = "X$LIBAIO" ]; then
        if [ -f "$i/libaio.so" -o -f "$i/libaio.dylib" -o  -f "$i/libaio.a" ]; then
            LIBAIO="$i"
        fi
     fi
     if [ "X" = "X$LIBAIO" ]; then
            TMP_LIB=`/bin/ls $i/libaio.so.* 2> /dev/null | grep aio.`
            if [ -n "$TMP_LIB" ]; then
              LIBAIO="$i"
            fi
            TMP_LIB=`/bin/ls $i/libaio.dll* 2> /dev/null | grep aio.`
            if [ -n "$TMP_LIB" ]; then
              LIBAIO="$i"
            fi
     fi
  done
  if [ "X" = "X$LIBAIO" ]; then
    ORACLE_PATH=""
  fi
fi
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: ORACLE_PATH=$ORACLE_PATH/libaio
fi

for i in $INCDIRS ; do
    if [ -f "$i/oci.h" ]; then
        ORACLE_IPATH="$i"
    fi
done
if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: ORACLE_IPATH=$ORACLE_IPATH/oci.h
fi
if [ -n "$ORACLE_PATH" -a -n "$ORACLE_IPATH" ]; then
    echo "                                                            ... found"
fi
if [ "X" = "X$ORACLE_PATH" -o "X" = "X$ORACLE_IPATH" ]; then
    echo "                                                            ... NOT found, module Oracle disabled"
    echo "Get basic and sdk package from https://www.oracle.com/database/technologies/instant-client/downloads.html"
    ORACLE_PATH=""
    ORACLE_IPATH=""
fi

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

  for i in $LIBDIRS ; do
    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"
        fi
    fi
    if [ "X" = "X$MCACHED_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libmemcached.so* 2> /dev/null | grep memcached`
        if [ -n "$TMP_LIB" ]; then
          MCACHED_PATH="$i"
        fi
    fi
    if [ "X" = "X$MCACHED_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libmemcached.dll* 2> /dev/null | grep memcached`
        if [ -n "$TMP_LIB" ]; then
          MCACHED_PATH="$i"
        fi
    fi
  done

  MCACHED_IPATH=
  for i in $INCDIRS ; do
    if [ "X" = "X$MCACHED_IPATH" ]; then
        if [ -f "$i/memcached.h" ]; then
            MCACHED_IPATH="$i"
        elif [ -f "$i/libmemcached/memcached.h" ]; then
            MCACHED_IPATH="$i/libmemcached"
        elif [ -f "$i/libmemcached-1.0/memcached.h" ]; then
            MCACHED_IPATH="$i/libmemcached-1.0"
        fi
    fi
  done

if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: MCACHED_PATH=$MCACHED_PATH/libmemcached
   echo DEBUG: MCACHED_IPATH=$MCACHED_IPATH/memcached.h
fi
  if [ -n "$MCACHED_PATH" -a -n "$MCACHED_IPATH" ]; then
    echo "                                                  ... found"
  fi
  if [ "X" = "X$MCACHED_PATH" -o "X" = "X$MCACHED_IPATH" ]; then
    echo "                                                  ... NOT found, module memcached disabled"
    MCACHED_PATH=""
    MCACHED_IPATH=""
  fi

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

  for i in $LIBDIRS ; do
    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"
        fi
    fi
    if [ "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$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$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$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$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, checking for freerdp2 module next..."
    FREERDP3_PATH=""
    FREERDP3_IPATH=""
    WINPR3_PATH=""
    WINPR3_IPATH=""
  fi

  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) ..."

    for i in $LIBDIRS ; do
        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"
            fi
        fi
        if [ "X" = "X$FREERDP2_PATH" ]; then
            TMP_LIB=`/bin/ls $i/libfreerdp2*.so* 2> /dev/null | grep libfreerdp2`
            if [ -n "$TMP_LIB" ]; then
            FREERDP2_PATH="$i"
            fi
        fi
    done

    FREERDP2_IPATH=
    for i in $INCDIRS ; do
        if [ "X" = "X$FREERDP2_IPATH" ]; then
            if [ -f "$i/freerdp/freerdp.h" ]; then
                FREERDP2_IPATH="$i/freerdp2"
            fi
            if [ -f "$i/freerdp2/freerdp/freerdp.h" ]; then
                FREERDP2_IPATH="$i/freerdp2"
            fi
        fi
    done

    for i in $LIBDIRS ; do
        if [ "X" = "X$WINPR2_PATH" ]; then
            if [ -f "$i/libwinpr2.so" -o -f "$i/libwinpr2.dylib" -o -f "$i/libwinpr2.a" ]; then
                WINPR2_PATH="$i"
            fi
        fi
        if [ "X" = "X$WINPR2_PATH" ]; then
            TMP_LIB=`/bin/ls $i/libwinpr2.dll.a 2> /dev/null | grep winpr`
            if [ -n "$TMP_LIB" ]; then
            WINPR2_PATH="$i"
            fi
        fi
    done

    WINPR2_IPATH=
    for i in $INCDIRS ; do
        if [ "X" = "X$WINPR2_IPATH" ]; then
            if [ -f "$i/winpr.h" ]; then
                WINPR2_IPATH="$i"
            fi
            if [ -f "$i/winpr2/winpr/winpr.h" ]; then
                WINPR2_IPATH="$i/winpr2"
            fi
        fi
    done

    if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: FREERDP2_PATH=$FREERDP2_PATH/
    echo DEBUG: FREERDP2_IPATH=$FREERDP2_IPATH/
    echo DEBUG: WINPR2_PATH=$WINPR2_PATH/
    echo DEBUG: WINPR2_IPATH=$WINPR2_IPATH/
    fi

    if [ -n "$FREERDP2_PATH" -a -n "$FREERDP2_IPATH" -a -n "$WINPR2_PATH" -a -n "$WINPR2_IPATH" ]; then
        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"
        FREERDP2_PATH=""
        FREERDP2_IPATH=""
        WINPR2_PATH=""
        WINPR2_IPATH=""
    fi
fi

echo "Checking for Mongodb2 (mongoc-2.x.x/mongoc/mongoc.h/bson-2.x.x/bson/bson.h) ..."

  for i in $LIBDIRS ; do
    if [ "X" = "X$MONGODB2_PATH" ]; then
        if [ -f "$i/libmongoc2.so" -o -f "$i/libmongoc2.dylib" -o -f "$i/libmongoc2.a" ]; then
            MONGODB2_PATH="$i"
        fi
    fi
    if [ "X" = "X$MONGODB2_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libmongoc2.so* 2> /dev/null | grep mongoc`
        if [ -n "$TMP_LIB" ]; then
          MONGODB2_PATH="$i"
        fi
    fi
    if [ "X" = "X$MONGODB2_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libmongoc2.dll* 2> /dev/null | grep mongoc`
        if [ -n "$TMP_LIB" ]; then
          MONGODB2_PATH="$i"
        fi
    fi
  done

  MONGODB2_IPATH=
  for i in $INCDIRS ; do
    if [ "X" = "X$MONGODB2_IPATH" ]; then
        if [ -f "$i/mongoc.h" ]; then
            MONGODB2_IPATH="$i"
        fi
        if [ -f "$i/mongoc/mongoc.h" ]; then
            MONGODB2_IPATH="$i/libmongoc"
        fi
        for ii in `ls -1d $i/mongoc-2.*`; do
            if [ -f "${ii}/mongoc/mongoc.h" ]; then
                MONGODB2_IPATH="$ii"
            fi
        done
    fi
  done

 for i in $LIBDIRS ; do
    if [ "X" = "X$BSON2_PATH" ]; then
        if [ -f "$i/libbson2.so" -o -f "$i/libbson2.dylib" -o -f "$i/libbson2.a" ]; then
            BSON2_PATH="$i"
        fi
    fi
    if [ "X" = "X$BSON2_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libbson2*.so* 2> /dev/null | grep mongoc`
        if [ -n "$TMP_LIB" ]; then
          BSON2_PATH="$i"
        fi
    fi
    if [ "X" = "X$BSON2_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libbson2.dll* 2> /dev/null | grep mongoc`
        if [ -n "$TMP_LIB" ]; then
          BSON2_PATH="$i"
        fi
    fi
  done

  BSON2_IPATH=
  for i in $INCDIRS ; do
    if [ "X" = "X$BSON2_IPATH" ]; then
        if [ -f "$i/bson.h" ]; then
            BSON2_IPATH="$i"
        fi
        if [ -f "$i/libbson/bson.h" ]; then
            BSON2_IPATH="$i/libbson"
        fi
        for ii in `ls -1d $i/bson-2.*`; do
            if [ -f "${ii}/bson/bson.h" ]; then
                BSON2_IPATH="$ii"
            fi
        done
    fi
  done

if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: MONGODB2_PATH=$MONGODB2_PATH
   echo DEBUG: MONGODB2_IPATH=$MONGODB2_IPATH
   echo DEBUG: BSON2_PATH=$BSON2_PATH
   echo DEBUG: BSON2_IPATH=$BSON2_IPATH
fi

  if [ -n "$MONGODB2_PATH" -a -n "$MONGODB2_IPATH" -a -n "$BSON2_PATH" -a -n "$BSON2_IPATH" ]; then
    echo "                                                                 ... found"
  fi
  if [ "X" = "X$MONGODB2_PATH" -o "X" = "X$MONGODB2_IPATH" -o "X" = "X$BSON2_PATH" -o "X" = "X$BSON2_IPATH" ]; then
    echo "                                                                 ... NOT found, module mongodb2 disabled"
    MONGODB2_PATH=""
    MONGODB2_IPATH=""
    BSON2_PATH=""
    BSON2_IPATH=""
  fi

if [ "X" = "X$MONGODB2_PATH" -o "X" = "X$MONGODB2_IPATH" -o "X" = "X$BSON2_PATH" -o "X" = "X$BSON2_IPATH" ]; then
    echo "Checking for Mongodb (libmongoc-1.0/mongoc.h/libbson-1.0/bson.h) ..."

      for i in $LIBDIRS ; do
        if [ "X" = "X$MONGODB_PATH" ]; then
            if [ -f "$i/libmongoc-1.0.so" -o -f "$i/libmongoc-1.0.dylib" -o -f "$i/libmongoc-1.0.a" ]; then
                MONGODB_PATH="$i"
            fi
        fi
        if [ "X" = "X$MONGODB_PATH" ]; then
            TMP_LIB=`/bin/ls $i/libmongoc-*.so* 2> /dev/null | grep mongoc`
            if [ -n "$TMP_LIB" ]; then
              MONGODB_PATH="$i"
            fi
        fi
        if [ "X" = "X$MONGODB_PATH" ]; then
            TMP_LIB=`/bin/ls $i/libmongoc.dll* 2> /dev/null | grep mongoc`
            if [ -n "$TMP_LIB" ]; then
              MONGODB_PATH="$i"
            fi
        fi
      done

      MONGODB_IPATH=
      for i in $INCDIRS ; do
        if [ "X" = "X$MONGODB_IPATH" ]; then
            if [ -f "$i/mongoc.h" ]; then
                MONGODB_IPATH="$i"
            fi
            if [ -f "$i/libmongoc/mongoc.h" ]; then
                MONGODB_IPATH="$i/libmongoc"
            fi
            if [ -f "$i/libmongoc-1.0/mongoc.h" ]; then
                MONGODB_IPATH="$i/libmongoc-1.0"
            fi
        fi
      done

     for i in $LIBDIRS ; do
        if [ "X" = "X$BSON_PATH" ]; then
            if [ -f "$i/libbson-1.0.so" -o -f "$i/libbson-1.0.dylib" -o -f "$i/libbson-1.0.a" ]; then
                BSON_PATH="$i"
            fi
        fi
        if [ "X" = "X$BSON_PATH" ]; then
            TMP_LIB=`/bin/ls $i/libbson-*.so* 2> /dev/null | grep mongoc`
            if [ -n "$TMP_LIB" ]; then
              BSON_PATH="$i"
            fi
        fi
        if [ "X" = "X$BSON_PATH" ]; then
            TMP_LIB=`/bin/ls $i/libbson.dll* 2> /dev/null | grep mongoc`
            if [ -n "$TMP_LIB" ]; then
              BSON_PATH="$i"
            fi
        fi
      done

      BSON_IPATH=
      for i in $INCDIRS ; do
        if [ "X" = "X$BSON_IPATH" ]; then
            if [ -f "$i/bson.h" ]; then
                BSON_IPATH="$i"
            fi
            if [ -f "$i/libbson/bson.h" ]; then
                BSON_IPATH="$i/libbson"
            fi
            if [ -f "$i/libbson-1.0/bson.h" ]; then
                BSON_IPATH="$i/libbson-1.0"
            fi
        fi
      done

    if [ "X" != "X$DEBUG" ]; then
       echo DEBUG: MONGODB_PATH=$MONGODB_PATH/libmongoc
       echo DEBUG: MONGODB_IPATH=$MONGODB_IPATH/libmongoc.h
       echo DEBUG: BSON_PATH=$BSON_PATH/libbson
       echo DEBUG: BSON_IPATH=$BSON_IPATH/libbson.h
    fi

      if [ -n "$MONGODB_PATH" -a -n "$MONGODB_IPATH" -a -n "$BSON_PATH" -a -n "$BSON_IPATH" ]; then
        echo "                                                                 ... found"
      fi
      if [ "X" = "X$MONGODB_PATH" -o "X" = "X$MONGODB_IPATH" -o "X" = "X$BSON_PATH" -o "X" = "X$BSON_IPATH" ]; then
        echo "                                                                 ... NOT found, module mongodb disabled"
        MONGODB_PATH=""
        MONGODB_IPATH=""
        BSON_PATH=""
        BSON_IPATH=""
      fi
fi

echo "Checking for smbclient (libsmbclient/libsmbclient.h) ..."

  for i in $LIBDIRS ; do
    if [ "X" = "X$SMBC_PATH" ]; then
        if [ -f "$i/libsmbclient.so" -o -f "$i/libsmbclient.dylib" -o -f "$i/libsmbclient.a" ]; then
            SMBC_PATH="$i"
        fi
    fi
    if [ "X" = "X$SMBC_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libsmbclient.so* 2> /dev/null | grep smbclient`
        if [ -n "$TMP_LIB" ]; then
          SMBC_PATH="$i"
        fi
    fi
    if [ "X" = "X$SMBC_PATH" ]; then
        TMP_LIB=`/bin/ls $i/libsmbclient.dll* 2> /dev/null | grep smbclient`
        if [ -n "$TMP_LIB" ]; then
          SMBC_PATH="$i"
        fi
    fi
  done

  SMBC_IPATH=
  for i in $INCDIRS ; do
    if [ "X" = "X$SMBC_IPATH" ]; then
        if [ -f "$i/libsmbclient.h" ]; then
            SMBC_IPATH="$i"
        fi
        if [ -f "$i/samba-4.0/libsmbclient.h" ]; then
            SMBC_IPATH="$i/samba-4.0"
        fi
    fi
  done

  if [ "X" != "X$DEBUG" ]; then
     echo DEBUG: SMBC_PATH=$SMBC_PATH/libsmbclient
     echo DEBUG: SMBC_IPATH=$SMBC_IPATH/libsmbclient.h
  fi
  if [ -n "$SMBC_PATH" -a -n "$SMBC_IPATH" ]; then
    echo "                                                     ... found"
  fi
  if [ "X" = "X$SMBC_PATH" -o "X" = "X$SMBC_IPATH" ]; then
    echo "                                                     ... NOT found, module smb2 disabled"
    SMBC_PATH=""
    SMBC_IPATH=""
  fi


if [ "X" = "X$XHYDRA_SUPPORT" ]; then
    echo "Checking for GUI req's (pkg-config/gtk+-3.0) ..."
  XHYDRA_SUPPORT=`$PKG_CONFIG --help > /dev/null 2>&1 || echo disabled`
  if [ "X" = "X$XHYDRA_SUPPORT" ]; then
     XHYDRA_SUPPORT=`$PKG_CONFIG --modversion gtk+-3.0 2> /dev/null`
  else
     XHYDRA_SUPPORT=""
  fi
  if [ "X" = "X$XHYDRA_SUPPORT" ]; then
    echo "                                             ... NOT found, optional anyway"
  else
    echo "                                             ... found"
  fi
fi

if [ "$SYSS" = "SunOS" ]; then
    echo "Checking for Solaris libraries ..."
    for i in $LIBDIRS ; do
        if [ "X" = "X$NSL_PATH" ]; then
            if [ -f "$i/libnsl.so" ]; then
                NSL_PATH="$i"
            fi
        fi
        if [ "X" = "X$SOCKET_PATH" ]; then
            if [ -f "$i/libsocket.so" ]; then
                SOCKET_PATH="$i"
            fi
        fi
        if [ "X" = "X$RESOLV_PATH" ]; then
            if [ -f "$i/libresolv.so" ]; then
                RESOLV_PATH="$i"
            fi
        fi
    done
    if [ "X" = "X$NSL_PATH" ]; then
        echo "NSL library not found, which is needed on Solaris."
    fi
    if [ "X" = "X$SOCKET_PATH" ]; then
        echo "Socket library not found, which is needed on Solaris."
    fi
    if [ "X" = "X$RESOLV_PATH" ]; then
        echo "Resolv library not found, which is needed on Solaris."
    fi
    if [ -n "$RESOLV_PATH" -a -n "$SOCKET_PATH" -a -n "$RESOLV_PATH" ]; then
        echo "                               ... all found"
    fi
    echo
fi

echo "Checking for Android specialities ..."
TMPC=comptest$$
STRRCHR=" not"
echo '#include <stdio.h>' > $TMPC.c
echo '#include <string.h>' >> $TMPC.c
echo "int main() { char *x = strrchr(\"test\", 'e'); if (x == NULL) return 0; else return 1; }" >> $TMPC.c
$CC -o $TMPC $TMPC.c > /dev/null 2>&1
test -x $TMPC && STRRCHR=""
rm -f $TMPC
$CC -o $TMPC -Wl,--allow-multiple-definition $TMPC.c > /dev/null 2>&1
WALLOW="no"
test -x $TMPC && WALLOW="yes"
rm -f $TMPC $TMPC.c
echo "                                  ... strrchr()$STRRCHR found"
if [ -n "$CRYPTO_PATH" ]; then
  RSA=" not"
  echo '#include <stdio.h>' > $TMPC.c
  echo '#include <openssl/rsa.h>' >> $TMPC.c
  echo "int main() { RSA *rsa = RSA_generate_key(1024, RSA_F4, NULL, NULL); if (rsa == NULL) return 0; else return 1; }" >> $TMPC.c
#echo "int main() { RSA *rsa; RSA_generate_key_ex(rsa, 1024, 0, NULL); if (rsa == NULL) return 0; else return 1; }" >> $TMPC.c
  $CC -o $TMPC $TMPC.c -lssl -lcrypto > /dev/null 2>&1
  test -x $TMPC && RSA=""
  rm -f $TMPC $TMPC.c
  echo "                                  ... RSA_generate_key()$RSA found"
fi

echo "Checking for secure compile option support in $CC ..."
GCCSEC="no"
LDSEC="no"
GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
LDSECOPT=""
echo '#include <stdio.h>' > $TMPC.c
echo 'int main() { printf(""); return 0; }' >> $TMPC.c
$CC -pie -fPIE $GCCSEPOPT -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
test -x $TMPC && GCCSEC="yes"
grep -q fPI $TMPC.c.err || {
  GCCSEC=yes
  GCCSECOPT="-fPIE $GCCSECOPT"
  LDSEC=yes
  LDSECOPT="$LDSECOPT -pie"
}
rm -f "$TMPC"
$CC $GCCSECOPT $LDSECOPT -Wl,-z,now -Wl,-z,relro -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
test -x $TMPC && { LDSEC=yes; LDSECOPT="$LDSECOPT -Wl,-z,now -Wl,-z,relro" ; }
rm -f $TMPC $TMPC.c $TMPC.c.err
echo "                                                  Compiling... $GCCSEC"
echo "                                                  Linking... $LDSEC"

echo "Checking for --allow-multiple-definition linker option ... $WALLOW"
if [ "$WALLOW" = "yes" ]; then
   LDSEC=yes
   LDSECOPT="$LDSECOPT -Wl,--allow-multiple-definition"
fi

echo
XDEFINES=""
XLIBS=""
XLIBPATHS=""
XIPATHS=""

if [ -n "$FIREBIRD_PATH" -o \
        -n "$PCRE_PATH" -o \
        -n "$IDN_PATH" -o \
        -n "$SSL_PATH" -o \
        -n "$CRYPTO_PATH" -o \
        -n "$NSL_PATH" -o \
        -n "$SOCKET_PATH" -o \
        -n "$RESOLV_PATH" -o \
        -n "$SAPR3_PATH" -o \
        -n "$SSH_PATH" -o \
        -n "$POSTGRES_PATH" -o \
        -n "$SVN_PATH" -o \
        -n "$NCP_PATH" -o \
        -n "$CURSES_PATH" -o \
        -n "$ORACLE_PATH" -o \
        -n "$AFP_PATH" -o \
        -n "$MYSQL_PATH" -o \
        -n "$MCACHED_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" -a ! -d "/lib" ]; then
        #for libraries installed with MacPorts
        if [ -d "/opt/local/lib" ]; then
            XLIBPATHS="-L/usr/lib -L/usr/local/lib -L/opt/local/lib"
        else
            XLIBPATHS="-L/usr/lib -L/usr/local/lib"
        fi
    else
        XLIBPATHS="-L/usr/lib -L/usr/local/lib -L/lib"
    fi
fi
if [ -n "$MYSQL_IPATH" ]; then
    XIPATHS="$XIPATHS -I$MYSQL_IPATH"
    if [ -n "$MYSQLINSUBDIR" ]; then
       XDEFINES="$XDEFINES -DHAVE_MYSQL_MYSQL_H"
    else
       XDEFINES="$XDEFINES -DHAVE_MYSQL_H"
    fi
fi
if [ -n "$SSL_PATH" ]; then
    if [ -n "$SSLNEW" ]; then
        XDEFINES="$XDEFINES -DLIBOPENSSL"
    fi
fi
if [ -n "$CURSES_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBNCURSES"
fi
if [ -n "$SAPR3_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBSAPR3"
fi
if [ -n "$FIREBIRD_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBFIREBIRD"
fi
if [ -n "$IDN_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBIDN -DHAVE_PR29_H"
fi
if [ -n "$PCRE_PATH" ]; then
    XDEFINES="$XDEFINES -DHAVE_PCRE"
fi
if [ -n "$MYSQL_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBMYSQLCLIENT"
fi
if [ -n "$AFP_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBAFP"
fi
if [ -n "$NCP_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBNCP"
fi
if [ -n "$ORACLE_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBORACLE"
fi
if [ -n "$POSTGRES_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBPOSTGRES"
fi
if [ -n "$SVN_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBSVN"
fi
if [ -n "$SSH_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBSSH"
fi
if [ -n "$STRRCHR" ]; then
    XDEFINES="$XDEFINES -DNO_STRRCHR"
fi
if [ -n "$RSA" ]; then
    XDEFINES="$XDEFINES -DNO_RSA_LEGACY"
fi
if [ -n "$HAVE_SYBDB" ]; then
    XDEFINES="$XDEFINES -DHAVE_SYBDB"
fi
if [ -n "$HAVE_SYBFRONT" ]; then
    XDEFINES="$XDEFINES -DHAVE_SYBFRONT"
fi
if [ -n "$HAVE_ZLIB" ]; then
    XDEFINES="$XDEFINES -DHAVE_ZLIB"
fi
if [ -n "$HAVE_GCRYPT" ]; then
    XDEFINES="$XDEFINES -DHAVE_GCRYPT"
fi
if [ -n "$MCACHED_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBMCACHED"
fi
if [ -n "$MONGODB2_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBMONGODB2"
fi
if [ -n "$BSON2_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBBSON2"
fi
if [ -n "$MONGODB_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBMONGODB"
fi
if [ -n "$BSON_PATH" ]; then
    XDEFINES="$XDEFINES -DLIBBSON"
fi
if [ -n "$FREERDP2_PATH" ]; then
    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

OLDPATH=""
for i in $SSL_PATH \
             $FIREBIRD_PATH \
             $WORACLE_LIB_PATH \
             $PCRE_PATH \
             $IDN_PATH \
             $CRYPTO_PATH \
             $SSH_PATH \
             $NSL_PATH \
             $SOCKET_PATH \
             $RESOLV_PATH \
             $SAPR3_PATH \
             $POSTGRES_PATH \
             $SVN_PATH \
             $NCP_PATH \
             $CURSES_PATH \
             $ORACLE_PATH \
             $AFP_PATH \
             $MYSQL_PATH \
             $MCACHED_PATH \
             $MONGODB2_PATH \
             $BSON2_PATH \
             $MONGODB_PATH \
             $BSON_PATH \
             $FREERDP2_PATH \
             $WINPR2_PATH \
             $FREERDP3_PATH \
             $WINPR3_PATH \
             $SMBC_PATH; do
    if [ "$OLDPATH" = "$i" ]; then
      OLDPATH="$i"
    else
      XLIBPATHS="$XLIBPATHS -L$i"
      OLDPATH="$i"
    fi
done
if [ -n "$CURSES_IPATH" ]; then
    XIPATHS="$XIPATHS -I$CURSES_IPATH"
fi
if [ -n "$FIREBIRD_IPATH" ]; then
    XIPATHS="$XIPATHS -I$FIREBIRD_IPATH"
fi
if [ -n "$IDN_IPATH" ]; then
    XIPATHS="$XIPATHS -I$IDN_IPATH"
fi
if [ -n "$NCP_IPATH" ]; then
    XIPATHS="$XIPATHS -I$NCP_IPATH"
fi
if [ -n "$PCRE_IPATH" ]; then
    XIPATHS="$XIPATHS -I$PCRE_IPATH"
fi
if [ -n "$POSTGRES_IPATH" ]; then
    XIPATHS="$XIPATHS -I$POSTGRES_IPATH"
fi
if [ -n "$PR29_IPATH" ]; then
    XIPATHS="$XIPATHS -I$PR29_IPATH"
fi
if [ -n "$SSL_IPATH" ]; then
    XIPATHS="$XIPATHS -I$SSL_IPATH"
fi
if [ -n "$SAPR3_IPATH" ]; then
    XIPATHS="$XIPATHS -I$SAPR3_IPATH"
fi
if [ -n "$SSH_IPATH" ]; then
    XIPATHS="$XIPATHS -I$SSH_IPATH"
fi
if [ -n "$SVN_IPATH" ]; then
    XIPATHS="$XIPATHS -I$SVN_IPATH"
fi
if [ -n "$APR_IPATH" ]; then
    XIPATHS="$XIPATHS -I$APR_IPATH"
fi
if [ -n "$SVN_IPATH" ]; then
    XIPATHS="$XIPATHS -I$SVN_IPATH"
fi
if [ -n "$AFP_IPATH" ]; then
    XIPATHS="$XIPATHS -I$AFP_IPATH"
fi
if [ -n "$ORACLE_IPATH" ]; then
    XIPATHS="$XIPATHS -I$ORACLE_IPATH"
fi
if [ -n "$MCACHED_IPATH" ]; then
    XIPATHS="$XIPATHS -I$MCACHED_IPATH"
fi
if [ -n "$MONGODB2_IPATH" ]; then
    XIPATHS="$XIPATHS -I$MONGODB2_IPATH -I$BSON2_IPATH"
fi
if [ -n "$MONGODB_IPATH" ]; then
    XIPATHS="$XIPATHS -I$MONGODB_IPATH -I$BSON_IPATH"
fi
if [ -n "$FREERDP2_IPATH" ]; then
    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
if [ -n "$HAVE_GCRYPT" ]; then
    XLIBS="$XLIBS -lgcrypt"
fi
if [ -n "$HAVE_ZLIB" ]; then
    XLIBS="$XLIBS -lz"
fi
if [ -n "$HAVE_SYBDB" ]; then
    XLIBS="$XLIBS -lsybdb"
fi
if [ -n "$CURSES_PATH" ]; then
    XLIBS="$XLIBS -lcurses"
fi
if [ -n "$SSL_PATH" ]; then
    XLIBS="$XLIBS -lssl"
fi
if [ -n "$NCP_PATH" ]; then
    XLIBS="$XLIBS -lncp"
fi
if [ -n "$ORACLE_PATH" -a "$SYSO" != "Cygwin" ]; then
    XLIBS="$XLIBS -locci -lclntsh"
fi
if [ -n "$ORACLE_PATH" -a "$SYSO" = "Cygwin" ]; then
    XLIBS="$XLIBS -loci"
fi
if [ -n "$FIREBIRD_PATH" ]; then
    XLIBS="$XLIBS -lfbclient"
fi
if [ -n "$IDN_PATH" ]; then
    XLIBS="$XLIBS -lidn"
fi
if [ -n "$PCRE_PATH" ]; then
    XLIBS="$XLIBS -lpcre2-8"
fi
if [ -n "$MYSQL_PATH" ]; then
    XLIBS="$XLIBS -lmysqlclient"
fi
if [ -n "$AFP_PATH" ]; then
    XLIBS="$XLIBS -lafpclient"
fi

if [ -n "$SAPR3_PATH" ]; then
    XLIBS="$XLIBS -lrfc"
    if [ "$SYSO" = "Cygwin" ]; then
      BLA=TMP
    else
      XLIBS="$XLIBS -ldl"
    fi
fi
if [ -n "$POSTGRES_PATH" ]; then
    XLIBS="$XLIBS -lpq"
fi
if [ -n "$SVN_PATH" ]; then
    XLIBS="$XLIBS -lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1"
fi
if [ -n "$SSH_PATH" ]; then
    XLIBS="$XLIBS -lssh"
fi
if [ -n "$CRYPTO_PATH" ]; then
    XLIBS="$XLIBS -lcrypto"
fi
if [ -n "$NSL_PATH" ]; then
    XLIBS="$XLIBS -lnsl"
fi
if [ -n "$SOCKET_PATH" ]; then
    XLIBS="$XLIBS -lsocket"
fi
if [ -n "$RESOLV_PATH" ]; then
    XLIBS="$XLIBS -lresolv"
fi
if [ -n "$MCACHED_PATH" ]; then
    XLIBS="$XLIBS -lmemcached"
fi
if [ -n "$MONGODB2_PATH" ]; then
    XLIBS="$XLIBS -lmongoc2"
fi
if [ -n "$BSON2_PATH" ]; then
    XLIBS="$XLIBS -lbson2"
fi
if [ -n "$MONGODB_PATH" ]; then
    XLIBS="$XLIBS -lmongoc-1.0"
fi
if [ -n "$BSON_PATH" ]; then
    XLIBS="$XLIBS -lbson-1.0"
fi
if [ -n "$FREERDP2_PATH" ]; then
    XLIBS="$XLIBS -lfreerdp2"
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"
fi
if [ -n "$SMBC_PATH" ]; then
    XLIBS="$XLIBS -lsmbclient"
fi
if [ -d /usr/kerberos/include ]; then
  XIPATHS="$XIPATHS -I/usr/kerberos/include"
fi

if [ "X" = "X$PREFIX" ]; then
    PREFIX="/usr/local"
fi

if [ "X" = "X$XHYDRA_SUPPORT" -o "Xdisable" = "X$XHYDRA_SUPPORT" ]; then
    XHYDRA_SUPPORT=""
else
    XHYDRA_SUPPORT="xhydra"
fi

if [ "X" != "X$FHS" ]; then
  PREFIX=/usr
  echo "Hydra will be installed into .../bin of: $PREFIX"
  echo "  (according to the File System Hierarchy Standard)"
  echo
else
  echo "Hydra will be installed into .../bin of: $PREFIX"
  echo "  (change this by running ./configure --prefix=path)"
  echo
fi

if [ "X" != "X$DEBUG" ]; then
   echo DEBUG: XDEFINES=$XDEFINES $MATH $SYS_PARAM
   echo DEBUG: XLIBS=$XLIBS
   echo DEBUG: XLIBPATHS=$XLIBPATHS
   echo DEBUG: XIPATHS=$XIPATHS
   echo DEBUG: PREFIX=$PREFIX
   echo DEBUG: XHYDRA_SUPPORT=$XHYDRA_SUPPORT
   echo DEBUG: STRIP=$STRIP
fi

if [ "$SYSS" = "SunOS" ]; then
   XLIBS="$XLIBS -lrt"
fi

echo "Writing Makefile.in ..."
if [ "X" != "X$FHS" ]; then
  echo "MANDIR = /share/man/man1" >> Makefile.in
  echo "DATADIR = /share/hydra" >> Makefile.in
fi
echo "XDEFINES=$XDEFINES $MATH $SYS_PARAM" >> Makefile.in
echo "XLIBS=$XLIBS" >> Makefile.in
echo "XLIBPATHS=$XLIBPATHS" >> Makefile.in
echo "XIPATHS=$XIPATHS" >> Makefile.in
echo "PREFIX=$PREFIX" >> Makefile.in
#if [ $XHYDRA_SUPPORT != "disable" ]; then
echo "XHYDRA_SUPPORT=$XHYDRA_SUPPORT" >> Makefile.in
#fi
echo "STRIP=$STRIP" >> Makefile.in
echo >> Makefile.in
cat Makefile.unix > Makefile
cat Makefile.in >> Makefile
# ignore errors if this uname call fails
### Current Cygwin is up to speed :-)
WINDRES=""
if [ "$SYSO" = "Cygwin" -o "$SYSO" = "Msys" ]; then
    echo
    echo "Cygwin/MSYS2 detected, if compilation fails just update your installation."
    echo
    WINDRES=`which windres`
    test -x "$WINDRES" && {
      echo "Windres found, will attach icons to hydra cygwin executables"
      echo HYDRA_LOGO=hydra-logo.o >> Makefile
      echo PWI_LOGO=pw-inspector-logo.o >> Makefile
      windres hydra-logo.rc hydra-logo.o
      windres pw-inspector-logo.rc pw-inspector-logo.o
    }
    test -x "$WINDRES" || {
      WINDRES=""
      echo Windres NOT found, you will not have pretty icon files in the hydra cygwin executables
      echo
    }
    echo
fi
if [ "x$WINDRES" = "x" ]; then
  echo HYDRA_LOGO= >> Makefile
  echo PWI_LOGO= >> Makefile
fi
if [ "$GCCSEC" = "yes" -a "$SYSS" != "SunOS" -a "$SYSS" != "Darwin" ]; then
  echo "SEC=$GCCSECOPT" >> Makefile
else
  echo "SEC=" >> Makefile
fi
if [ "$LDSEC" = "yes" -a "$SYSS" != "SunOS" -a "$SYSS" != "Darwin" ]; then
  echo "LDSEC=$LDSECOPT" >> Makefile
else
  echo "LDSEC=" >> Makefile
fi
echo >> Makefile
if [ "x$NOSTRIP" = "x" ]; then
  cat Makefile.am >> Makefile
else
  cat Makefile.am | sed 's/^install:.*/install:	all/'  >> Makefile
fi
echo "now type \"make\""


================================================
FILE: crc32.c
================================================
/*-
 *  COPYRIGHT (C) 1986 Gary S. Brown.  You may use this program, or
 *  code or tables extracted from it, as desired without restriction.
 *
 *  First, the polynomial itself and its table of feedback terms.  The
 *  polynomial is
 *  X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
 *
 *  Note that we take it "backwards" and put the highest-order term in
 *  the lowest-order bit.  The X^32 term is "implied"; the LSB is the
 *  X^31 term, etc.  The X^0 term (usually shown as "+1") results in
 *  the MSB being 1
 *
 *  Note that the usual hardware shift register implementation, which
 *  is what we're using (we're merely optimizing it by doing eight-bit
 *  chunks at a time) shifts bits into the lowest-order term.  In our
 *  implementation, that means shifting towards the right.  Why do we
 *  do it this way?  Because the calculated CRC must be transmitted in
 *  order from highest-order term to lowest-order term.  UARTs transmit
 *  characters in order from LSB to MSB.  By storing the CRC this way
 *  we hand it to the UART in the order low-byte to high-byte; the UART
 *  sends each low-bit to hight-bit; and the result is transmission bit
 *  by bit from highest- to lowest-order term without requiring any bit
 *  shuffling on our part.  Reception works similarly
 *
 *  The feedback terms table consists of 256, 32-bit entries.  Notes
 *
 *      The table can be generated at runtime if desired; code to do so
 *      is shown later.  It might not be obvious, but the feedback
 *      terms simply represent the results of eight shift/xor opera
 *      tions for all combinations of data and CRC register values
 *
 *      The values must be right-shifted by eight bits by the "updcrc
 *      logic; the shift must be unsigned (bring in zeroes).  On some
 *      hardware you could probably optimize the shift in assembler by
 *      using byte-swap instructions
 *      polynomial $edb88320
 *
 *
 * CRC32 code derived from work by Gary S. Brown.
 */

#include <sys/types.h>
#ifdef __sun
#include <sys/int_types.h>
#elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
#include <inttypes.h>
#else
#include <stdint.h>
#endif

uint32_t crc32_tab[] = {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1,
                        0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x4
Download .txt
gitextract_b5cyuhwz/

├── .clang-format
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── workflows/
│       └── release.yml
├── .gitignore
├── .travis.yml
├── Android.mk
├── CHANGES
├── CITATION.cff
├── Dockerfile
├── INSTALL
├── LICENSE
├── LICENSE_OPENSSL
├── Makefile.am
├── Makefile.orig
├── Makefile.unix
├── PROBLEMS
├── README
├── TODO
├── _config.yml
├── bfg.c
├── bfg.h
├── configure
├── crc32.c
├── crc32.h
├── d3des.c
├── d3des.h
├── dpl4hydra.sh
├── dpl4hydra_full.csv
├── dpl4hydra_local.csv
├── hmacmd5.c
├── hmacmd5.h
├── hydra-adam6500.c
├── hydra-afp.c
├── hydra-asterisk.c
├── hydra-cisco-enable.c
├── hydra-cisco.c
├── hydra-cobaltstrike.c
├── hydra-cvs.c
├── hydra-firebird.c
├── hydra-ftp.c
├── hydra-gtk/
│   ├── AUTHORS
│   ├── COPYING
│   ├── ChangeLog
│   ├── Makefile.am
│   ├── NEWS
│   ├── README
│   ├── README-autoconf
│   ├── autogen.sh
│   ├── configure.ac
│   ├── make_xhydra.sh
│   ├── src/
│   │   ├── Makefile.am
│   │   ├── callbacks.c
│   │   ├── callbacks.h
│   │   ├── interface.c
│   │   ├── interface.h
│   │   ├── main.c
│   │   ├── support.c
│   │   └── support.h
│   ├── xhydra.glade
│   └── xhydra.gladep
├── hydra-http-form.c
├── hydra-http-proxy-urlenum.c
├── hydra-http-proxy.c
├── hydra-http.c
├── hydra-http.h
├── hydra-icq.c
├── hydra-imap.c
├── hydra-irc.c
├── hydra-ldap.c
├── hydra-logo.rc
├── hydra-memcached.c
├── hydra-mod.c
├── hydra-mod.h
├── hydra-mongodb.c
├── hydra-mssql.c
├── hydra-mysql.c
├── hydra-ncp.c
├── hydra-nntp.c
├── hydra-oracle-listener.c
├── hydra-oracle-sid.c
├── hydra-oracle.c
├── hydra-pcanywhere.c
├── hydra-pcnfs.c
├── hydra-pop3.c
├── hydra-postgres.c
├── hydra-radmin2.c
├── hydra-rdp.c
├── hydra-redis.c
├── hydra-rexec.c
├── hydra-rlogin.c
├── hydra-rpcap.c
├── hydra-rsh.c
├── hydra-rtsp.c
├── hydra-s7-300.c
├── hydra-sapr3.c
├── hydra-sip.c
├── hydra-smb.c
├── hydra-smb2.c
├── hydra-smtp-enum.c
├── hydra-smtp.c
├── hydra-snmp.c
├── hydra-socks5.c
├── hydra-ssh.c
├── hydra-sshkey.c
├── hydra-svn.c
├── hydra-teamspeak.c
├── hydra-telnet.c
├── hydra-telnet.h
├── hydra-time.c
├── hydra-vmauthd.c
├── hydra-vnc.c
├── hydra-wizard.sh
├── hydra-xmpp.c
├── hydra.1
├── hydra.c
├── hydra.h
├── libpq-fe.h
├── ntlm.c
├── ntlm.h
├── performance.h
├── postgres_ext.h
├── pw-inspector-logo.rc
├── pw-inspector.1
├── pw-inspector.c
├── sasl.c
├── sasl.h
├── xhydra.1
└── xhydra.desktop
Download .txt
SYMBOL INDEX (524 symbols across 79 files)

FILE: bfg.c
  function add_single_char (line 24) | static int32_t add_single_char(char ch, char flags, int32_t *crs_len) {
  function bf_init (line 60) | int32_t bf_init(char *arg) {
  function bf_get_pcount (line 185) | uint64_t bf_get_pcount() {

FILE: bfg.h
  type bf_option (line 35) | typedef struct {

FILE: crc32.c
  function crc32 (line 62) | uint32_t crc32(const void *buf, uint32_t size) {

FILE: d3des.c
  function deskey (line 63) | void deskey(key, edf) /* Thanks to James Gillogly & Phil Karn! */
  function cookey (line 108) | static void cookey(raw1) register unsigned long *raw1;
  function cpkey (line 130) | void cpkey(into) register unsigned long *into;
  function usekey (line 140) | void usekey(from) register unsigned long *from;
  function des (line 150) | void des(unsigned char *inblock, unsigned char *outblock) {
  function scrunch (line 159) | static void scrunch(outof, into) register unsigned char *outof;
  function unscrun (line 173) | static void unscrun(outof, into) register unsigned long *outof;
  function desfunc (line 211) | static void desfunc(block, keys) register unsigned long *block, *keys;

FILE: hmacmd5.c
  function hmac_md5_init_rfc2104 (line 46) | void hmac_md5_init_rfc2104(const unsigned char *key, int32_t key_len, HM...
  function hmac_md5_init_limK_to_64 (line 82) | void hmac_md5_init_limK_to_64(const unsigned char *key, int32_t key_len,...
  function hmac_md5_update (line 110) | void hmac_md5_update(const unsigned char *text, int32_t text_len, HMACMD...
  function hmac_md5_final (line 115) | void hmac_md5_final(unsigned char *digest, HMACMD5Context *ctx) {
  function hmac_md5 (line 131) | void hmac_md5(unsigned char key[16], unsigned char *data, int32_t data_l...

FILE: hmacmd5.h
  type HMACMD5Context (line 42) | typedef struct {

FILE: hydra-adam6500.c
  function start_adam6500 (line 17) | int32_t start_adam6500(int32_t s, char *ip, int32_t port, unsigned char ...
  function service_adam6500 (line 51) | void service_adam6500(char *ip, int32_t sp, unsigned char options, char ...
  function service_adam6500_init (line 106) | int32_t service_adam6500_init(char *ip, int32_t sp, unsigned char option...

FILE: hydra-afp.c
  function dummy_afp (line 12) | void dummy_afp() { printf("\n"); }
  function stdout_fct (line 27) | void stdout_fct(void *priv, enum loglevels loglevel, int32_t logtype, co...
  type libafpclient (line 31) | struct libafpclient
  function server_subconnect (line 39) | static int32_t server_subconnect(struct afp_url url) {
  function start_afp (line 80) | int32_t start_afp(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_afp (line 119) | void service_afp(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_afp_init (line 173) | int32_t service_afp_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-asterisk.c
  function start_asterisk (line 13) | int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char ...
  function service_asterisk (line 67) | void service_asterisk(char *ip, int32_t sp, unsigned char options, char ...
  function service_asterisk_init (line 131) | int32_t service_asterisk_init(char *ip, int32_t sp, unsigned char option...

FILE: hydra-cisco-enable.c
  function start_cisco_enable (line 6) | int32_t start_cisco_enable(int32_t s, char *ip, int32_t port, unsigned c...
  function service_cisco_enable (line 60) | void service_cisco_enable(char *ip, int32_t sp, unsigned char options, c...
  function service_cisco_enable_init (line 211) | int32_t service_cisco_enable_init(char *ip, int32_t sp, unsigned char op...
  function usage_cisco_enable (line 225) | void usage_cisco_enable(const char *service) {

FILE: hydra-cisco.c
  function start_cisco (line 10) | int32_t start_cisco(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_cisco (line 117) | void service_cisco(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_cisco_init (line 206) | int32_t service_cisco_init(char *ip, int32_t sp, unsigned char options, ...
  function usage_cisco (line 220) | void usage_cisco(const char *service) {

FILE: hydra-cobaltstrike.c
  function start_cobaltstrike (line 8) | int32_t start_cobaltstrike(int32_t s, char *ip, int32_t port, unsigned c...
  function service_cobaltstrike (line 75) | void service_cobaltstrike(char *ip, int32_t sp, unsigned char options, c...
  function service_cobaltstrike_init (line 114) | int32_t service_cobaltstrike_init(char *ip, int32_t sp, unsigned char op...

FILE: hydra-cvs.c
  function start_cvs (line 8) | int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_cvs (line 82) | void service_cvs(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_cvs_init (line 133) | int32_t service_cvs_init(char *ip, int32_t sp, unsigned char options, ch...
  function usage_cvs (line 147) | void usage_cvs(const char *service) {

FILE: hydra-firebird.c
  function dummy_firebird (line 17) | void dummy_firebird() { printf("\n"); }
  function start_firebird (line 28) | int32_t start_firebird(int32_t s, char *ip, int32_t port, unsigned char ...
  function service_firebird (line 88) | void service_firebird(char *ip, int32_t sp, unsigned char options, char ...
  function service_firebird_init (line 149) | int32_t service_firebird_init(char *ip, int32_t sp, unsigned char option...
  function usage_firebird (line 163) | void usage_firebird(const char *service) {

FILE: hydra-ftp.c
  function start_ftp (line 6) | int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_ftp_core (line 84) | void service_ftp_core(char *ip, int32_t sp, unsigned char options, char ...
  function service_ftp (line 179) | void service_ftp(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_ftps (line 181) | void service_ftps(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_ftp_init (line 183) | int32_t service_ftp_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-gtk/src/callbacks.c
  function hydra_select_file (line 41) | void hydra_select_file(GtkEntry *widget, char *text) {
  function hydra_get_options (line 57) | int hydra_get_options(char *options[]) {
  function gboolean (line 388) | gboolean update_statusbar(gpointer user_data) {
  function read_into (line 418) | int read_into(int fd) {
  function gboolean (line 472) | static gboolean wait_hydra_output(gpointer data) {
  function close_pipe (line 522) | static void close_pipe(int *pipe) {
  function on_quit1_activate (line 609) | void on_quit1_activate(GtkMenuItem *menuitem, gpointer user_data) { gtk_...
  function on_about1_activate (line 611) | void on_about1_activate(GtkMenuItem *menuitem, gpointer user_data) {}
  function on_btnStart_clicked (line 613) | void on_btnStart_clicked(GtkButton *button, gpointer user_data) {
  function on_btnStop_clicked (line 620) | void on_btnStop_clicked(GtkButton *button, gpointer user_data) {
  function on_wndMain_destroy (line 627) | void on_wndMain_destroy(GtkWidget *object, gpointer user_data) {
  function gboolean (line 635) | gboolean on_entTargetFile_button_press_event(GtkWidget *widget, GdkEvent...
  function gboolean (line 641) | gboolean on_entUsernameFile_button_press_event(GtkWidget *widget, GdkEve...
  function gboolean (line 647) | gboolean on_entPassFile_button_press_event(GtkWidget *widget, GdkEventBu...
  function gboolean (line 653) | gboolean on_entColonFile_button_press_event(GtkWidget *widget, GdkEventB...
  function on_btnSave_clicked (line 659) | void on_btnSave_clicked(GtkButton *button, gpointer user_data) {
  function on_chkColon_toggled (line 693) | void on_chkColon_toggled(GtkToggleButton *togglebutton, gpointer user_da...
  function on_chkDisUser_toggled (line 709) | void on_chkDisUser_toggled(GtkToggleButton *togglebutton, gpointer user_...
  function on_btnClear_clicked (line 731) | void on_btnClear_clicked(GtkButton *button, gpointer user_data) {

FILE: hydra-gtk/src/interface.c
  function GtkWidget (line 28) | GtkWidget *create_wndMain(void) {

FILE: hydra-gtk/src/main.c
  function main (line 27) | int main(int argc, char *argv[]) {

FILE: hydra-gtk/src/support.c
  function GtkWidget (line 20) | GtkWidget *lookup_widget(GtkWidget *widget, const gchar *widget_name) {
  function add_pixmap_directory (line 42) | void add_pixmap_directory(const gchar *directory) { pixmaps_directories ...
  function gchar (line 45) | static gchar *find_pixmap_file(const gchar *filename) {
  function GtkWidget (line 62) | GtkWidget *create_pixmap(GtkWidget *widget, const gchar *filename) {
  function GdkPixbuf (line 82) | GdkPixbuf *create_pixbuf(const gchar *filename) {
  function glade_set_atk_action_description (line 107) | void glade_set_atk_action_description(AtkAction *action, const gchar *ac...

FILE: hydra-http-form.c
  type header_node (line 51) | struct header_node {
  type t_cookie_node (line 58) | typedef struct cookie_node {
  function ptr_header_node (line 96) | ptr_header_node header_exists(ptr_header_node *ptr_head, char *header_na...
  function append_cookie (line 126) | int32_t append_cookie(char *name, char *value, ptr_cookie_node *last_coo...
  function add_or_update_cookie (line 185) | int32_t add_or_update_cookie(ptr_cookie_node *ptr_cookie, char *cookie_e...
  function process_cookies (line 217) | int32_t process_cookies(ptr_cookie_node *ptr_cookie, char *cookie_expr) {
  function add_header (line 251) | int32_t add_header(ptr_header_node *ptr_head, char *header, char *value,...
  function hdrrep (line 339) | void hdrrep(ptr_header_node *ptr_head, char *oldvalue, char *newvalue) {
  function hdrrepv (line 363) | void hdrrepv(ptr_header_node *ptr_head, char *hdrname, char *new_value) {
  function cleanup (line 379) | void cleanup(ptr_header_node *ptr_head) {
  function parse_options (line 418) | int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) {
  function strpos (line 701) | int32_t strpos(char *str, char *target) {
  function hydra_reconnect (line 850) | void hydra_reconnect(int32_t s, char *ip, int32_t port, unsigned char op...
  function service_http_form (line 1309) | void service_http_form(char *ip, int32_t sp, unsigned char options, char...
  function service_http_get_form (line 1374) | void service_http_get_form(char *ip, int32_t sp, unsigned char options, ...
  function service_http_post_form (line 1386) | void service_http_post_form(char *ip, int32_t sp, unsigned char options,...
  function service_http_form_init (line 1398) | int32_t service_http_form_init(char *ip, int32_t sp, unsigned char optio...
  type in6_addr (line 1419) | struct in6_addr
  function usage_http_form (line 1610) | void usage_http_form(const char *service) {

FILE: hydra-http-proxy-urlenum.c
  function start_http_proxy_urlenum (line 8) | int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsi...
  function service_http_proxy_urlenum (line 240) | void service_http_proxy_urlenum(char *ip, int32_t sp, unsigned char opti...
  function service_http_proxy_urlenum_init (line 291) | int32_t service_http_proxy_urlenum_init(char *ip, int32_t sp, unsigned c...
  function usage_http_proxy_urlenum (line 305) | void usage_http_proxy_urlenum(const char *service) {

FILE: hydra-http-proxy.c
  function start_http_proxy (line 8) | int32_t start_http_proxy(int32_t s, char *ip, int32_t port, unsigned cha...
  function service_http_proxy (line 263) | void service_http_proxy(char *ip, int32_t sp, unsigned char options, cha...
  function service_http_proxy_init (line 317) | int32_t service_http_proxy_init(char *ip, int32_t sp, unsigned char opti...
  function usage_http_proxy (line 331) | void usage_http_proxy(const char *service) {

FILE: hydra-http.c
  type in6_addr (line 317) | struct in6_addr
  function service_http_get (line 411) | void service_http_get(char *ip, int32_t sp, unsigned char options, char ...
  function service_http_post (line 413) | void service_http_post(char *ip, int32_t sp, unsigned char options, char...
  function service_http_head (line 415) | void service_http_head(char *ip, int32_t sp, unsigned char options, char...
  function service_http_init (line 417) | int32_t service_http_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_http (line 463) | void usage_http(const char *service) {

FILE: hydra-http.h
  type t_header_node (line 12) | typedef struct header_node t_header_node, *ptr_header_node;

FILE: hydra-icq.c
  function fix_packet (line 12) | void fix_packet(char *buf, int32_t len) {
  function icq_header (line 51) | void icq_header(char *buf, unsigned short cmd, unsigned long uin) {
  function icq_login (line 64) | int32_t icq_login(int32_t s, char *login, char *pass) {
  function icq_login_1 (line 84) | int32_t icq_login_1(int32_t s, char *login) {
  function icq_disconnect (line 92) | int32_t icq_disconnect(int32_t s, char *login) {
  function icq_ack (line 104) | int32_t icq_ack(int32_t s, char *login) {
  function start_icq (line 122) | int32_t start_icq(int32_t sock, char *ip, int32_t port, FILE *output, ch...
  function service_icq (line 178) | void service_icq(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_icq_init (line 226) | int32_t service_icq_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-imap.c
  function start_imap (line 43) | int32_t start_imap(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_imap (line 357) | void service_imap(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_imap_init (line 577) | int32_t service_imap_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_imap (line 591) | void usage_imap(const char *service) {

FILE: hydra-irc.c
  function start_oper_irc (line 13) | int32_t start_oper_irc(int32_t s, char *ip, int32_t port, unsigned char ...
  function send_nick (line 44) | int32_t send_nick(int32_t s, char *ip, char *pass) {
  function irc_server_connect (line 62) | int32_t irc_server_connect(char *ip, int32_t sock, int32_t port, unsigne...
  function service_irc_init (line 221) | int32_t service_irc_init(char *ip, int32_t sp, unsigned char options, ch...
  function usage_irc (line 235) | void usage_irc(const char *service) {

FILE: hydra-ldap.c
  function start_ldap (line 10) | int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_ldap (line 359) | void service_ldap(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_ldap2 (line 437) | void service_ldap2(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_ldap3 (line 439) | void service_ldap3(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_ldap3_cram_md5 (line 441) | void service_ldap3_cram_md5(char *ip, int32_t sp, unsigned char options,...
  function service_ldap3_digest_md5 (line 443) | void service_ldap3_digest_md5(char *ip, int32_t sp, unsigned char option...
  function service_ldap_init (line 445) | int32_t service_ldap_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_ldap (line 464) | void usage_ldap(const char *service) {

FILE: hydra-memcached.c
  function dummy_mcached (line 11) | void dummy_mcached() { printf("\n"); }
  function mcached_send_com_quit (line 19) | int mcached_send_com_quit(int32_t sock) {
  function mcached_send_com_version (line 27) | int mcached_send_com_version(int32_t sock) {
  function start_mcached (line 35) | int32_t start_mcached(int32_t s, char *ip, int32_t port, unsigned char o...
  function service_mcached (line 109) | void service_mcached(char *ip, int32_t sp, unsigned char options, char *...
  function service_mcached_init (line 137) | int32_t service_mcached_init(char *ip, int32_t sp, unsigned char options...

FILE: hydra-mod.c
  function alarming (line 63) | void alarming(int signal) {
  function interrupt (line 86) | void interrupt() {
  function internal__hydra_connect (line 93) | int32_t internal__hydra_connect(char *host, int32_t port, int32_t type, ...
  function RSA (line 483) | RSA *ssl_temp_rsa_cb(SSL *ssl, int32_t export, int32_t keylength) {
  function internal__hydra_connect_to_ssl (line 520) | int32_t internal__hydra_connect_to_ssl(int32_t socket, char *hostname) {
  function internal__hydra_connect_ssl (line 601) | int32_t internal__hydra_connect_ssl(char *host, int32_t port, int32_t ty...
  function internal__hydra_recv (line 611) | int32_t internal__hydra_recv(int32_t socket, char *buf, uint32_t length) {
  function internal__hydra_send (line 620) | int32_t internal__hydra_send(int32_t socket, char *buf, uint32_t size, i...
  function hydra_child_exit (line 631) | void hydra_child_exit(int32_t code) {
  function hydra_register_socket (line 659) | void hydra_register_socket(int32_t s) { intern_socket = s; }
  function hydra_completed_pair (line 691) | void hydra_completed_pair() {
  function hydra_completed_pair_found (line 696) | void hydra_completed_pair_found() {
  function hydra_completed_pair_skip (line 705) | void hydra_completed_pair_skip() {
  function hydra_report_debug (line 717) | void hydra_report_debug(FILE *st, char *format, ...) {
  function hydra_report_found (line 753) | void hydra_report_found(int32_t port, char *svc, FILE *fp) {
  function hydra_report_pass_found (line 778) | void hydra_report_pass_found(int32_t port, char *ip, char *svc, FILE *fp) {
  function hydra_report_found_host (line 791) | void hydra_report_found_host(int32_t port, char *ip, char *svc, FILE *fp) {
  function hydra_report_found_host_msg (line 833) | void hydra_report_found_host_msg(int32_t port, char *ip, char *svc, FILE...
  function hydra_connect_to_ssl (line 848) | int32_t hydra_connect_to_ssl(int32_t socket, char *hostname) {
  function hydra_connect_ssl (line 857) | int32_t hydra_connect_ssl(char *host, int32_t port, char *hostname) {
  function hydra_connect_tcp (line 870) | int32_t hydra_connect_tcp(char *host, int32_t port) {
  function hydra_connect_udp (line 878) | int32_t hydra_connect_udp(char *host, int32_t port) {
  function hydra_disconnect (line 886) | int32_t hydra_disconnect(int32_t socket) {
  function hydra_data_ready_writing_timed (line 901) | int32_t hydra_data_ready_writing_timed(int32_t socket, long sec, long us...
  function hydra_data_ready_writing (line 909) | int32_t hydra_data_ready_writing(int32_t socket) { return (hydra_data_re...
  function hydra_data_ready_timed (line 911) | int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec) {
  function hydra_data_ready (line 919) | int32_t hydra_data_ready(int32_t socket) { return (hydra_data_ready_time...
  function hydra_recv (line 921) | int32_t hydra_recv(int32_t socket, char *buf, uint32_t length) {
  function hydra_recv_nb (line 935) | int32_t hydra_recv_nb(int32_t socket, char *buf, uint32_t length) {
  function hydra_send (line 1035) | int32_t hydra_send(int32_t socket, char *buf, uint32_t size, int32_t opt...
  function make_to_lower (line 1062) | int32_t make_to_lower(char *buf) {
  function hydra_conv64 (line 1121) | unsigned char hydra_conv64(unsigned char in) {
  function hydra_tobase64 (line 1138) | void hydra_tobase64(unsigned char *buf, uint32_t buflen, uint32_t bufsiz...
  function hydra_dump_asciihex (line 1187) | void hydra_dump_asciihex(unsigned char *string, int32_t length) {
  type sockaddr_in (line 1241) | struct sockaddr_in
  type sockaddr_in6 (line 1242) | struct sockaddr_in6
  type in_addr (line 1246) | struct in_addr
  type sockaddr_in (line 1264) | struct sockaddr_in
  type sockaddr_in6 (line 1265) | struct sockaddr_in6
  type in_addr (line 1269) | struct in_addr
  function hydra_set_srcport (line 1292) | void hydra_set_srcport(int32_t port) { src_port = port; }
  function hydra_string_match (line 1295) | int32_t hydra_string_match(char *str, const char *regex) {
  function hydra_dump_data (line 1370) | void hydra_dump_data(unsigned char *buf, int32_t len, char *text) {
  function hydra_memsearch (line 1429) | int32_t hydra_memsearch(char *haystack, int32_t hlen, char *needle, int3...

FILE: hydra-mod.h
  type BOOL (line 71) | typedef int32_t BOOL;
  type BOOL (line 75) | typedef bool BOOL;
  type BOOL (line 77) | typedef signed char BOOL;

FILE: hydra-mongodb.c
  function dummy_mongodb (line 15) | void dummy_mongodb() { printf("\n"); }
  function is_error_msg (line 26) | int is_error_msg(char *msg) {
  function require_auth (line 35) | int require_auth(int32_t sock) {
  function start_mongodb (line 57) | int32_t start_mongodb(int32_t s, char *ip, int32_t port, unsigned char o...
  function service_mongodb (line 125) | void service_mongodb(char *ip, int32_t sp, unsigned char options, char *...
  function service_mongodb_init (line 159) | int32_t service_mongodb_init(char *ip, int32_t sp, unsigned char options...
  function usage_mongodb (line 195) | void usage_mongodb(const char *service) {

FILE: hydra-mssql.c
  function start_mssql (line 60) | int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_mssql (line 157) | void service_mssql(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_mssql_init (line 207) | int32_t service_mssql_init(char *ip, int32_t sp, unsigned char options, ...

FILE: hydra-mysql.c
  function dummy_mysql (line 11) | void dummy_mysql() { printf("\n"); }
  function service_mysql (line 13) | void service_mysql(char *ip, int32_t sp, unsigned char options, char *mi...
  function hydra_mysql_init (line 89) | char hydra_mysql_init(int32_t sock) {
  function hydra_mysql_parse_response (line 160) | char hydra_mysql_parse_response(unsigned char *response) {
  function hydra_mysql_send_com_quit (line 172) | char hydra_mysql_send_com_quit(int32_t sock) {
  function start_mysql (line 179) | int32_t start_mysql(int32_t sock, char *ip, int32_t port, unsigned char ...
  function service_mysql (line 306) | void service_mysql(char *ip, int32_t sp, unsigned char options, char *mi...
  type hydra_rand_struct (line 367) | struct hydra_rand_struct {
  function hydra_randominit (line 372) | void hydra_randominit(struct hydra_rand_struct *rand_st, unsigned long s...
  function hydra_rnd (line 379) | double hydra_rnd(struct hydra_rand_struct *rand_st) {
  function hydra_hash_password (line 384) | void hydra_hash_password(unsigned long *result, const char *password) {
  type hydra_rand_struct (line 403) | struct hydra_rand_struct
  function service_mysql_init (line 424) | int32_t service_mysql_init(char *ip, int32_t sp, unsigned char options, ...
  function usage_mysql (line 438) | void usage_mysql(const char *service) {

FILE: hydra-ncp.c
  function dummy_ncp (line 16) | void dummy_ncp() { printf("\n"); }
  type _NCP_DATA (line 27) | typedef struct __NCP_DATA {
  function start_ncp (line 36) | int32_t start_ncp(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_ncp (line 131) | void service_ncp(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_ncp_init (line 181) | int32_t service_ncp_init(char *ip, int32_t sp, unsigned char options, ch...
  function usage_ncp (line 195) | void usage_ncp(const char *service) {

FILE: hydra-nntp.c
  function start_nntp (line 50) | int32_t start_nntp(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_nntp_init (line 473) | int32_t service_nntp_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_nntp (line 487) | void usage_nntp(const char *service) {

FILE: hydra-oracle-listener.c
  function dummy_oracle_listener (line 16) | void dummy_oracle_listener() { printf("\n"); }
  function initial_permutation (line 28) | int32_t initial_permutation(unsigned char **result, char *p_str, int32_t...
  function ora_hash (line 68) | int32_t ora_hash(unsigned char **orahash, unsigned char *buf, int32_t le...
  function convert_byteorder (line 82) | int32_t convert_byteorder(unsigned char **result, int32_t size) {
  function ora_descrypt (line 104) | int32_t ora_descrypt(unsigned char **rs, unsigned char *result, int32_t ...
  function ora_hash_password (line 139) | int32_t ora_hash_password(char *pass) {
  function start_oracle_listener (line 181) | int32_t start_oracle_listener(int32_t s, char *ip, int32_t port, unsigne...
  function service_oracle_listener (line 260) | void service_oracle_listener(char *ip, int32_t sp, unsigned char options...
  function service_oracle_listener_init (line 329) | int32_t service_oracle_listener_init(char *ip, int32_t sp, unsigned char...
  function usage_oracle_listener (line 343) | void usage_oracle_listener(const char *service) {

FILE: hydra-oracle-sid.c
  function dummy_oracle_sid (line 14) | void dummy_oracle_sid() { printf("\n"); }
  function start_oracle_sid (line 24) | int32_t start_oracle_sid(int32_t s, char *ip, int32_t port, unsigned cha...
  function service_oracle_sid (line 87) | void service_oracle_sid(char *ip, int32_t sp, unsigned char options, cha...
  function service_oracle_sid_init (line 138) | int32_t service_oracle_sid_init(char *ip, int32_t sp, unsigned char opti...

FILE: hydra-oracle.c
  function dummy_oracle (line 16) | void dummy_oracle() { printf("\n"); }
  function print_oracle_error (line 36) | void print_oracle_error(char *err) {
  function start_oracle (line 43) | int32_t start_oracle(int32_t s, char *ip, int32_t port, unsigned char op...
  function service_oracle (line 136) | void service_oracle(char *ip, int32_t sp, unsigned char options, char *m...
  function service_oracle_init (line 193) | int32_t service_oracle_init(char *ip, int32_t sp, unsigned char options,...
  function usage_oracle (line 207) | void usage_oracle(const char *service) {

FILE: hydra-pcanywhere.c
  function send_cstring (line 13) | int32_t send_cstring(int32_t s, char *crypted_string) {
  function show_buffer (line 28) | void show_buffer(char *buffer, int32_t size) {
  function clean_buffer (line 38) | void clean_buffer(char *buf, int32_t size) {
  function print_encrypted_str (line 51) | void print_encrypted_str(char *str) {
  function pca_encrypt (line 61) | void pca_encrypt(char *cleartxt) {
  function pca_decrypt (line 76) | void pca_decrypt(char *password) {
  function debugprintf (line 89) | void debugprintf(char *msg) {
  function start_pcanywhere (line 94) | int32_t start_pcanywhere(int32_t s, char *ip, int32_t port, unsigned cha...
  function service_pcanywhere (line 227) | void service_pcanywhere(char *ip, int32_t sp, unsigned char options, cha...
  function service_pcanywhere_init (line 281) | int32_t service_pcanywhere_init(char *ip, int32_t sp, unsigned char opti...

FILE: hydra-pcnfs.c
  type rpc_hdr (line 12) | struct rpc_hdr { /* 24 */
  type pr_auth_args (line 21) | struct pr_auth_args {
  function start_pcnfs (line 36) | int32_t start_pcnfs(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_pcnfs (line 141) | void service_pcnfs(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_pcnfs_init (line 189) | int32_t service_pcnfs_init(char *ip, int32_t sp, unsigned char options, ...

FILE: hydra-pop3.c
  type pool (line 6) | typedef struct pool_str {
  function pool (line 23) | pool *list_create(pool data) {
  function pool (line 38) | pool *list_insert(pool data) {
  function pool (line 48) | pool *list_find(char *ip) {
  function list_remove (line 62) | int32_t list_remove(pool *node) {
  function start_pop3 (line 120) | int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_pop3 (line 415) | void service_pop3(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_pop3_init (line 515) | int32_t service_pop3_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_pop3 (line 778) | void usage_pop3(const char *service) {

FILE: hydra-postgres.c
  function dummy_postgres (line 11) | void dummy_postgres() { printf("\n"); }
  function start_postgres (line 22) | int32_t start_postgres(int32_t s, char *ip, int32_t port, unsigned char ...
  function service_postgres (line 66) | void service_postgres(char *ip, int32_t sp, unsigned char options, char ...
  function service_postgres_init (line 121) | int32_t service_postgres_init(char *ip, int32_t sp, unsigned char option...
  function usage_postgres (line 135) | void usage_postgres(const char *service) {

FILE: hydra-radmin2.c
  type rmessage (line 12) | struct rmessage {
  function checksum (line 27) | uint32_t checksum(struct rmessage *msg) {
  function challenge_request (line 56) | void challenge_request(struct rmessage *msg) {
  function challenge_response (line 68) | void challenge_response(struct rmessage *msg, unsigned char *solution) {
  type rmessage (line 82) | struct rmessage
  type rmessage (line 122) | struct rmessage
  type rmessage (line 123) | struct rmessage
  type rmessage (line 124) | struct rmessage
  function start_radmin2 (line 169) | int32_t start_radmin2(int32_t s, char *ip, int32_t port, unsigned char o...
  function service_radmin2 (line 171) | void service_radmin2(char *ip, int32_t sp, unsigned char options, char *...
  function service_radmin2_init (line 374) | int32_t service_radmin2_init(char *ip, int32_t sp, unsigned char options...

FILE: hydra-rdp.c
  function dummy_rdp (line 15) | void dummy_rdp() { printf("\n"); }
  function BOOL (line 21) | BOOL rdp_connect(char *server, int32_t port, char *domain, char *login, ...
  function start_rdp (line 49) | int32_t start_rdp(char *ip, int32_t port, unsigned char options, char *m...
  function service_rdp (line 114) | void service_rdp(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_rdp_init (line 154) | int32_t service_rdp_init(char *ip, int32_t sp, unsigned char options, ch...
  function usage_rdp (line 178) | void usage_rdp(const char *service) {

FILE: hydra-redis.c
  function start_redis (line 6) | int32_t start_redis(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_redis_core (line 59) | void service_redis_core(char *ip, int32_t sp, unsigned char options, cha...
  function service_redis (line 112) | void service_redis(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_redis_init (line 130) | int32_t service_redis_init(char *ip, int32_t sp, unsigned char options, ...

FILE: hydra-rexec.c
  function start_rexec (line 9) | int32_t start_rexec(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_rexec (line 47) | void service_rexec(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_rexec_init (line 96) | int32_t service_rexec_init(char *ip, int32_t sp, unsigned char options, ...

FILE: hydra-rlogin.c
  function service_rlogin (line 90) | void service_rlogin(char *ip, int32_t sp, unsigned char options, char *m...
  function service_rlogin_init (line 142) | int32_t service_rlogin_init(char *ip, int32_t sp, unsigned char options,...

FILE: hydra-rpcap.c
  function start_rpcap (line 9) | int32_t start_rpcap(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_rpcap (line 75) | void service_rpcap(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_rpcap_init (line 123) | int32_t service_rpcap_init(char *ip, int32_t sp, unsigned char options, ...

FILE: hydra-rsh.c
  function service_rsh (line 60) | void service_rsh(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_rsh_init (line 111) | int32_t service_rsh_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-rtsp.c
  function is_Unauthorized (line 22) | int32_t is_Unauthorized(char *s) {
  function is_NotFound (line 30) | int32_t is_NotFound(char *s) {
  function is_Authorized (line 38) | int32_t is_Authorized(char *s) {
  function use_Basic_Auth (line 46) | int32_t use_Basic_Auth(char *s) {
  function use_Digest_Auth (line 54) | int32_t use_Digest_Auth(char *s) {
  function create_core_packet (line 62) | void create_core_packet(int32_t control, char *ip, int32_t port) {
  function start_rtsp (line 75) | int32_t start_rtsp(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_rtsp (line 181) | void service_rtsp(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_rtsp_init (line 228) | int32_t service_rtsp_init(char *ip, int32_t sp, unsigned char options, c...

FILE: hydra-s7-300.c
  function start_s7_300 (line 27) | int32_t start_s7_300(int32_t s, char *ip, int32_t port, unsigned char op...
  function service_s7_300 (line 136) | void service_s7_300(char *ip, int32_t sp, unsigned char options, char *m...
  function service_s7_300_init (line 175) | int32_t service_s7_300_init(char *ip, int32_t sp, unsigned char options,...
  function usage_s7_300 (line 299) | void usage_s7_300(const char *service) {

FILE: hydra-sapr3.c
  function dummy_sapr3 (line 4) | void dummy_sapr3() { printf("\n"); }
  function start_sapr3 (line 21) | int32_t start_sapr3(int32_t s, char *ip, int32_t port, unsigned char opt...
  function service_sapr3 (line 93) | void service_sapr3(char *ip, int32_t sp, unsigned char options, char *mi...
  function service_sapr3_init (line 123) | int32_t service_sapr3_init(char *ip, int32_t sp, unsigned char options, ...
  function usage_sapr3 (line 137) | void usage_sapr3(const char *service) { printf("Module sapr3 requires th...

FILE: hydra-sip.c
  function dummy_sip (line 13) | void dummy_sip() { printf("\n"); }
  function empty_register (line 28) | void empty_register(char *buf, char *host, char *lhost, int32_t port, in...
  function get_sip_code (line 41) | int32_t get_sip_code(char *buf) {
  function service_sip (line 192) | void service_sip(char *ip, int32_t sp, unsigned char options, char *misc...
  type sockaddr_in (line 268) | struct sockaddr_in
  type sockaddr (line 274) | struct sockaddr
  type sockaddr_in (line 274) | struct sockaddr_in
  type sockaddr_in (line 279) | struct sockaddr_in
  type sockaddr_in (line 279) | struct sockaddr_in
  type sockaddr_in (line 280) | struct sockaddr_in
  function service_sip_init (line 306) | int32_t service_sip_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-smb.c
  function dummy_smb (line 3) | void dummy_smb() { printf("\n"); }
  function UTF8_UTF16LE (line 109) | static size_t UTF8_UTF16LE(unsigned char *in, int32_t insize, unsigned c...
  function Get7Bits (line 150) | static unsigned char Get7Bits(unsigned char *input, int32_t startBit) {
  function MakeKey (line 162) | static void MakeKey(unsigned char *key, unsigned char *DES_key) {
  function DesEncrypt (line 176) | void DesEncrypt(unsigned char *clear, unsigned char *key, unsigned char ...
  function HashLM (line 193) | int32_t HashLM(unsigned char **lmhash, unsigned char *pass, unsigned cha...
  function MakeNTLM (line 295) | int32_t MakeNTLM(unsigned char *ntlmhash, unsigned char *pass) {
  function HashLMv2 (line 385) | int32_t HashLMv2(unsigned char **LMv2hash, unsigned char *szLogin, unsig...
  function HashNTLMv2 (line 485) | int32_t HashNTLMv2(unsigned char **NTLMv2hash, int32_t *iByteCount, unsi...
  function HashNTLM (line 647) | int32_t HashNTLM(unsigned char **ntlmhash, unsigned char *pass, unsigned...
  function NBSSessionRequest (line 674) | int32_t NBSSessionRequest(int32_t s) {
  function SMBNegProt (line 722) | int32_t SMBNegProt(int32_t s) {
  function SMBSessionSetup (line 872) | unsigned long SMBSessionSetup(int32_t s, char *szLogin, char *szPassword...
  function start_smb (line 1218) | int32_t start_smb(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_smb (line 1341) | void service_smb(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_smb_init (line 1467) | int32_t service_smb_init(char *ip, int32_t sp, unsigned char options, ch...
  function usage_smb (line 1526) | void usage_smb(const char *service) {

FILE: hydra-smb2.c
  type creds_t (line 33) | typedef struct creds {
  function smb2_auth_provider (line 48) | void smb2_auth_provider(SMBCCTX *c, const char *srv, const char *shr, ch...
  function smb2_run_test (line 58) | bool smb2_run_test(creds_t *cr, const char *server, uint16_t port) {
  function service_smb2 (line 176) | void service_smb2(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_smb2_init (line 214) | int32_t service_smb2_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_smb2 (line 287) | void usage_smb2(const char *service) {

FILE: hydra-smtp-enum.c
  function service_smtp_enum (line 157) | void service_smtp_enum(char *ip, int32_t sp, unsigned char options, char...
  function service_smtp_enum_init (line 262) | int32_t service_smtp_enum_init(char *ip, int32_t sp, unsigned char optio...
  function usage_smtp_enum (line 276) | void usage_smtp_enum(const char *service) {

FILE: hydra-smtp.c
  function start_smtp (line 39) | int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_smtp (line 264) | void service_smtp(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_smtp_init (line 459) | int32_t service_smtp_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_smtp (line 473) | void usage_smtp(const char *service) {

FILE: hydra-snmp.c
  type SNMPV1_A (line 26) | struct SNMPV1_A {
  type SNMPV1_A (line 34) | struct SNMPV1_A
  type SNMPV1_R (line 40) | struct SNMPV1_R {
  type SNMPV1_W (line 60) | struct SNMPV1_W {
  function password_to_key_md5 (line 81) | void password_to_key_md5(u_char *password,   /* IN */
  function password_to_key_sha (line 134) | void password_to_key_sha(u_char *password,   /* IN */
  function start_snmp (line 183) | int32_t start_snmp(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_snmp (line 459) | void service_snmp(char *ip, int32_t sp, unsigned char options, char *mis...
  function service_snmp_init (line 563) | int32_t service_snmp_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_snmp (line 577) | void usage_snmp(const char *service) {

FILE: hydra-socks5.c
  function start_socks5 (line 17) | int32_t start_socks5(int32_t s, char *ip, int32_t port, unsigned char op...
  function service_socks5 (line 107) | void service_socks5(char *ip, int32_t sp, unsigned char options, char *m...
  function service_socks5_init (line 168) | int32_t service_socks5_init(char *ip, int32_t sp, unsigned char options,...

FILE: hydra-ssh.c
  function dummy_ssh (line 11) | void dummy_ssh() { printf("\n"); }
  function start_ssh (line 24) | int32_t start_ssh(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_ssh (line 115) | void service_ssh(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_ssh_init (line 168) | int32_t service_ssh_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-sshkey.c
  function dummy_sshkey (line 11) | void dummy_sshkey() { printf("\n"); }
  function start_sshkey (line 23) | int32_t start_sshkey(int32_t s, char *ip, int32_t port, unsigned char op...
  function service_sshkey (line 111) | void service_sshkey(char *ip, int32_t sp, unsigned char options, char *m...
  function service_sshkey_init (line 159) | int32_t service_sshkey_init(char *ip, int32_t sp, unsigned char options,...
  function usage_sshkey (line 173) | void usage_sshkey(const char *service) {

FILE: hydra-svn.c
  function dummy_svn (line 30) | void dummy_svn() { printf("\n"); }
  function svn_error_t (line 40) | static svn_error_t *print_dirdummy(void *baton, const char *path, const ...
  function svn_error_t (line 42) | static svn_error_t *my_simple_prompt_callback(svn_auth_cred_simple_t **c...
  function service_svn (line 164) | void service_svn(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_svn_init (line 221) | int32_t service_svn_init(char *ip, int32_t sp, unsigned char options, ch...
  function usage_svn (line 243) | void usage_svn(const char *service) {

FILE: hydra-teamspeak.c
  type team_speak (line 20) | struct team_speak {
  function start_teamspeak (line 40) | int32_t start_teamspeak(int32_t s, char *ip, int32_t port, unsigned char...
  function service_teamspeak (line 104) | void service_teamspeak(char *ip, int32_t sp, unsigned char options, char...
  function service_teamspeak_init (line 144) | int32_t service_teamspeak_init(char *ip, int32_t sp, unsigned char optio...

FILE: hydra-telnet.c
  function is_failure (line 16) | static int is_failure(const char *buffer) {
  function start_telnet (line 66) | int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char op...
  function service_telnet (line 268) | void service_telnet(char *ip, int32_t sp, unsigned char options, char *m...
  function service_telnet_init (line 383) | int32_t service_telnet_init(char *ip, int32_t sp, unsigned char options,...
  function usage_telnet (line 387) | void usage_telnet(const char *service) {

FILE: hydra-time.c
  function sleepn (line 5) | int32_t sleepn(time_t seconds) {
  function usleepn (line 11) | int32_t usleepn(uint64_t milisec) {
  function sleepn (line 21) | int32_t sleepn(uint32_t seconds) { return SleepEx(milisec * 1000, TRUE); }
  function usleepn (line 23) | int32_t usleepn(uint32_t milisec) { return SleepEx(milisec, TRUE); }

FILE: hydra-vmauthd.c
  function start_vmauthd (line 12) | int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char o...
  function service_vmauthd (line 67) | void service_vmauthd(char *ip, int32_t sp, unsigned char options, char *...
  function service_vmauthd_init (line 149) | int32_t service_vmauthd_init(char *ip, int32_t sp, unsigned char options...

FILE: hydra-vnc.c
  function vncEncryptBytes (line 29) | void vncEncryptBytes(unsigned char *bytes, char *passwd) {
  function start_vnc (line 47) | int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char optio...
  function service_vnc (line 148) | void service_vnc(char *ip, int32_t sp, unsigned char options, char *misc...
  function service_vnc_init (line 237) | int32_t service_vnc_init(char *ip, int32_t sp, unsigned char options, ch...

FILE: hydra-xmpp.c
  function start_xmpp (line 15) | int32_t start_xmpp(int32_t s, char *ip, int32_t port, unsigned char opti...
  function service_xmpp (line 282) | void service_xmpp(char *target, char *ip, int32_t sp, unsigned char opti...
  function service_xmpp_init (line 495) | int32_t service_xmpp_init(char *ip, int32_t sp, unsigned char options, c...
  function usage_xmpp (line 509) | void usage_xmpp(const char *service) {

FILE: hydra.c
  type head_state_t (line 251) | typedef enum { HEAD_DISABLED = -1, HEAD_UNUSED = 0, HEAD_ACTIVE = 1 } he...
  type target_state_t (line 253) | typedef enum { TARGET_ACTIVE = 0, TARGET_FINISHED = 1, TARGET_ERROR = 2,...
  type hydra_head (line 256) | typedef struct {
  type hydra_target (line 268) | typedef struct {
  type hydra_brain (line 293) | typedef struct {
  type hydra_portlist (line 309) | typedef struct {
  function check_flag (line 482) | int32_t                                   /*inline*/
  function help (line 487) | void help(int32_t ext) {
  function help_bfg (line 592) | void help_bfg() {
  function module_usage (line 620) | void module_usage() {
  function hydra_debug (line 644) | void hydra_debug(int32_t force, char *string) {
  function bail (line 683) | void bail(char *text) {
  function hydra_restore_write (line 688) | void hydra_restore_write(int32_t print_msg) {
  function hydra_restore_read (line 783) | void hydra_restore_read() {
  function killed_childs (line 1030) | void killed_childs(int32_t signo) {
  function killed_childs_report (line 1044) | void killed_childs_report(int32_t signo) {
  function kill_children (line 1051) | void kill_children(int32_t signo) {
  type tm (line 1169) | struct tm
  function hydra_service_init (line 1178) | void hydra_service_init(int32_t target_no) {
  function hydra_spawn_head (line 1222) | int32_t hydra_spawn_head(int32_t head_no, int32_t target_no) {
  function hydra_lookup_port (line 1324) | int32_t hydra_lookup_port(char *service) {
  function hydra_kill_head (line 1413) | void hydra_kill_head(int32_t head_no, int32_t killit, int32_t fail) {
  function hydra_increase_fail_count (line 1457) | void hydra_increase_fail_count(int32_t target_no, int32_t head_no) {
  function delete_junk_files (line 1598) | void delete_junk_files() { remove(junk_file); }
  function FILE (line 1600) | FILE *hydra_divide_file(FILE *file, uint32_t my_segment, uint32_t num_se...
  function hydra_send_next_pair (line 1658) | int32_t hydra_send_next_pair(int32_t target_no, int32_t head_no) {
  function hydra_skip_user (line 2018) | void hydra_skip_user(int32_t target_no, char *username) {
  function hydra_check_for_exit_condition (line 2056) | int32_t hydra_check_for_exit_condition() {
  function hydra_select_target (line 2083) | int32_t hydra_select_target() {
  function process_proxy_line (line 2095) | void process_proxy_line(int32_t type, char *string) {
  function main (line 2235) | int main(int argc, char *argv[]) {

FILE: hydra.h
  type hydra_mode_t (line 176) | typedef enum { MODE_PASSWORD_LIST = 1, MODE_LOGIN_LIST = 2, MODE_PASSWOR...
  type output_format_t (line 178) | typedef enum { FORMAT_PLAIN_TEXT, FORMAT_JSONV1, FORMAT_JSONV2, FORMAT_X...
  type hydra_option (line 180) | typedef struct {

FILE: libpq-fe.h
  type ConnStatusType (line 38) | typedef enum {
  type PostgresPollingStatusType (line 63) | typedef enum {
  type ExecStatusType (line 72) | typedef enum {
  type PGTransactionStatusType (line 88) | typedef enum {
  type PGVerbosity (line 96) | typedef enum {
  type PGconn (line 105) | typedef struct pg_conn PGconn;
  type PGresult (line 112) | typedef struct pg_result PGresult;
  type PGnotify (line 120) | typedef struct pgNotify {
  type pqbool (line 131) | typedef char pqbool;
  type PQprintOpt (line 133) | typedef struct _PQprintOpt {
  type PQconninfoOption (line 156) | typedef struct _PQconninfoOption {
  type PQArgBlock (line 174) | typedef struct {

FILE: ntlm.c
  function uint32 (line 390) | static uint32 F(uint32 X, uint32 Y, uint32 Z) { return (X & Y) | ((~X) &...
  function uint32 (line 392) | static uint32 G(uint32 X, uint32 Y, uint32 Z) { return (X & Y) | (X & Z)...
  function uint32 (line 394) | static uint32 H(uint32 X, uint32 Y, uint32 Z) { return X ^ Y ^ Z; }
  function uint32 (line 396) | static uint32 lshift(uint32 x, int32_t s) {
  function mdfour64 (line 406) | static void mdfour64(uint32 *M) {
  function copy64 (line 484) | static void copy64(uint32 *M, unsigned char *in) {
  function copy4 (line 491) | static void copy4(unsigned char *out, uint32 x) {
  function mdfour (line 499) | void mdfour(unsigned char *out, unsigned char *in, int32_t n) {
  function permute (line 580) | static void permute(char *out, char *in, uchar *p, int32_t n) {
  function l_shift (line 587) | static void l_shift(char *d, int32_t count, int32_t n) {
  function concat (line 597) | static void concat(char *out, char *in1, char *in2, int32_t l1, int32_t ...
  function xor (line 604) | void xor
  function dohash (line 612) | static void dohash(char *out, char *in, char *key, int32_t forw) {
  function str_to_key (line 691) | static void str_to_key(unsigned char *str, unsigned char *key) {
  function smbhash (line 707) | static void smbhash(unsigned char *out, unsigned char *in, unsigned char...
  function E_P16 (line 734) | void E_P16(unsigned char *p14, unsigned char *p16) {
  function E_P24 (line 740) | void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24) {
  function D_P16 (line 746) | void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out) {
  function E_old_pw_hash (line 751) | void E_old_pw_hash(unsigned char *p14, unsigned char *in, unsigned char ...
  function cred_hash1 (line 756) | void cred_hash1(unsigned char *out, unsigned char *in, unsigned char *ke...
  function cred_hash2 (line 763) | void cred_hash2(unsigned char *out, unsigned char *in, unsigned char *ke...
  function cred_hash3 (line 772) | void cred_hash3(unsigned char *out, unsigned char *in, unsigned char *ke...
  function SamOEMhash (line 780) | void SamOEMhash(unsigned char *data, unsigned char *key, int32_t val) {
  function skip_multibyte_char (line 838) | size_t skip_multibyte_char(char c) { return 0; }
  function strupper (line 870) | void strupper(char *s) {
  function SMBencrypt (line 894) | void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24) {
  function _my_wcslen (line 915) | static int32_t _my_wcslen(int16 *str) {
  function _my_mbstowcs (line 930) | static int32_t _my_mbstowcs(int16 *dst, uchar *src, int32_t len) {
  function E_md4hash (line 949) | void E_md4hash(uchar *passwd, uchar *p16) {
  function nt_lm_owf_gen (line 967) | void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]) {
  function SMBOWFencrypt (line 1002) | void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]) {
  function NTLMSSPOWFencrypt (line 1012) | void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[2...
  function SMBNTencrypt (line 1030) | void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24) {
  function BOOL (line 1048) | BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_...
  function dumpRaw (line 1151) | static void dumpRaw(FILE *fp, unsigned char *buf, size_t len) {
  function buildAuthRequest (line 1200) | void buildAuthRequest(tSmbNtlmAuthRequest *request, long flags, char *ho...
  function buildAuthResponse (line 1232) | void buildAuthResponse(tSmbNtlmAuthChallenge *challenge, tSmbNtlmAuthRes...
  function dumpAuthRequest (line 1289) | void dumpAuthRequest(FILE *fp, tSmbNtlmAuthRequest *request) {
  function dumpAuthChallenge (line 1298) | void dumpAuthChallenge(FILE *fp, tSmbNtlmAuthChallenge *challenge) {
  function dumpAuthResponse (line 1309) | void dumpAuthResponse(FILE *fp, tSmbNtlmAuthResponse *response) {
  function to64frombits (line 1347) | void to64frombits(unsigned char *out, const unsigned char *in, int32_t i...
  function from64tobits (line 1372) | int32_t from64tobits(char *out, const char *in)

FILE: ntlm.h
  type uint16 (line 79) | typedef unsigned short uint16;
  type uint32 (line 80) | typedef uint32_t uint32;
  type uint8 (line 81) | typedef unsigned char uint8;
  type tSmbStrHeader (line 83) | typedef struct {
  type tSmbNtlmAuthRequest (line 89) | typedef struct {
  type tSmbNtlmAuthChallenge (line 99) | typedef struct {
  type tSmbNtlmAuthResponse (line 111) | typedef struct {

FILE: performance.h
  function my_select (line 10) | int32_t my_select(int32_t fd, fd_set *fdread, fd_set *fdwrite, fd_set *f...
  function read_safe (line 33) | ssize_t read_safe(int32_t fd, void *buffer, size_t len) {

FILE: postgres_ext.h
  type Oid (line 31) | typedef uint32_t Oid;

FILE: pw-inspector.c
  function help (line 17) | void help() {
  function main (line 48) | int main(int argc, char *argv[]) {

FILE: sasl.c
  function print_hex (line 9) | int32_t print_hex(unsigned char *buf, int32_t len) {
  function sasl_saslprep (line 29) | int32_t sasl_saslprep(const char *in, sasl_saslprep_flags flags, char **...

FILE: sasl.h
  type sasl_saslprep_flags (line 31) | typedef enum { SASL_ALLOW_UNASSIGNED = 1 } sasl_saslprep_flags;
Condensed preview — 129 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,592K chars).
[
  {
    "path": ".clang-format",
    "chars": 3394,
    "preview": "---\nLanguage:        Cpp\nAccessModifierOffset: -2\nAlignAfterOpenBracket: Align\nAlignConsecutiveAssignments: false\nAlignC"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 1127,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**IMPORTANT**\nTh"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 841,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**IMPORTANT**"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 977,
    "preview": "name: release\n\non:\n  push:\n    branches: [master, main]\n    tags-ignore: ['**']\n    paths-ignore: [README, TODO, PROBLEM"
  },
  {
    "path": ".gitignore",
    "chars": 476,
    "preview": "*~\n*.o\nMakefile\nMakefile.in\nhydra\nhydra.exe\nhydra.restore\nxhydra\nxhydra.exe\nhydra-gtk/INSTALL\nhydra-gtk/Makefile.in\nhydr"
  },
  {
    "path": ".travis.yml",
    "chars": 258,
    "preview": "language: c\nsudo: required\ndist: trusty\nos:\n  - linux\n  - osx\narch:\n  - amd64\n  - ppc64le\ncompiler:\n  - clang\n  - gcc\nma"
  },
  {
    "path": "Android.mk",
    "chars": 1864,
    "preview": "LOCAL_PATH:= $(call my-dir)\ninclude $(CLEAR_VARS)\n\nLOCAL_CFLAGS:= -O3 -DLIBOPENSSL -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE \\\n"
  },
  {
    "path": "CHANGES",
    "chars": 42316,
    "preview": "Changelog for hydra\n-------------------\n\nRelease 9.7-dev\n* GTK3 support for xhydra by elboulangero\n* mongo v2 support (t"
  },
  {
    "path": "CITATION.cff",
    "chars": 449,
    "preview": "cff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\nauthors:\n  - given-names: Marc\n    fami"
  },
  {
    "path": "Dockerfile",
    "chars": 2344,
    "preview": "FROM debian:bookworm-slim\n\nARG HYDRA_VERSION=\"github\"\n\nLABEL \\\n    org.opencontainers.image.url=\"https://github.com/vanh"
  },
  {
    "path": "INSTALL",
    "chars": 1409,
    "preview": "type \"./configure\", then \"make\" and finally \"sudo make install\"\n\nFor special modules you need to install software packag"
  },
  {
    "path": "LICENSE",
    "chars": 34523,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "LICENSE_OPENSSL",
    "chars": 8665,
    "preview": "/* \n * (c) 2002, 2003, 2004 by Jason McLaughlin and Riadh Elloumi\n *\n * This program is free software; you can redistrib"
  },
  {
    "path": "Makefile.am",
    "chars": 5653,
    "preview": "#\n# Makefile for Hydra - (c) 2001-2023 by van Hauser / THC <vh@thc.org>\n#\nWARN_CLANG=-Wformat-nonliteral -Wstrncat-size "
  },
  {
    "path": "Makefile.orig",
    "chars": 149,
    "preview": "all:\n\t@echo Error: you must run \"./configure\" first\n\nclean:\n\tcp -f Makefile.orig Makefile\n\nuninstall:\n\t@echo Error: you "
  },
  {
    "path": "Makefile.unix",
    "chars": 12,
    "preview": "STRIP=strip\n"
  },
  {
    "path": "PROBLEMS",
    "chars": 196,
    "preview": "List of known issues:\n=====================\n\n* Cygwin: more than 30 tasks (-t 31 or more) will lead to a stack smash\n* O"
  },
  {
    "path": "README",
    "chars": 20086,
    "preview": "\n\t\t\t\t  H Y D R A\n\n                      (c) 2001-2023 by van Hauser / THC\n             <vh@thc.org> https://github.com/v"
  },
  {
    "path": "TODO",
    "chars": 1186,
    "preview": "\n./configure:\n - add test for -march=native\n\n--- this is old ---\n\nPrio 1:\n* add cookie support to hydra-http.c\n* hydra-s"
  },
  {
    "path": "_config.yml",
    "chars": 49,
    "preview": "title: \"thc-hydra\" \ntheme: jekyll-theme-midnight\n"
  },
  {
    "path": "bfg.c",
    "chars": 6990,
    "preview": "\n/* code original by Jan Dlabal <dlabaljan@gmail.com>, partially rewritten by vh. */\n\n#include <ctype.h>\n#include <math."
  },
  {
    "path": "bfg.h",
    "chars": 3330,
    "preview": "/*    (c) 2008 Jan Dlabal <dlabaljan@gmail.com>                               */\n/*                                     "
  },
  {
    "path": "configure",
    "chars": 58115,
    "preview": "#!/bin/sh\n#\n# uname -s = Linux | OpenBSD | FreeBSD | Darwin\n# uname -m = i636 or x86_64\n\nif [ \"$1\" = \"-h\" -o \"$1\" = \"--h"
  },
  {
    "path": "crc32.c",
    "chars": 5663,
    "preview": "/*-\n *  COPYRIGHT (C) 1986 Gary S. Brown.  You may use this program, or\n *  code or tables extracted from it, as desired"
  },
  {
    "path": "crc32.h",
    "chars": 138,
    "preview": "#ifndef CRC32_H\n#define CRC32_H\n\n#include <sys/types.h>\n\n#ifndef HAVE_ZLIB\nuint32_t crc32(const void *buf, uint32_t size"
  },
  {
    "path": "d3des.c",
    "chars": 15944,
    "preview": "/* 2001 van Hauser for Hydra: commented out KnR Kn3 and Df_Key to remove\n   compiler warnings for unused definitions.\n *"
  },
  {
    "path": "d3des.h",
    "chars": 1789,
    "preview": "#ifdef __sun\n#include <sys/int_types.h>\n#elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)\n#include <int"
  },
  {
    "path": "dpl4hydra.sh",
    "chars": 6334,
    "preview": "#!/bin/sh\n#\n# Name:     dpl4hydra\n# Version:  0.9.9\n# Date:     2012-04-16\n# Author:   Roland Kessler / Twitter: @rokess"
  },
  {
    "path": "dpl4hydra_full.csv",
    "chars": 515368,
    "preview": "1net1,R-90,,,admin,1,Admin,,\n2wire,2071-A,All,gateway.2wire.net or 10.0.0.138,,,Admin,,\n2wire,2700HG B,4.25.19,http://19"
  },
  {
    "path": "dpl4hydra_local.csv",
    "chars": 515368,
    "preview": "1net1,R-90,,,admin,1,Admin,,\n2wire,2071-A,All,gateway.2wire.net or 10.0.0.138,,,Admin,,\n2wire,2700HG B,4.25.19,http://19"
  },
  {
    "path": "hmacmd5.c",
    "chars": 4259,
    "preview": "\n/*\n   Unix SMB/CIFS implementation.\n   HMAC MD5 code for use in NTLMv2\n   Copyright (C) Luke Kenneth Casson Leighton 19"
  },
  {
    "path": "hmacmd5.h",
    "chars": 1795,
    "preview": "/*\n   Unix SMB/CIFS implementation.\n   Interface header: Scheduler service\n   Copyright (C) Luke Kenneth Casson Leighton"
  },
  {
    "path": "hydra-adam6500.c",
    "chars": 5266,
    "preview": "#ifdef PALM\n#include \"palm/hydra-mod.h\"\n#else\n#include \"hydra-mod.h\"\n#endif\n\nextern char *HYDRA_EXIT;\n\nunsigned char ada"
  },
  {
    "path": "hydra-afp.c",
    "chars": 7023,
    "preview": "/*\n *\tApple Filing Protocol Support - by David Maciejak @ GMAIL dot com\n *\n *\ttested with afpfs-ng 0.8.1\n *\tAFPFS-NG: ht"
  },
  {
    "path": "hydra-asterisk.c",
    "chars": 4157,
    "preview": "// This plugin was written by david@\n//\n// This plugin is written for Asterisk Call Manager\n// which is running by defau"
  },
  {
    "path": "hydra-cisco-enable.c",
    "chars": 7666,
    "preview": "#include \"hydra-mod.h\"\n\nextern char *HYDRA_EXIT;\nchar *buf;\n\nint32_t start_cisco_enable(int32_t s, char *ip, int32_t por"
  },
  {
    "path": "hydra-cisco.c",
    "chars": 6397,
    "preview": "#ifdef PALM\n#include \"palm/hydra-mod.h\"\n#else\n#include \"hydra-mod.h\"\n#endif\n\nextern char *HYDRA_EXIT;\nstatic char *buf ="
  },
  {
    "path": "hydra-cobaltstrike.c",
    "chars": 3483,
    "preview": "#include \"hydra-mod.h\"\n\n#define CSLEN 256\n\nextern char *HYDRA_EXIT;\nchar *buf;\n\nint32_t start_cobaltstrike(int32_t s, ch"
  },
  {
    "path": "hydra-cvs.c",
    "chars": 4919,
    "preview": "#include \"hydra-mod.h\"\n\nextern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec);\n\nextern char *HYDRA_"
  },
  {
    "path": "hydra-firebird.c",
    "chars": 4757,
    "preview": "/*\n\nFirebird Support - by David Maciejak @ GMAIL dot com\n\nyou need to pass full path to the fdb file as argument\ndefault"
  },
  {
    "path": "hydra-ftp.c",
    "chars": 6018,
    "preview": "#include \"hydra-mod.h\"\n\nextern char *HYDRA_EXIT;\nchar *buf;\n\nint32_t start_ftp(int32_t s, char *ip, int32_t port, unsign"
  },
  {
    "path": "hydra-gtk/AUTHORS",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "hydra-gtk/COPYING",
    "chars": 17992,
    "preview": "\t\t    GNU GENERAL PUBLIC LICENSE\n\t\t       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc."
  },
  {
    "path": "hydra-gtk/ChangeLog",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "hydra-gtk/Makefile.am",
    "chars": 641,
    "preview": "## Process this file with automake to produce Makefile.in\n\nSUBDIRS = src\n\nEXTRA_DIST = \\\n\tautogen.sh \\\n\txhydra.glade \\\n\t"
  },
  {
    "path": "hydra-gtk/NEWS",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "hydra-gtk/README",
    "chars": 282,
    "preview": "Hydra-GTK\n\nGtk+3 frontend for thc-hydra\n\nTo install just do a:\n\n```\n./autogen.sh\nmake\nsu root\nmake install\n```\n\nEasy at "
  },
  {
    "path": "hydra-gtk/README-autoconf",
    "chars": 16288,
    "preview": "Installation Instructions\n*************************\n\nBasic Installation\n==================\n\n   The following shell comma"
  },
  {
    "path": "hydra-gtk/autogen.sh",
    "chars": 1016,
    "preview": "#!/bin/sh\n# Run this to generate all the initial makefiles, etc.\ntest -n \"$srcdir\" || srcdir=$(dirname \"$0\")\ntest -n \"$s"
  },
  {
    "path": "hydra-gtk/configure.ac",
    "chars": 331,
    "preview": "dnl Process this file with autoconf to produce a configure script.\n\nAC_INIT([xhydra],[0.1])\nAC_CONFIG_HEADERS([config.h]"
  },
  {
    "path": "hydra-gtk/make_xhydra.sh",
    "chars": 191,
    "preview": "#!/bin/sh\n\nset -e\n\necho \"Trying to compile xhydra now (hydra gtk gui)\"\nNOCONFIGURE=1 ./autogen.sh\n./configure\nmake\ncp -v"
  },
  {
    "path": "hydra-gtk/src/Makefile.am",
    "chars": 526,
    "preview": "## Process this file with automake to produce Makefile.in\n\n# Note: Use no-deprecated-declarations until someone finishes"
  },
  {
    "path": "hydra-gtk/src/callbacks.c",
    "chars": 23165,
    "preview": "\n/*\n * This file handles all that needs to be done...\n * Some stuff is stolen from gcombust since I never used pipes... "
  },
  {
    "path": "hydra-gtk/src/callbacks.h",
    "chars": 1126,
    "preview": "#include <gtk/gtk.h>\n\ngboolean update_statusbar(gpointer user_data);\n\nvoid on_quit1_activate(GtkMenuItem *menuitem, gpoi"
  },
  {
    "path": "hydra-gtk/src/interface.c",
    "chars": 55980,
    "preview": "\n/*\n * DO NOT EDIT THIS FILE - it is generated by Glade.\n */\n\n#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif\n\n#include "
  },
  {
    "path": "hydra-gtk/src/interface.h",
    "chars": 95,
    "preview": "\n/*\n * DO NOT EDIT THIS FILE - it is generated by Glade.\n */\n\nGtkWidget *create_wndMain(void);\n"
  },
  {
    "path": "hydra-gtk/src/main.c",
    "chars": 2467,
    "preview": "\n/*\n * Initial main.c file generated by Glade. Edit as required.\n * Glade will not overwrite this file.\n */\n\n#ifdef HAVE"
  },
  {
    "path": "hydra-gtk/src/support.c",
    "chars": 2987,
    "preview": "\n/*\n * DO NOT EDIT THIS FILE - it is generated by Glade.\n */\n\n#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif\n\n#include "
  },
  {
    "path": "hydra-gtk/src/support.h",
    "chars": 1125,
    "preview": "\n/*\n * DO NOT EDIT THIS FILE - it is generated by Glade.\n */\n\n#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif\n\n#include "
  },
  {
    "path": "hydra-gtk/xhydra.glade",
    "chars": 107551,
    "preview": "<?xml version=\"1.0\" standalone=\"no\"?> <!--*- mode: xml -*-->\n<!DOCTYPE glade-interface SYSTEM \"http://glade.gnome.org/gl"
  },
  {
    "path": "hydra-gtk/xhydra.gladep",
    "chars": 363,
    "preview": "<?xml version=\"1.0\" standalone=\"no\"?> <!--*- mode: xml -*-->\n<!DOCTYPE glade-project SYSTEM \"http://glade.gnome.org/glad"
  },
  {
    "path": "hydra-http-form.c",
    "chars": 58204,
    "preview": "/*\n\nHydra Form Module\n-----------------\n\nThe hydra form can be used to carry out a brute-force attack on simple\nweb-base"
  },
  {
    "path": "hydra-http-proxy-urlenum.c",
    "chars": 10420,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\nextern char *HYDRA_EXIT;\nchar *buf;\nstatic int32_t http_proxy_auth_mechanism ="
  },
  {
    "path": "hydra-http-proxy.c",
    "chars": 11605,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\nextern char *HYDRA_EXIT;\nstatic int32_t http_proxy_auth_mechanism = AUTH_ERROR"
  },
  {
    "path": "hydra-http.c",
    "chars": 16137,
    "preview": "#include \"hydra-http.h\"\n#include \"sasl.h\"\n\nextern char *HYDRA_EXIT;\nchar *webtarget = NULL;\nchar *slash = \"/\";\nchar *htt"
  },
  {
    "path": "hydra-http.h",
    "chars": 598,
    "preview": "#ifndef _HYDRA_HTTP_H\n#define _HYDRA_HTTP_H\n\n#include \"hydra-mod.h\"\n\n/*\tHTTP Header Types\t*/\n#define HEADER_TYPE_USERHEA"
  },
  {
    "path": "hydra-icq.c",
    "chars": 7277,
    "preview": "#include \"hydra-mod.h\"\n\nextern char *HYDRA_EXIT;\nextern int32_t child_head_no;\nint32_t seq = 1;\n\nconst unsigned char icq"
  },
  {
    "path": "hydra-imap.c",
    "chars": 19376,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\nextern char *HYDRA_EXIT;\nchar *buf;\nint32_t counter;\n\nint32_t imap_auth_mechan"
  },
  {
    "path": "hydra-irc.c",
    "chars": 7125,
    "preview": "#include \"hydra-mod.h\"\n\n/*\n\nRFC 1459: Internet Relay Chat Protocol\n\n*/\n\nextern char *HYDRA_EXIT;\nchar buffer[300] = \"\";\n"
  },
  {
    "path": "hydra-ldap.c",
    "chars": 15406,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\nextern char *HYDRA_EXIT;\n\nunsigned char *buf;\nint32_t counter;\nint32_t tls_req"
  },
  {
    "path": "hydra-logo.rc",
    "chars": 25,
    "preview": "1 ICON \"hydra-logo.ico\"\r\n"
  },
  {
    "path": "hydra-memcached.c",
    "chars": 5123,
    "preview": "// This plugin was written by <david dot maciejak at gmail D O T com>\n// Tested on memcached 1.5.6-0ubuntu1\n\n#ifdef LIBM"
  },
  {
    "path": "hydra-mod.c",
    "chars": 43764,
    "preview": "#include \"hydra-mod.h\"\n#include <arpa/inet.h>\n#ifdef LIBOPENSSL\n#include <openssl/bn.h>\n#include <openssl/err.h>\n#includ"
  },
  {
    "path": "hydra-mod.h",
    "chars": 3115,
    "preview": "#ifndef _HYDRA_MOD_H\n#define _HYDRA_MOD_H\n\n#include \"hydra.h\"\n\n#ifdef __sun\n#include <sys/int_types.h>\n#elif defined(__F"
  },
  {
    "path": "hydra-mongodb.c",
    "chars": 6010,
    "preview": "// This plugin was written by <david dot maciejak at gmail D O T com>\n// Tested on mongodb-server 1:3.6.3-0ubuntu1\n// MO"
  },
  {
    "path": "hydra-mssql.c",
    "chars": 8274,
    "preview": "#include \"hydra-mod.h\"\nextern char *HYDRA_EXIT;\nchar *buf;\n\n#if defined(HAVE_SYBFRONT) && defined(HAVE_SYBDB)\n#include <"
  },
  {
    "path": "hydra-mysql.c",
    "chars": 13134,
    "preview": "\n/* mysql 3.2x.x to 4.x support - by mcbethh (at) u-n-f (dot) com */\n\n/* david (dot) maciejak (at) gmail (dot) com for u"
  },
  {
    "path": "hydra-ncp.c",
    "chars": 5585,
    "preview": "/*\n *\tNovell Network Core Protocol Support - by David Maciejak @ GMAIL dot com\n *\tTested on Netware 6.5\n *\n * you need t"
  },
  {
    "path": "hydra-nntp.c",
    "chars": 14120,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\n/*\n\nBased on:\n\nRFC 3977: Network News Transfer Protocol (NNTP)\nRFC 4643: Netwo"
  },
  {
    "path": "hydra-oracle-listener.c",
    "chars": 9961,
    "preview": "/*\ndavid:\n\nPASSWORDS_LISTENER in listener.ora can be in clear or in plain mode,\nthis module support the 2 modes, use -m "
  },
  {
    "path": "hydra-oracle-sid.c",
    "chars": 4933,
    "preview": "\n/*\ndavid:\n\nmodule used to check for a valid oracle SID\nORCL and XE are a good start, but you should\nfind a big list on "
  },
  {
    "path": "hydra-oracle.c",
    "chars": 6850,
    "preview": "/*\n\ndavid: code is based on SNORT spo_database.c\n\ntested with :\n-instantclient_10_2 on Oracle 10.2.0\n-instantclient-basi"
  },
  {
    "path": "hydra-pcanywhere.c",
    "chars": 7011,
    "preview": "// This plugin was written by <david dot maciejak at kyxar dot fr>\n//\n// PC-Anywhere authentication protocol test on Sym"
  },
  {
    "path": "hydra-pcnfs.c",
    "chars": 5715,
    "preview": "#include \"hydra-mod.h\"\n\n/* pcnfs stuff copied from prout.c */\n\nextern char *HYDRA_EXIT;\nchar *buf;\n\n#define LEN_HDR_RPC "
  },
  {
    "path": "hydra-pop3.c",
    "chars": 21936,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\n// openssl s_client -starttls pop3 -crlf -connect 192.168.0.10:110\n\ntypedef st"
  },
  {
    "path": "hydra-postgres.c",
    "chars": 3958,
    "preview": "/*\n *\tPostgresSQL Support - by Diaul (at) devilopers.org\n *\n *\n * 110425 no obvious memleaks found\n */\n\n#include \"hydra-"
  },
  {
    "path": "hydra-radmin2.c",
    "chars": 11633,
    "preview": "#include \"hydra-mod.h\"\n#include <arpa/inet.h>\n#include <unistd.h>\n#ifdef HAVE_GCRYPT\n#include <gcrypt.h>\n#endif\n\nextern "
  },
  {
    "path": "hydra-rdp.c",
    "chars": 5233,
    "preview": "/*\n   This module is using freerdp3 lib\n\n   Tested on:\n  - Windows 7 pro SP1\n  - Windows 10 pro build 1809\n  - Windows S"
  },
  {
    "path": "hydra-redis.c",
    "chars": 6111,
    "preview": "#include \"hydra-mod.h\"\n\nextern char *HYDRA_EXIT;\nchar *buf;\n\nint32_t start_redis(int32_t s, char *ip, int32_t port, unsi"
  },
  {
    "path": "hydra-rexec.c",
    "chars": 2998,
    "preview": "#include \"hydra-mod.h\"\n\n// no memleaks found on 110425\n\n#define COMMAND \"/bin/ls /\"\n\nextern char *HYDRA_EXIT;\n\nint32_t s"
  },
  {
    "path": "hydra-rlogin.c",
    "chars": 4377,
    "preview": "#include \"hydra-mod.h\"\n\n/*\n\nRFC 1258\nclient have to use port from 512 -> 1023 or server is denying the connection\n\nno me"
  },
  {
    "path": "hydra-rpcap.c",
    "chars": 4690,
    "preview": "// rpcap\n// Petar Kaleychev\n\n#include \"hydra-mod.h\"\n\nextern char *HYDRA_EXIT;\nchar *buf;\n\nint32_t start_rpcap(int32_t s,"
  },
  {
    "path": "hydra-rsh.c",
    "chars": 3430,
    "preview": "#include \"hydra-mod.h\"\n#define COMMAND \"/bin/ls /\"\n\n/*\n\npassword is not used here, just try to find rsh accounts\nyou sho"
  },
  {
    "path": "hydra-rtsp.c",
    "chars": 6240,
    "preview": "//\n//  hydra-rtsp.c\n//  hydra-rtsp\n//\n//  Created by Javier Sánchez on 18/04/15.\n//\n//\n\n#ifndef _GNU_SOURCE\n#define _GNU"
  },
  {
    "path": "hydra-s7-300.c",
    "chars": 9513,
    "preview": "// submitted by Alexander Timorin <ATimorin@ptsecurity.com> and Sergey\n// Gordeychik\n\n#include \"hydra-mod.h\"\n\n#define S7"
  },
  {
    "path": "hydra-sapr3.c",
    "chars": 4127,
    "preview": "#include \"hydra-mod.h\"\n// checked for memleaks on 110425, none found\n#ifndef LIBSAPR3\nvoid dummy_sapr3() { printf(\"\\n\");"
  },
  {
    "path": "hydra-sip.c",
    "chars": 9071,
    "preview": "/* simple sip digest auth (md5) module 2009/02/19\n * written by gh0st 2005\n * modified by Jean-Baptiste Aviat <jba [at] "
  },
  {
    "path": "hydra-smb.c",
    "chars": 55743,
    "preview": "#include \"hydra-mod.h\"\n#ifndef LIBOPENSSL\nvoid dummy_smb() { printf(\"\\n\"); }\n#else\n#include \"hmacmd5.h\"\n#include \"sasl.h"
  },
  {
    "path": "hydra-smb2.c",
    "chars": 10925,
    "preview": "/**\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Pub"
  },
  {
    "path": "hydra-smtp-enum.c",
    "chars": 8339,
    "preview": "\n/*\n\ndavid: module used to enum smtp users with either\nVRFY, EXPN or RCPT TO command.\nOptional input could be set to\nVRF"
  },
  {
    "path": "hydra-smtp.c",
    "chars": 14341,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\nextern char *HYDRA_EXIT;\nint32_t smtp_auth_mechanism = AUTH_LOGIN;\n\nchar *smtp"
  },
  {
    "path": "hydra-snmp.c",
    "chars": 20460,
    "preview": "#include \"hydra-mod.h\"\n#ifdef LIBOPENSSL\n#include <openssl/aes.h>\n#include <openssl/des.h>\n#include <openssl/hmac.h>\n#in"
  },
  {
    "path": "hydra-socks5.c",
    "chars": 5157,
    "preview": "#include \"hydra-mod.h\"\n\n/*\n\nRFC: 1928\nThis module enable bruteforcing for socks5, only following types are supported:\n0x"
  },
  {
    "path": "hydra-ssh.c",
    "chars": 8828,
    "preview": "/*\n\nlibssh is available at http://www.libssh.org\nIf you want support for ssh v1 protocol, you\nhave to add option -DWITH_"
  },
  {
    "path": "hydra-sshkey.c",
    "chars": 5461,
    "preview": "\n/*\n libssh is available at http://www.libssh.org\n current version is 0.4.8\n If you want support for ssh v1 protocol, yo"
  },
  {
    "path": "hydra-svn.c",
    "chars": 7577,
    "preview": "// This plugin was written by <david dot maciejak at gmail D O T com>\n// checked for memleaks on 110425, none found\n\n#if"
  },
  {
    "path": "hydra-teamspeak.c",
    "chars": 4300,
    "preview": "#include \"hydra-mod.h\"\n\n#ifdef HAVE_ZLIB\n#include <zlib.h>\n#else\n#include \"crc32.h\"\n#endif\n\n/*\n\nThis module brings suppo"
  },
  {
    "path": "hydra-telnet.c",
    "chars": 13503,
    "preview": "#include \"hydra-mod.h\"\n#include \"hydra-telnet.h\"\n#include <ctype.h>\n\nchar *telcmds[] = {\n  \"EOF\", \"SUSP\", \"ABORT\", \"EOR\""
  },
  {
    "path": "hydra-telnet.h",
    "chars": 1063,
    "preview": "#ifndef HYDRA_TELNET_DEFS_H\n#define HYDRA_TELNET_DEFS_H\n\n#define IAC 255   /* interpret as command: */\n#define DONT 254 "
  },
  {
    "path": "hydra-time.c",
    "chars": 528,
    "preview": "#include \"hydra.h\"\n\n#ifndef _WIN32\n#include <time.h>\nint32_t sleepn(time_t seconds) {\n  struct timespec ts;\n  ts.tv_sec "
  },
  {
    "path": "hydra-vmauthd.c",
    "chars": 4926,
    "preview": "// This plugin was written by david@\n//\n// This plugin is written for VMware Authentication Daemon\n//\n\n#include \"hydra-m"
  },
  {
    "path": "hydra-vnc.c",
    "chars": 7465,
    "preview": "\n/*\n * Tested against RealVNC P4.6.0 using 3.3 and 4.1 RFB\n * proto with None and VLC auth (david@)\n *\n */\n\n#include \"d3"
  },
  {
    "path": "hydra-wizard.sh",
    "chars": 1756,
    "preview": "#!/bin/sh\n#\n# based on a script by Shivang Desai <shivang.ice.2010@gmail.com>\n#\necho\necho \"Welcome to the Hydra Wizard\"\n"
  },
  {
    "path": "hydra-xmpp.c",
    "chars": 17871,
    "preview": "#include \"hydra-mod.h\"\n#include \"sasl.h\"\n\n/* david: ref http://xmpp.org/rfcs/rfc3920.html */\n\nextern char *HYDRA_EXIT;\ns"
  },
  {
    "path": "hydra.1",
    "chars": 4680,
    "preview": ".TH \"HYDRA\" \"1\" \"01/01/2023\"\n.SH NAME\nhydra \\- a very fast network logon cracker which supports many different services\n"
  },
  {
    "path": "hydra.c",
    "chars": 208078,
    "preview": "/*\n * hydra (c) 2001-2023 by van Hauser / THC <vh@thc.org>\n * https://github.com/vanhauser-thc/thc-hydra\n *\n * Parallize"
  },
  {
    "path": "hydra.h",
    "chars": 5025,
    "preview": "#ifndef _HYDRA_H\n\n#include <stdio.h>\n#ifdef __sun\n#include <sys/int_types.h>\n#elif defined(__FreeBSD__) || defined(__IBM"
  },
  {
    "path": "libpq-fe.h",
    "chars": 16336,
    "preview": "\n/*-------------------------------------------------------------------------\n *\n * libpq-fe.h\n *\t  This file contains de"
  },
  {
    "path": "ntlm.c",
    "chars": 117047,
    "preview": "/* $Id$\n   Single file NTLM system to create and parse authentication messages.\n\n   http://www.reversing.org\n   ilo-- il"
  },
  {
    "path": "ntlm.h",
    "chars": 4806,
    "preview": "/* $Id$\n   Single file NTLM system to create and parse authentication messages.\n\n   http://www.reversing.org\n   ilo-- il"
  },
  {
    "path": "performance.h",
    "chars": 1673,
    "preview": "#include <errno.h>\n#include <fcntl.h>\n#include <netdb.h>\n#include <sys/select.h>\n#include <sys/time.h>\n#include <sys/typ"
  },
  {
    "path": "postgres_ext.h",
    "chars": 2010,
    "preview": "\n/*-------------------------------------------------------------------------\n *\n * postgres_ext.h\n *\n *\t   This file con"
  },
  {
    "path": "pw-inspector-logo.rc",
    "chars": 27,
    "preview": "1 ICON \"pw-inspector.ico\"\r\n"
  },
  {
    "path": "pw-inspector.1",
    "chars": 1541,
    "preview": ".TH \"PW-INSPECTOR\" \"1\" \"24/05/2012\"\n.SH NAME\npw-inspector \\- A tool to reduce the password list\n.SH SYNOPSIS\n.B pw-inspe"
  },
  {
    "path": "pw-inspector.c",
    "chars": 4654,
    "preview": "#include <ctype.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n\n#"
  },
  {
    "path": "sasl.c",
    "chars": 23324,
    "preview": "#include \"sasl.h\"\n\nextern int32_t selected_proxy;\n\n/*\nprint_hex is used for debug\nit displays the string buf hexa values"
  },
  {
    "path": "sasl.h",
    "chars": 1343,
    "preview": "\n#include \"hydra-mod.h\"\n#include \"ntlm.h\"\n#include <stdio.h>\n#include <string.h>\n\n#define AUTH_ERROR -1\n#define AUTH_CLE"
  },
  {
    "path": "xhydra.1",
    "chars": 624,
    "preview": ".TH \"XHYDRA\" \"1\" \"02/02/2012\"\n.SH NAME\nxhydra \\- Gtk+3 frontend for thc-hydra\n.SH SYNOPSIS\nExecute xhydra in a terminal "
  },
  {
    "path": "xhydra.desktop",
    "chars": 233,
    "preview": "[Desktop Entry]\nName=XHydra\nGenericName=Hydra very fast network log-on cracker\nComment=GUI frontend for Hydra network lo"
  }
]

About this extraction

This page contains the full source code of the vanhauser-thc/thc-hydra GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 129 files (2.4 MB), approximately 628.9k tokens, and a symbol index with 524 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!