Ejemplo n.º 1
0
 def test(self, task):
     (host, port) = (task[0], task[1])
     rs = []
     auth = MysqlAuth((host, port))
     anony = False
     for username in self.userdict:
         for password in self.userdict[username]:
             conn_ok, auth_ok, anonymous, banner = auth.login(
                 username, password)
             if not conn_ok:
                 return rs
             if not auth_ok:
                 continue
             if anonymous:
                 if not anony:
                     anony = True
                     logging.getLogger().warn('FOUND anonymous@%s:%d<OK>' %
                                              (host, port))
                     rs.append([
                         host, port, 'MYSQL', '<ANY>', '<ANY>',
                         encode_utf8(banner)
                     ])
                 continue
             rs.append([
                 host, port, 'MYSQL', username, password,
                 encode_utf8(banner)
             ])
             break
     if not rs:
         logging.getLogger().info('SAFE %s:%d' % (host, port))
     return rs
Ejemplo n.º 2
0
    def test(self, task):
        (host,port) = (task[0],task[1])
        rs = []
        auth = MssqlAuth( (host, port) )
        #for username in self.userdict:
        for password in self.passlist:
            conn_ok, auth_ok, banner = auth.login(username, password)
            if not conn_ok:
		print("conn failed!")
                return rs
            if not auth_ok:
		print("user:%s ,pass:%s login failed!"% (username, password))
                continue
            rs.append([host, port, 'MSSQL', username, password, encode_utf8(banner)])
	    print("user:%s ,pass:%s login ok!"% (username,password))
            break
        if not rs:
           logging.getLogger().info('SAFE %s:%d'%(host, port)) 
        return rs
Ejemplo n.º 3
0
 def test(self, task):
     (host, port) = (task[0], task[1])
     rs = []
     auth = FtpAuth((host, port))
     for username in self.userdict:
         for password in self.userdict[username]:
             conn_ok, auth_ok, banner = auth.login(username, password)
             if not conn_ok:
                 return rs
             if not auth_ok:
                 continue
             rs.append([
                 host, port, 'FTP', username, password,
                 encode_utf8(banner)
             ])
             break
     if not rs:
         logging.getLogger().info('SAFE %s:%d' % (host, port))
     return rs