Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6dcc1b4

Browse files
author
Michael Woolweaver
authored
properly close ssh connection after successful connection
1 parent67b84d8 commit6dcc1b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎ethical-hacking/bruteforce-ssh/bruteforce_ssh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def is_ssh_open(hostname, username, password):
3434
else:
3535
# connection was established successfully
3636
print(f"{GREEN}[+] Found combo:\n\tHOSTNAME:{hostname}\n\tUSERNAME:{username}\n\tPASSWORD:{password}{RESET}")
37+
client.close()
3738
returnTrue
3839

3940

@@ -56,4 +57,4 @@ def is_ssh_open(hostname, username, password):
5657
ifis_ssh_open(host,user,password):
5758
# if combo is valid, save it to a file
5859
open("credentials.txt","w").write(f"{user}@{host}:{password}")
59-
break
60+
break

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp