Enhance password-only handling in Telnet service#1053
Merged
vanhauser-thc merged 3 commits intovanhauser-thc:masterfrom Jan 5, 2026
Merged
Enhance password-only handling in Telnet service#1053vanhauser-thc merged 3 commits intovanhauser-thc:masterfrom
vanhauser-thc merged 3 commits intovanhauser-thc:masterfrom
Conversation
Key ImprovementsAutomatic detection of password-only mode: After Telnet negotiation, checks banners for "password:" (or variants) without "login:" or "username:". Skips sending username if password-only detected — directly sends the password. More robust prompt detection: Added "pin:" and better draining of initial banners. Fallback safe: If server re-prompts for login after bad password, it correctly skips the pair. Works with empty login: Still supports manual -l "" for compatibility.
Password-only mode: Automatically detected and skips sending username. Extensive failure patterns: All provided indicators merged into is_failure() for reliable invalid credential detection. Multilingual & variant prompts: Covers "password:", "passwd:", "пароль:", "contraseña:", etc. Robust banner draining in service_telnet to ensure clean state before cracking. Cleaner send logic and consistent handling of re-prompts. Enhanced usage message explaining new features.
Contributor
Author
|
Password-only mode: Automatically detected and skips sending username. |
| strstr(buf, "pwd:") != NULL || strstr(buf, "pin:") != NULL || | ||
| strstr(buf, "пароль:") != NULL || strstr(buf, "contraseña:") != NULL || | ||
| strstr(buf, "enter password") != NULL || strstr(buf, "password for") != NULL) { | ||
| password_prompt_seen = 1; |
Owner
There was a problem hiding this comment.
please re-add strstr(buf, "ennwort") != NULL and also "asscode"
Contributor
Author
|
Changes made: |
Owner
|
looks better, thanks. |
vanhauser-thc
added a commit
that referenced
this pull request
Jan 24, 2026
Fix: telnet compilation error in hydra-telnet.c from PR #1053
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key ImprovementsAutomatic detection of password-only mode: After Telnet negotiation, checks banners for "password:" (or variants) without "login:" or "username:". Skips sending username if password-only detected — directly sends the password. More robust prompt detection: Added "pin:" and better draining of initial banners. Fallback safe: If server re-prompts for login after bad password, it correctly skips the pair. Works with empty login: Still supports manual -l "" for compatibility.