├── util ├── __init__.py ├── color.pyc ├── __init__.pyc ├── __pycache__ │ ├── color.cpython-38.pyc │ └── __init__.cpython-38.pyc ├── color.py └── util.py ├── modules ├── __init__.py ├── telnet_check.py ├── __init__.pyc ├── mysql_check.pyc ├── redis_check.pyc ├── __pycache__ │ ├── __init__.cpython-38.pyc │ ├── ftp_check.cpython-38.pyc │ ├── ssh_check.cpython-38.pyc │ ├── mongo_check.cpython-38.pyc │ ├── mysql_check.cpython-38.pyc │ ├── redis_check.cpython-38.pyc │ └── tomcat_check.cpython-38.pyc ├── mysql_check.py ├── tomcat_check.py ├── ssh_check.py ├── mongo_check.py ├── ftp_check.py └── redis_check.py ├── requirements.txt ├── media └── 15992042181736.png ├── wordlist ├── mysql_pass.txt ├── ssh_pass.txt ├── redis_pass.txt ├── top100.txt └── ftp_pass.txt ├── README.md └── crackpy.py /util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/telnet_check.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | rich 2 | pymysql 3 | -------------------------------------------------------------------------------- /util/color.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/util/color.pyc -------------------------------------------------------------------------------- /util/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/util/__init__.pyc -------------------------------------------------------------------------------- /modules/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__init__.pyc -------------------------------------------------------------------------------- /media/15992042181736.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/media/15992042181736.png -------------------------------------------------------------------------------- /modules/mysql_check.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/mysql_check.pyc -------------------------------------------------------------------------------- /modules/redis_check.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/redis_check.pyc -------------------------------------------------------------------------------- /util/__pycache__/color.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/util/__pycache__/color.cpython-38.pyc -------------------------------------------------------------------------------- /util/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/util/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/ftp_check.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/ftp_check.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/ssh_check.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/ssh_check.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/mongo_check.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/mongo_check.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/mysql_check.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/mysql_check.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/redis_check.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/redis_check.cpython-38.pyc -------------------------------------------------------------------------------- /modules/__pycache__/tomcat_check.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j3ers3/Crackpy/HEAD/modules/__pycache__/tomcat_check.cpython-38.pyc -------------------------------------------------------------------------------- /wordlist/mysql_pass.txt: -------------------------------------------------------------------------------- 1 | 123456 2 | mysql 3 | mysqlmysql 4 | mysql123 5 | mysql_pass 6 | root 7 | rootroot 8 | root123 9 | root123456 10 | 123 11 | 1234 12 | 12345 13 | 1234567 14 | 12345678 15 | Aa123456 16 | 123456789 17 | password 18 | pass 19 | 20 | -------------------------------------------------------------------------------- /wordlist/ssh_pass.txt: -------------------------------------------------------------------------------- 1 | root 2 | root123 3 | root123456 4 | rootroot 5 | pass 6 | password 7 | Password 8 | Passw0rd 9 | 123 10 | 1234 11 | 12345 12 | 123456 13 | 1234567 14 | 12345678 15 | abc123 16 | abc1234 17 | abc12345 18 | Aa123456 19 | Bb123456 20 | Cc123456 -------------------------------------------------------------------------------- /util/color.py: -------------------------------------------------------------------------------- 1 | purple = '\033[95m' 2 | purple2 = '\033[92m' 3 | cyan = '\033[96m' 4 | darkcyan = '\033[36m' 5 | blue = '\033[94m' 6 | green = '\033[32m' 7 | yellow = '\033[93m' 8 | red = '\033[31m' 9 | bold = '\033[1m' 10 | end = '\033[0m' 11 | -------------------------------------------------------------------------------- /wordlist/redis_pass.txt: -------------------------------------------------------------------------------- 1 | 123456 2 | 1234567 3 | 12345678 4 | 123 5 | 1234 6 | 12345 7 | 000 8 | 111111 9 | 888888 10 | 222222 11 | 333333 12 | 444444 13 | 555555 14 | 666666 15 | 777777 16 | 999999 17 | 000000 18 | pass123 19 | pass 20 | password 21 | admin 22 | root 23 | redis 24 | redis1 25 | Redis 26 | redis01 27 | redis01! 28 | redis! 29 | redis!@# 30 | redis111 31 | redis123 32 | abc12345 -------------------------------------------------------------------------------- /util/util.py: -------------------------------------------------------------------------------- 1 | import random 2 | from string import ascii_lowercase, digits 3 | 4 | def randomString(length=8): 5 | """ 6 | 生成随机字母串 7 | 8 | :param length:生成字符串长度 9 | :return 字母串 10 | """ 11 | return ''.join([random.choice(ascii_lowercase) for _ in range(length)]) 12 | 13 | 14 | def randomDigits(length=8): 15 | """ 16 | 生成随机数字串 17 | 18 | :param length:生成字符串长度 19 | :return 数字串 20 | """ 21 | return ''.join([random.choice(digits) for _ in range(length)]) 22 | 23 | 24 | def randomMD5(length=10, hex=True): 25 | """ 26 | 生成随机MD5键值对 27 | 28 | :param length:指定明文长度 29 | :param hex:指定密文长度为32位 30 | :returns 原文,密文(32位或16位) 31 | """ 32 | plain = randomDigits(length) 33 | m = hashlib.md5() 34 | m.update(plain) 35 | cipher = m.hexdigest() if hex else m.hexdigest()[8:-8] 36 | return [plain, cipher] -------------------------------------------------------------------------------- /modules/mysql_check.py: -------------------------------------------------------------------------------- 1 | # encoding:utf8 2 | import pymysql 3 | from rich.progress import track 4 | from util.color import * 5 | 6 | class MYSQL: 7 | def __init__(self, ip, port=3306): 8 | self.ip = ip 9 | self.port = port 10 | 11 | 12 | def check(self): 13 | for user in ['root']: 14 | with open('./wordlist/mysql_pass.txt') as f: 15 | for line in track(f.readlines()): 16 | pwd = line.rstrip() 17 | 18 | try: 19 | pymysql.connect(host=self.ip, port=self.port, user=user, password=pwd, connect_timeout=2) 20 | return blue + "[+] {0}:{1} -> {2}:{3}".format(self.ip, self.port, user, pwd) + end 21 | except Exception as e: 22 | #print(e) 23 | pass 24 | return False -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🌀 Crackpy ![Stage](https://img.shields.io/badge/Release-STABLE-brightgreen.svg) [![Python 3.7](https://img.shields.io/badge/Python-3.7-yellow.svg)](http://www.python.org/download/) ![Build Status](https://img.shields.io/badge/Version-0.1-red.svg) 2 | 3 | 弱口令爆破和未授权访问工具。*现在还一堆问题,慢慢更新* 4 | 5 | ![-w714](media/15992042181736.png) 6 | 7 | 8 | ## 1. Install 9 | ``` 10 | git clone https://github.com/j3ers3/Crackpy 11 | pip3 install -r requirements.txt 12 | ``` 13 | 14 | ## 2. Usage 15 | ``` 16 | optional arguments: 17 | -h, --help show this help message and exit 18 | 19 | MODULES: 20 | -m MODULE Speciy module [mysql|redis|mongo|ftp|ssh|telnet] 21 | 22 | MISC: 23 | -f IPFILE Speciy host file [1.1.1.1:3306] 24 | -x HOST Specify single host [1.1.1.1:3306] 25 | -t THREADS Set thread (default 20) 26 | ``` 27 | 28 | - 示例 python crackpy.py -m mysql -x 1.1.1.1 29 | 30 | > tips 不指定端口就使用默认端口 31 | 32 | -------------------------------------------------------------------------------- /modules/tomcat_check.py: -------------------------------------------------------------------------------- 1 | # encoding:utf8 2 | import requests 3 | from util.color import * 4 | 5 | class TOMCAT: 6 | def __init__(self, ip, port=8080): 7 | self.ip = ip 8 | self.port = port 9 | 10 | 11 | def check(self): 12 | url = 'http://'+self.ip+':'+str(self.port)+'/manager/html/' 13 | 14 | for user in ['admin', 'tomcat']: 15 | with open('./wordlist/top100.txt') as f: 16 | for line in f.readlines(): 17 | pwd = line.rstrip() 18 | auth = (user, pwd) 19 | try: 20 | r = requests.get(url, auth=auth, timeout=8) 21 | if r.status_code == 200: 22 | return blue + "[+] {0}:{1} -> {2}:{3}".format(self.ip, self.port, user, pwd) + end 23 | except Exception as e: 24 | #print(e) 25 | pass 26 | return False 27 | -------------------------------------------------------------------------------- /modules/ssh_check.py: -------------------------------------------------------------------------------- 1 | # encoding:utf8 2 | from paramiko import SSHClient, AutoAddPolicy 3 | from rich.progress import track 4 | from util.color import * 5 | 6 | class SSH: 7 | def __init__(self, ip, port=22): 8 | self.ip = ip 9 | self.port = port 10 | 11 | def check(self): 12 | 13 | client = SSHClient() 14 | client.set_missing_host_key_policy(AutoAddPolicy()) 15 | 16 | time_out_flag = 0 17 | 18 | for user in ['root', 'appadmin']: 19 | with open('./wordlist/ssh_pass.txt') as f: 20 | 21 | for line in track(f.readlines()): 22 | pwd = line.strip() 23 | 24 | try: 25 | client.connect(self.ip, self.port, user, pwd, timeout=5, auth_timeout=10) 26 | return blue + "[+] {0}:{1} -> {2}:{3}".format(self.ip, self.port, user, pwd) + end 27 | except Exception as e: 28 | pass 29 | 30 | return False 31 | -------------------------------------------------------------------------------- /modules/mongo_check.py: -------------------------------------------------------------------------------- 1 | # encoding:utf8 2 | from util.color import * 3 | import socket 4 | import binascii 5 | 6 | class MONGO: 7 | def __init__(self, ip, port=27017): 8 | self.ip = ip 9 | self.port = port 10 | 11 | def check(self): 12 | try: 13 | socket.setdefaulttimeout(2) 14 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 15 | s.connect((self.ip, int(self.port))) 16 | data = binascii.a2b_hex("3a000000a741000000000000d40700000000000061646d696e2e24636d640000000000ffffffff130000001069736d6173746572000100000000") 17 | s.send(data) 18 | res = s.recv(1024) 19 | 20 | if "ismaster" in str(res): 21 | getlog_data = binascii.a2b_hex("480000000200000000000000d40700000000000061646d696e2e24636d6400000000000100000021000000026765744c6f670010000000737461727475705761726e696e67730000") 22 | s.send(getlog_data) 23 | res = s.recv(1024) 24 | if "totalLinesWritten" in str(res): 25 | return purple + "[+] {0}:{1} -> 未授权访问".format(self.ip, self.port) + end 26 | else: 27 | return False 28 | except Exception as e: 29 | #print(e) 30 | return False -------------------------------------------------------------------------------- /modules/ftp_check.py: -------------------------------------------------------------------------------- 1 | # encoding:utf8 2 | import ftplib 3 | from util.color import * 4 | 5 | class FTP: 6 | def __init__(self, ip, port=21): 7 | self.ip = ip 8 | self.port = port 9 | 10 | def check(self): 11 | time_out_flag = 0 12 | for user in ['ftp', 'admin', 'www']: 13 | with open('./wordlist/ftp_pass.txt') as f: 14 | for line in f.readlines(): 15 | pwd = line.strip() 16 | try: 17 | ftp = ftplib.FTP() 18 | ftp.timeout = 5 19 | 20 | ftp.connect(self.ip, self.port) 21 | if ftp.login(user, pwd).startswith('2'): 22 | return blue + "[+] {0}:{1} -> {2}:{3}".format(self.ip, self.port, user, pwd) + end 23 | except Exception as e: 24 | if not str(e).startswith('530'): 25 | print(e) 26 | if e.args[0] == 113 or e.args[0] == 111 or 'timed out' in str(e): 27 | time_out_flag += 1 28 | if time_out_flag > 2: 29 | print('connection timeout , break the loop .') 30 | return False 31 | else: 32 | pass 33 | return False 34 | -------------------------------------------------------------------------------- /wordlist/top100.txt: -------------------------------------------------------------------------------- 1 | 123456 2 | asdfasdf 3 | 123456789 4 | 111111 5 | 666666 6 | a123456 7 | 000000 8 | 12345678 9 | abc123456 10 | 123123 11 | aa123456 12 | 123654789 13 | a123456789 14 | 12qwaszx 15 | 123321 16 | qq123456 17 | 888888 18 | 1234567 19 | 1234567890 20 | 123qwe 21 | aaaaaa 22 | 147258369 23 | 123456a 24 | abcd1234 25 | 1qaz2wsx 26 | a123123 27 | zhang123 28 | qwe123 29 | 112233 30 | qazwsx 31 | 123456789a 32 | 123 33 | z123456 34 | q123456 35 | asdf1234 36 | qq123123 37 | 123456abc 38 | 090909 39 | asd123456 40 | abc123 41 | 11111111 42 | qwer1234 43 | 12345 44 | qwerty 45 | as123456 46 | 123654 47 | zxcvbnm123 48 | 999999 49 | 88888888 50 | 1 51 | 31415926 52 | 1234 53 | 654321 54 | 5201314 55 | 123456aa 56 | zzzzzz 57 | aptx4869 58 | zxcvbnm 59 | qazwsxedc 60 | 222222 61 | 123123123 62 | asdfghjkl 63 | asd123 64 | qazwsx123 65 | 123789 66 | qweasd 67 | 1q2w3e4r5t 68 | 1q2w3e4r 69 | 121212 70 | woaini1314 71 | asdfgh 72 | 520520 73 | password 74 | dddddd 75 | asdasd 76 | iloveyou 77 | 1314520 78 | 00000000 79 | 555555 80 | 12341234 81 | windows 82 | 7758521 83 | qwertyuiop 84 | q1w2e3r4 85 | jordan23 86 | 741852 87 | 333333 88 | 159357 89 | 123qweasd 90 | qqqqqq 91 | 147258 92 | sa123456 93 | jjjjjj 94 | 987654321 95 | 777777 96 | 111222 97 | 7777777 98 | 753951 99 | 159753 100 | 123abc 101 | -------------------------------------------------------------------------------- /modules/redis_check.py: -------------------------------------------------------------------------------- 1 | # encoding:utf8 2 | import socket 3 | from util.color import * 4 | 5 | class REDIS: 6 | def __init__(self, ip, port=6379): 7 | self.ip = ip 8 | self.port = port 9 | 10 | 11 | def check(self): 12 | try: 13 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 14 | s.settimeout(3) 15 | s.connect((self.ip, int(self.port))) 16 | s.send("INFO\r\n".encode()) 17 | result = s.recv(1024).decode(encoding='utf-8') 18 | 19 | if "redis_version" in result: 20 | return purple + "[+] {0}:{1} -> 未授权访问".format(self.ip, self.port) + end 21 | 22 | # 简单弱口令检测 23 | elif "Authentication" in result: 24 | with open('./wordlist/redis_pass.txt') as f: 25 | for line in f.readlines(): 26 | pwd = line.rstrip() 27 | 28 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 29 | s.connect((self.ip, int(self.port))) 30 | s.send("AUTH {0}\r\n".format(pwd).encode()) 31 | 32 | result = s.recv(1024).decode(encoding='utf-8') 33 | 34 | if "OK" in result: 35 | return blue + "[+] {0}:{1} -> 弱口令:{2}".format(self.ip, self.port, pwd) + end 36 | s.close() 37 | except Exception as e: 38 | pass 39 | 40 | return False 41 | -------------------------------------------------------------------------------- /wordlist/ftp_pass.txt: -------------------------------------------------------------------------------- 1 | ftp 2 | ftpftp 3 | ftp123 4 | FTP 5 | Ftp 6 | ftp@123 7 | Ftp@123 8 | ftp!@# 9 | ftp! 10 | ftp!!! 11 | mysql 12 | ftp@123456 13 | 123456 14 | asdfasdf 15 | 123456789 16 | 111111 17 | 666666 18 | a123456 19 | 000000 20 | 12345678 21 | abc123456 22 | 123123 23 | aa123456 24 | 123654789 25 | a123456789 26 | 12qwaszx 27 | 123321 28 | qq123456 29 | 888888 30 | 1234567 31 | 1234567890 32 | 123qwe 33 | aaaaaa 34 | 147258369 35 | 123456a 36 | abcd1234 37 | 1qaz2wsx 38 | a123123 39 | zhang123 40 | qwe123 41 | 112233 42 | qazwsx 43 | 123456789a 44 | 123 45 | z123456 46 | q123456 47 | asdf1234 48 | qq123123 49 | 123456abc 50 | 090909 51 | asd123456 52 | abc123 53 | 11111111 54 | qwer1234 55 | 12345 56 | qwerty 57 | as123456 58 | 123654 59 | zxcvbnm123 60 | 999999 61 | 88888888 62 | 1 63 | 31415926 64 | 1234 65 | 654321 66 | 5201314 67 | 123456aa 68 | zzzzzz 69 | aptx4869 70 | zxcvbnm 71 | qazwsxedc 72 | 222222 73 | 123123123 74 | asdfghjkl 75 | asd123 76 | qazwsx123 77 | 123789 78 | qweasd 79 | 1q2w3e4r5t 80 | 1q2w3e4r 81 | 121212 82 | woaini1314 83 | asdfgh 84 | 520520 85 | password 86 | dddddd 87 | asdasd 88 | iloveyou 89 | 1314520 90 | 00000000 91 | 555555 92 | 12341234 93 | windows 94 | 7758521 95 | qwertyuiop 96 | q1w2e3r4 97 | jordan23 98 | 741852 99 | 333333 100 | 159357 101 | 123qweasd 102 | qqqqqq 103 | 147258 104 | sa123456 105 | jjjjjj 106 | 987654321 107 | 777777 108 | 111222 109 | 7777777 110 | 753951 111 | 159753 112 | 123abc 113 | -------------------------------------------------------------------------------- /crackpy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding:utf8 3 | import argparse 4 | import asyncio 5 | import time 6 | from util.color import * 7 | from rich.progress import track 8 | from modules.mysql_check import MYSQL 9 | from modules.redis_check import REDIS 10 | from modules.ssh_check import SSH 11 | from modules.mongo_check import MONGO 12 | from modules.tomcat_check import TOMCAT 13 | from modules.ftp_check import FTP 14 | 15 | ########################################################## 16 | 17 | __version__ = "0.1" 18 | __prog__ = "Crackpy" 19 | __author__ = "whois" 20 | __create_date__ = "2020 08 25" 21 | __update_date__ = "2020 08 25" 22 | 23 | ########################################################## 24 | 25 | 26 | 27 | banner = blue + """ 28 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 29 | 30 | ██████╗██████╗ █████╗ ██████╗██╗ ██╗██████╗ ██╗ ██╗ 31 | ██╔════╝██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔══██╗╚██╗ ██╔╝ 32 | ██║ ██████╔╝███████║██║ █████╔╝ ██████╔╝ ╚████╔╝ 33 | ██║ ██╔══██╗██╔══██║██║ ██╔═██╗ ██╔═══╝ ╚██╔╝ 34 | ╚██████╗██║ ██║██║ ██║╚██████╗██║ ██╗██║ ██║ 35 | ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ 36 | \n""" + purple2 + """ 37 | 38 | Crackpy Ver. {0} 39 | Update {1} 40 | Coded by {2}\n""".format(__version__, __update_date__, __author__) + blue + """ 41 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n""" + end 42 | 43 | 44 | def url_list(urlfile): 45 | with open(urlfile, 'r') as f: 46 | f = [line.rstrip() for line in f.readlines()] 47 | return f 48 | 49 | 50 | def main(): 51 | print(banner) 52 | parser = argparse.ArgumentParser( 53 | usage='Crackpy -m mysql -f ip.txt', 54 | description="Password Check", 55 | ) 56 | 57 | 58 | mod = parser.add_argument_group('MODULES') 59 | 60 | mod.add_argument("-m", dest="module", 61 | help="Speciy module [mysql|redis|mongo|ftp|ssh|telnet]") 62 | 63 | misc = parser.add_argument_group('MISC') 64 | misc.add_argument("-f", dest="ipfile", 65 | help="Speciy host file [1.1.1.1:3306]") 66 | misc.add_argument("-x", dest="host", 67 | help="Specify single host [1.1.1.1:3306]") 68 | 69 | #misc.add_argument("-t", dest="threads", type=int, default=20,help="Set thread (default 20)") 70 | 71 | args = parser.parse_args() 72 | 73 | if args.ipfile is None and args.host is None: 74 | print("[x] Crackpy -h") 75 | exit(0) 76 | 77 | if args.module == 'mysql': 78 | if args.host: 79 | # 判断格式,可以是1.1.1.1:3306,也可以是默认端口 80 | m = MYSQL(args.host.split(':')[0], int(args.host.split(':')[1])) if ':' in args.host else MYSQL(args.host.split(':')[0]) 81 | res = m.check() 82 | print(res) 83 | 84 | elif args.ipfile: 85 | for host in url_list(args.ipfile): 86 | m = MYSQL(host.split(':')[0], int(host.split(':')[1])) if ':' in host else MYSQL(host.split(':')[0]) 87 | res = m.check() 88 | print(res) 89 | 90 | 91 | elif args.module == 'redis': 92 | if args.host: 93 | m = REDIS(args.host.split(':')[0], int(args.host.split(':')[1])) if ':' in args.host else REDIS(args.host.split(':')[0]) 94 | res = m.check() 95 | print(res) 96 | 97 | elif args.ipfile: 98 | for host in track(url_list(args.ipfile)): 99 | m = REDIS(host.split(':')[0], int(host.split(':')[1])) if ':' in host else REDIS(host.split(':')[0]) 100 | res = m.check() 101 | print(res) 102 | 103 | 104 | elif args.module == 'ssh': 105 | if args.host: 106 | m = SSH(args.host.split(':')[0], int(args.host.split(':')[1])) if ':' in args.host else SSH(args.host.split(':')[0]) 107 | res = m.check() 108 | print(res) 109 | 110 | elif args.ipfile: 111 | for host in url_list(args.ipfile): 112 | m = SSH(host.split(':')[0], int(host.split(':')[1])) if ':' in host else SSH(host.split(':')[0]) 113 | res = m.check() 114 | print(res) 115 | 116 | elif args.module == 'mongo': 117 | if args.host: 118 | m = MONGO(args.host.split(':')[0], int(args.host.split(':')[1])) if ':' in args.host else MONGO(args.host.split(':')[0]) 119 | res = m.check() 120 | print(res) 121 | 122 | elif args.ipfile: 123 | for host in track(url_list(args.ipfile)): 124 | m = MONGO(host.split(':')[0], int(host.split(':')[1])) if ':' in host else MONGO(host.split(':')[0]) 125 | res = m.check() 126 | print(res) 127 | 128 | elif args.module == 'ftp': 129 | if args.host: 130 | m = FTP(args.host.split(':')[0], int(args.host.split(':')[1])) if ':' in args.host else FTP(args.host.split(':')[0]) 131 | res = m.check() 132 | print(res) 133 | 134 | elif args.ipfile: 135 | for host in track(url_list(args.ipfile)): 136 | m = FTP(host.split(':')[0], int(host.split(':')[1])) if ':' in host else FTP(host.split(':')[0]) 137 | res = m.check() 138 | print(res) 139 | 140 | elif args.module == 'tomcat': 141 | if args.host: 142 | m = TOMCAT(args.host.split(':')[0], int(args.host.split(':')[1])) if ':' in args.host else TOMCAT(args.host.split(':')[0]) 143 | res = m.check() 144 | print(res) 145 | 146 | elif args.ipfile: 147 | for host in track(url_list(args.ipfile)): 148 | m = TOMCAT(host.split(':')[0], int(host.split(':')[1])) if ':' in host else TOMCAT(host.split(':')[0]) 149 | res = m.check() 150 | print(res) 151 | 152 | else: 153 | print("[x] Modules dont exist !!!") 154 | 155 | 156 | if __name__ == '__main__': 157 | main() 158 | 159 | 160 | 161 | --------------------------------------------------------------------------------