forked from Iankulani/king_phisher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements_check.py
More file actions
114 lines (96 loc) · 3.23 KB
/
Copy pathrequirements_check.py
File metadata and controls
114 lines (96 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# requirements_check.py
#!/usr/bin/env python3
"""
King Phisher - Requirements Checker
Checks all dependencies and provides installation commands
"""
import sys
import subprocess
import importlib
import platform
REQUIREMENTS = {
'core': [
('requests', 'requests'),
('cryptography', 'cryptography'),
('colorama', 'colorama'),
('psutil', 'psutil'),
],
'network': [
('scapy', 'scapy'),
('paramiko', 'paramiko'),
('whois', 'python-whois'),
],
'bots': [
('discord', 'discord.py'),
('telethon', 'telethon'),
('slack_sdk', 'slack-sdk'),
('selenium', 'selenium'),
],
'web': [
('flask', 'flask'),
('flask_cors', 'flask-cors'),
('qrcode', 'qrcode[pil]'),
('pyshorteners', 'pyshorteners'),
],
'optional': [
('webdriver_manager', 'webdriver-manager'),
]
}
def check_package(package_name, import_name=None):
"""Check if a package is installed"""
import_name = import_name or package_name
try:
importlib.import_module(import_name)
return True, f"✅ {package_name}"
except ImportError:
return False, f"❌ {package_name}"
def get_install_commands():
"""Generate installation commands"""
commands = []
all_packages = []
for category, packages in REQUIREMENTS.items():
for pkg_name, install_name in packages:
all_packages.append(install_name)
commands.append("pip install " + " ".join(all_packages))
commands.append("pip install --upgrade " + " ".join(all_packages))
# Platform-specific
if platform.system() == 'Linux':
commands.append("sudo apt-get install nmap nikto -y")
elif platform.system() == 'Darwin': # macOS
commands.append("brew install nmap nikto")
elif platform.system() == 'Windows':
commands.append("choco install nmap nikto -y")
return commands
def main():
print("=" * 60)
print("🔍 King Phisher - Dependency Checker")
print("=" * 60)
# Python version check
print(f"\n🐍 Python: {sys.version}")
if sys.version_info < (3, 7):
print("❌ Python 3.7+ required!")
sys.exit(1)
results = {}
for category, packages in REQUIREMENTS.items():
print(f"\n📦 {category.upper()} DEPENDENCIES:")
print("-" * 40)
for pkg_name, install_name in packages:
installed, msg = check_package(pkg_name, pkg_name)
results[pkg_name] = installed
print(f" {msg}")
print("\n" + "=" * 60)
print("📊 SUMMARY")
print("=" * 60)
installed_count = sum(1 for v in results.values() if v)
total_count = len(results)
if installed_count == total_count:
print("✅ All dependencies are installed!")
else:
print(f"⚠️ Missing {total_count - installed_count} dependencies")
print("\n🔧 Installation commands:")
for cmd in get_install_commands():
print(f" {cmd}")
print("\n🎯 Ready to run: python king_phisher.py")
return 0
if __name__ == "__main__":
sys.exit(main())