mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-12-22 22:15:22 +01:00
Fixed a crash while doing host key tests.
This commit is contained in:
parent
741bd631e2
commit
c483fe1861
@ -161,6 +161,9 @@ $ docker pull positronsecurity/ssh-audit
|
|||||||
For convenience, a web front-end on top of the command-line tool is available at [https://www.ssh-audit.com/](https://www.ssh-audit.com/).
|
For convenience, a web front-end on top of the command-line tool is available at [https://www.ssh-audit.com/](https://www.ssh-audit.com/).
|
||||||
|
|
||||||
## ChangeLog
|
## ChangeLog
|
||||||
|
### v2.5.0-dev (???)
|
||||||
|
- Fixed crash when running host key tests.
|
||||||
|
|
||||||
### v2.4.0 (2021-02-23)
|
### v2.4.0 (2021-02-23)
|
||||||
- Added multi-threaded scanning support.
|
- Added multi-threaded scanning support.
|
||||||
- Added built-in Windows manual page (see `-m`/`--manual`); credit [Adam Russell](https://github.com/thecliguy).
|
- Added built-in Windows manual page (see `-m`/`--manual`); credit [Adam Russell](https://github.com/thecliguy).
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
"""
|
"""
|
||||||
VERSION = 'v2.4.0'
|
VERSION = 'v2.5.0-dev'
|
||||||
SSH_HEADER = 'SSH-{0}-OpenSSH_8.2' # SSH software to impersonate
|
SSH_HEADER = 'SSH-{0}-OpenSSH_8.2' # SSH software to impersonate
|
||||||
GITHUB_ISSUES_URL = 'https://github.com/jtesta/ssh-audit/issues' # The URL to the Github issues tracker.
|
GITHUB_ISSUES_URL = 'https://github.com/jtesta/ssh-audit/issues' # The URL to the Github issues tracker.
|
||||||
WINDOWS_MAN_PAGE = ''
|
WINDOWS_MAN_PAGE = ''
|
||||||
|
@ -125,8 +125,8 @@ class HostKeyTest:
|
|||||||
|
|
||||||
# Do the initial DH exchange. The server responds back
|
# Do the initial DH exchange. The server responds back
|
||||||
# with the host key and its length. Bingo. We also get back the host key fingerprint.
|
# with the host key and its length. Bingo. We also get back the host key fingerprint.
|
||||||
kex_group.send_init(s)
|
|
||||||
try:
|
try:
|
||||||
|
kex_group.send_init(s)
|
||||||
host_key = kex_group.recv_reply(s, variable_key_len)
|
host_key = kex_group.recv_reply(s, variable_key_len)
|
||||||
if host_key is not None:
|
if host_key is not None:
|
||||||
server_kex.set_host_key(host_key_type, host_key)
|
server_kex.set_host_key(host_key_type, host_key)
|
||||||
|
@ -327,7 +327,7 @@ class KexGroupExchange(KexDH):
|
|||||||
s.send_packet()
|
s.send_packet()
|
||||||
|
|
||||||
packet_type, payload = s.read_packet(2)
|
packet_type, payload = s.read_packet(2)
|
||||||
if (packet_type != Protocol.MSG_KEXDH_GEX_GROUP) and (packet_type != Protocol.MSG_DEBUG): # pylint: disable=consider-using-in
|
if packet_type not in [Protocol.MSG_KEXDH_GEX_GROUP, Protocol.MSG_DEBUG]:
|
||||||
# TODO: replace with a better exception type.
|
# TODO: replace with a better exception type.
|
||||||
raise Exception('Expected MSG_KEXDH_GEX_REPLY (%d), but got %d instead.' % (Protocol.MSG_KEXDH_GEX_REPLY, packet_type))
|
raise Exception('Expected MSG_KEXDH_GEX_REPLY (%d), but got %d instead.' % (Protocol.MSG_KEXDH_GEX_REPLY, packet_type))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user