def main(): password_list = read_dict('password.dic') for ip in ip_list: executor = TaskExecutor(password_list) executor.run(weak_pass, ip) for t in found_password: logger.info('%s password is %s' % t)
def main(): password_list = read_dict('password.dic') for ip in ip_list: url = 'http://%s/manager/html' % ip executor = TaskExecutor(password_list) executor.run(weak_pass, url) for t in found_password: logger.info('%s password is %s' % t)
def main(): with open('found_ssh.txt', 'w') as f: f.write(str('')) password_list = read_dict('ssh_password.txt') for ip in ip_list: # 如果是爆破,max_workers 设置大一点 executor = TaskExecutor(password_list, max_workers=2) # executor.run(weak_pass, ip) Thread(target=executor.run, args=(weak_pass, ip)).start()
def main(): password_list = read_dict('password.dic') for ip in ip_list: # 测试匿名登录 if anonymous(ip): continue executor = TaskExecutor(password_list, max_workers=20) executor.run(weak_pass, ip) for t in found_password: logger.info('%s password is %s' % t)
def main(): socket.setdefaulttimeout(10) password_list = read_dict('password.dic') for ip in ip_list: sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: sk.connect((ip, 3389)) except Exception as e: logger.info(e) logger.info('ip %s port %s can not be connected!' % (ip, 3389)) continue for username in username_list: executor = TaskExecutor(password_list) executor.run(weak_pass, ip, username) for t in found_password: logger.info('%s password is %s' % t)