-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
175 lines (142 loc) · 7.69 KB
/
main.py
File metadata and controls
175 lines (142 loc) · 7.69 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
البرنامج الرئيسي - مجموعة أدوات الأمن السيبراني الإسرائيلية المتقدمة
Main Program - Advanced Israeli Cyber Security Tools Suite
"""
import os
import sys
import platform
from pathlib import Path
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
from rich.table import Table
from rich.layout import Layout
from rich.align import Align
# إضافة مسار المكتبات المطلوبة
sys.path.insert(0, str(Path(__file__).parent))
# استيراد الأدوات المتوفرة فقط
from tools.infected_links_report import InfectedLinksReporter
from tools.exploit_tool import IsraeliExploitationTool
from tools.google_dork_tool import GoogleDorkingTool
console = Console()
class IsraeliCyberSecuritySuite:
"""الفئة الرئيسية لمجموعة أدوات الأمن السيبراني الإسرائيلية"""
def __init__(self):
self.console = Console()
self.tools = {
1: {"name": "عرض المواقع الإسرائيلية المصابة", "tool": InfectedLinksReporter},
2: {"name": "اختبار الثغرات الأمنية والاستغلال", "tool": IsraeliExploitationTool},
3: {"name": "أداة بحث Google المتقدمة", "tool": GoogleDorkingTool},
}
def display_banner(self):
"""عرض البانر الرئيسي"""
banner = """
[bold red]╔═══════════════════════════════════════════════════════════════════════════════╗[/bold red]
[bold red]║[/bold red] [bold yellow]🚨 مجموعة أدوات الأمن السيبراني الإسرائيلية المتقدمة 🚨[/bold yellow] [bold red]║[/bold red]
[bold red]║[/bold red] [bold cyan]Advanced Israeli Cyber Security Tools Suite[/bold cyan] [bold red]║[/bold red]
[bold red]║[/bold red] [bold green]للاختبار الأمني الشامل للمواقع الإسرائيلية[/bold green] [bold red]║[/bold red]
[bold red]╚═══════════════════════════════════════════════════════════════════════════════╝[/bold red]
"""
self.console.print(Panel(banner, style="bold red"))
def display_menu(self):
"""عرض قائمة الأدوات"""
table = Table(title="📋 قائمة الأدوات المتاحة", show_header=True, header_style="bold magenta")
table.add_column("الرقم", style="cyan", width=6)
table.add_column("اسم الأداة", style="green", width=50)
table.add_column("الحالة", style="yellow", width=10)
for key, tool_info in self.tools.items():
table.add_row(str(key), tool_info["name"], "✅ جاهز")
table.add_row("4", "الخروج", "🚪")
self.console.print(table)
def get_user_choice(self):
"""الحصول على اختيار المستخدم"""
try:
choice = self.console.input("\n[bold cyan]اختر أداة (1-4): [/bold cyan]").strip()
return int(choice)
except ValueError:
return None
def run_tool(self, choice):
"""تشغيل الأداة المختارة"""
if choice == 4:
self.console.print("\n[bold green]👋 شكراً لاستخدام مجموعة أدوات الأمن السيبراني الإسرائيلية![/bold green]")
return False
if choice in self.tools:
tool_info = self.tools[choice]
self.console.print(f"\n[bold yellow]🎯 تشغيل: {tool_info['name']}...[/bold yellow]")
try:
tool_instance = tool_info["tool"]()
if hasattr(tool_instance, 'run'):
tool_instance.run()
else:
tool_instance()
except Exception as e:
self.console.print(f"\n[bold red]❌ خطأ في تشغيل الأداة: {str(e)}[/bold red]")
else:
self.console.print("\n[bold red]❌ اختيار غير صالح. يرجى اختيار رقم من 1 إلى 4.[/bold red]")
return True
def check_system_requirements(self):
"""التحقق من متطلبات النظام"""
self.console.print("\n[bold blue]🔍 فحص متطلبات النظام...[/bold blue]")
# فحص إصدار Python
if sys.version_info < (3, 7):
self.console.print("[bold red]❌ يتطلب Python 3.7 أو أعلى[/bold red]")
return False
# فحص الملفات المطلوبة
required_files = [
'requirements.txt',
'config.json',
'sqli_payloads_wordlist.txt'
]
missing_files = []
for file in required_files:
if not Path(file).exists():
missing_files.append(file)
if missing_files:
self.console.print(f"\n[bold yellow]⚠️ ملفات مفقودة: {', '.join(missing_files)}[/bold yellow]")
self.console.print("[bold cyan]💡 تأكد من وجود جميع الملفات المطلوبة[/bold cyan]")
return True
def run(self):
"""تشغيل البرنامج الرئيسي"""
try:
self.display_banner()
if not self.check_system_requirements():
return
while True:
self.display_menu()
choice = self.get_user_choice()
if choice is None:
self.console.print("\n[bold red]❌ يرجى إدخال رقم صحيح[/bold red]")
continue
if not self.run_tool(choice):
break
# إعادة عرض القائمة بعد التشغيل
self.console.print("\n[bold cyan]اضغط Enter للمتابعة...[/bold cyan]")
input()
self.console.clear()
except KeyboardInterrupt:
self.console.print("\n\n[bold yellow]⚡ تم إيقاف البرنامج بواسطة المستخدم[/bold yellow]")
except Exception as e:
self.console.print(f"\n[bold red]❌ خطأ غير متوقع: {str(e)}[/bold red]")
def main():
"""الدالة الرئيسية للبرنامج"""
if len(sys.argv) > 1:
# وضع سطر الأوامر
if sys.argv[1] == "--help" or sys.argv[1] == "-h":
console.print("""
[bold green]استخدام:[/bold green]
python main.py : تشغيل الواجهة التفاعلية
python main.py --help : عرض هذه المساعدة
python main.py --version : عرض الإصدار
""")
elif sys.argv[1] == "--version" or sys.argv[1] == "-v":
console.print("[bold green]مجموعة أدوات الأمن السيبراني الإسرائيلية - الإصدار 2.0.0[/bold green]")
else:
console.print(f"[bold red]❌ خيار غير معروف: {sys.argv[1]}[/bold red]")
else:
# تشغيل الواجهة التفاعلية
suite = IsraeliCyberSecuritySuite()
suite.run()
if __name__ == "__main__":
main()