illi-ai-professional 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- illi_ai_professional-1.0.0/ILLI_AI_PROFESSIONAL_FINAL.py +696 -0
- illi_ai_professional-1.0.0/PKG-INFO +209 -0
- illi_ai_professional-1.0.0/README.md +157 -0
- illi_ai_professional-1.0.0/illi_ai_professional.egg-info/PKG-INFO +209 -0
- illi_ai_professional-1.0.0/illi_ai_professional.egg-info/SOURCES.txt +10 -0
- illi_ai_professional-1.0.0/illi_ai_professional.egg-info/dependency_links.txt +1 -0
- illi_ai_professional-1.0.0/illi_ai_professional.egg-info/entry_points.txt +2 -0
- illi_ai_professional-1.0.0/illi_ai_professional.egg-info/requires.txt +13 -0
- illi_ai_professional-1.0.0/illi_ai_professional.egg-info/top_level.txt +1 -0
- illi_ai_professional-1.0.0/pyproject.toml +85 -0
- illi_ai_professional-1.0.0/setup.cfg +4 -0
- illi_ai_professional-1.0.0/setup.py +59 -0
|
@@ -0,0 +1,696 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
ILLI AI Professional - Complete PC & Web Control System
|
|
5
|
+
Created by Muhammad Farhan
|
|
6
|
+
Email: farhanhomeschooling519@gmail.com
|
|
7
|
+
|
|
8
|
+
Professional AI Assistant with Voice Control, System Monitoring, Security Features
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import tkinter as tk
|
|
12
|
+
from tkinter import ttk, messagebox, scrolledtext
|
|
13
|
+
import threading
|
|
14
|
+
import time
|
|
15
|
+
import sys
|
|
16
|
+
import os
|
|
17
|
+
import subprocess
|
|
18
|
+
import webbrowser
|
|
19
|
+
import psutil
|
|
20
|
+
import platform
|
|
21
|
+
import json
|
|
22
|
+
import hashlib
|
|
23
|
+
import base64
|
|
24
|
+
import random
|
|
25
|
+
import math
|
|
26
|
+
from datetime import datetime
|
|
27
|
+
import logging
|
|
28
|
+
|
|
29
|
+
# Voice recognition and TTS
|
|
30
|
+
try:
|
|
31
|
+
import speech_recognition as sr
|
|
32
|
+
import pyttsx3
|
|
33
|
+
VOICE_ENABLED = True
|
|
34
|
+
except ImportError:
|
|
35
|
+
VOICE_ENABLED = False
|
|
36
|
+
print("Voice features disabled - install speechrecognition and pyttsx3")
|
|
37
|
+
|
|
38
|
+
# Security features
|
|
39
|
+
try:
|
|
40
|
+
from cryptography.fernet import Fernet
|
|
41
|
+
CRYPTO_ENABLED = True
|
|
42
|
+
except ImportError:
|
|
43
|
+
CRYPTO_ENABLED = False
|
|
44
|
+
print("Encryption features disabled - install cryptography")
|
|
45
|
+
|
|
46
|
+
# Git integration
|
|
47
|
+
try:
|
|
48
|
+
import git
|
|
49
|
+
GIT_ENABLED = True
|
|
50
|
+
except ImportError:
|
|
51
|
+
GIT_ENABLED = False
|
|
52
|
+
print("Git features disabled - install GitPython")
|
|
53
|
+
|
|
54
|
+
class ILLIProfessional:
|
|
55
|
+
def __init__(self):
|
|
56
|
+
self.root = tk.Tk()
|
|
57
|
+
self.root.title("ILLI AI Professional - Complete PC & Web Control")
|
|
58
|
+
self.root.geometry("1200x800")
|
|
59
|
+
self.root.configure(bg='#1a1a1a')
|
|
60
|
+
|
|
61
|
+
# Initialize voice
|
|
62
|
+
self.recognizer = sr.Recognizer() if VOICE_ENABLED else None
|
|
63
|
+
self.microphone = sr.Microphone() if VOICE_ENABLED else None
|
|
64
|
+
self.engine = pyttsx3.init() if VOICE_ENABLED else None
|
|
65
|
+
|
|
66
|
+
# Security
|
|
67
|
+
self.security_key = Fernet.generate_key() if CRYPTO_ENABLED else None
|
|
68
|
+
self.cipher = Fernet(self.security_key) if CRYPTO_ENABLED else None
|
|
69
|
+
|
|
70
|
+
# Voice settings
|
|
71
|
+
if self.engine:
|
|
72
|
+
self.engine.setProperty('rate', 150)
|
|
73
|
+
self.engine.setProperty('volume', 0.9)
|
|
74
|
+
|
|
75
|
+
# Application database
|
|
76
|
+
self.applications = {
|
|
77
|
+
'Communication': {
|
|
78
|
+
'WhatsApp': 'https://web.whatsapp.com',
|
|
79
|
+
'Telegram': 'https://web.telegram.org',
|
|
80
|
+
'Discord': 'discord',
|
|
81
|
+
'Slack': 'slack',
|
|
82
|
+
'Zoom': 'zoom',
|
|
83
|
+
'Teams': 'teams'
|
|
84
|
+
},
|
|
85
|
+
'Social Media': {
|
|
86
|
+
'Facebook': 'https://facebook.com',
|
|
87
|
+
'Twitter': 'https://twitter.com',
|
|
88
|
+
'Instagram': 'https://instagram.com',
|
|
89
|
+
'LinkedIn': 'https://linkedin.com',
|
|
90
|
+
'Reddit': 'https://reddit.com'
|
|
91
|
+
},
|
|
92
|
+
'Development': {
|
|
93
|
+
'VS Code': 'code',
|
|
94
|
+
'Visual Studio': 'devenv',
|
|
95
|
+
'PyCharm': 'pycharm',
|
|
96
|
+
'IntelliJ': 'idea',
|
|
97
|
+
'GitHub': 'https://github.com'
|
|
98
|
+
},
|
|
99
|
+
'Productivity': {
|
|
100
|
+
'Notion': 'https://notion.so',
|
|
101
|
+
'Trello': 'https://trello.com',
|
|
102
|
+
'Asana': 'https://asana.com',
|
|
103
|
+
'Office': 'winword',
|
|
104
|
+
'Excel': 'excel',
|
|
105
|
+
'PowerPoint': 'powerpnt'
|
|
106
|
+
},
|
|
107
|
+
'Entertainment': {
|
|
108
|
+
'Netflix': 'https://netflix.com',
|
|
109
|
+
'YouTube': 'https://youtube.com',
|
|
110
|
+
'Spotify': 'spotify',
|
|
111
|
+
'Twitch': 'https://twitch.tv'
|
|
112
|
+
},
|
|
113
|
+
'System': {
|
|
114
|
+
'File Explorer': 'explorer',
|
|
115
|
+
'Task Manager': 'taskmgr',
|
|
116
|
+
'Settings': 'ms-settings:',
|
|
117
|
+
'Control Panel': 'control',
|
|
118
|
+
'Command Prompt': 'cmd',
|
|
119
|
+
'PowerShell': 'powershell'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
# System monitoring
|
|
124
|
+
self.monitoring = False
|
|
125
|
+
self.monitor_thread = None
|
|
126
|
+
|
|
127
|
+
# Create GUI
|
|
128
|
+
self.create_gui()
|
|
129
|
+
|
|
130
|
+
# Start voice listening in background
|
|
131
|
+
if VOICE_ENABLED:
|
|
132
|
+
self.start_voice_listening()
|
|
133
|
+
|
|
134
|
+
def create_gui(self):
|
|
135
|
+
# Create notebook for tabs
|
|
136
|
+
notebook = ttk.Notebook(self.root)
|
|
137
|
+
notebook.pack(fill='both', expand=True, padx=10, pady=10)
|
|
138
|
+
|
|
139
|
+
# Style configuration
|
|
140
|
+
style = ttk.Style()
|
|
141
|
+
style.theme_use('clam')
|
|
142
|
+
style.configure('TNotebook', background='#1a1a1a')
|
|
143
|
+
style.configure('TNotebook.Tab', background='#2a2a2a', foreground='white')
|
|
144
|
+
style.map('TNotebook.Tab', background=[('selected', '#3a3a3a')])
|
|
145
|
+
|
|
146
|
+
# Create tabs
|
|
147
|
+
self.create_control_center_tab(notebook)
|
|
148
|
+
self.create_applications_tab(notebook)
|
|
149
|
+
self.create_system_monitor_tab(notebook)
|
|
150
|
+
self.create_voice_control_tab(notebook)
|
|
151
|
+
self.create_github_tab(notebook)
|
|
152
|
+
self.create_security_tab(notebook)
|
|
153
|
+
|
|
154
|
+
def create_control_center_tab(self, parent):
|
|
155
|
+
frame = ttk.Frame(parent)
|
|
156
|
+
parent.add(frame, text='Control Center')
|
|
157
|
+
|
|
158
|
+
# Quick Actions
|
|
159
|
+
actions_frame = ttk.LabelFrame(frame, text="Quick Actions")
|
|
160
|
+
actions_frame.pack(fill='x', padx=10, pady=10)
|
|
161
|
+
|
|
162
|
+
actions = [
|
|
163
|
+
("System Scan", self.system_scan),
|
|
164
|
+
("Security Check", self.security_check),
|
|
165
|
+
("Privacy Scan", self.privacy_scan),
|
|
166
|
+
("System Cleanup", self.system_cleanup),
|
|
167
|
+
("Start Monitoring", self.start_monitoring),
|
|
168
|
+
("Stop Monitoring", self.stop_monitoring)
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
for i, (text, command) in enumerate(actions):
|
|
172
|
+
btn = ttk.Button(actions_frame, text=text, command=command)
|
|
173
|
+
btn.grid(row=i//3, column=i%3, padx=5, pady=5, sticky='ew')
|
|
174
|
+
|
|
175
|
+
# System Info
|
|
176
|
+
info_frame = ttk.LabelFrame(frame, text="System Information")
|
|
177
|
+
info_frame.pack(fill='both', expand=True, padx=10, pady=10)
|
|
178
|
+
|
|
179
|
+
self.info_text = scrolledtext.ScrolledText(info_frame, height=10, bg='#2a2a2a', fg='white')
|
|
180
|
+
self.info_text.pack(fill='both', expand=True, padx=5, pady=5)
|
|
181
|
+
|
|
182
|
+
self.update_system_info()
|
|
183
|
+
|
|
184
|
+
def create_applications_tab(self, parent):
|
|
185
|
+
frame = ttk.Frame(parent)
|
|
186
|
+
parent.add(frame, text='Applications')
|
|
187
|
+
|
|
188
|
+
# Search bar
|
|
189
|
+
search_frame = ttk.Frame(frame)
|
|
190
|
+
search_frame.pack(fill='x', padx=10, pady=10)
|
|
191
|
+
|
|
192
|
+
ttk.Label(search_frame, text="Search:").pack(side='left')
|
|
193
|
+
self.search_var = tk.StringVar()
|
|
194
|
+
search_entry = ttk.Entry(search_frame, textvariable=self.search_var)
|
|
195
|
+
search_entry.pack(side='left', fill='x', expand=True, padx=5)
|
|
196
|
+
search_entry.bind('<KeyRelease>', self.filter_applications)
|
|
197
|
+
|
|
198
|
+
# Applications list
|
|
199
|
+
self.apps_frame = ttk.Frame(frame)
|
|
200
|
+
self.apps_frame.pack(fill='both', expand=True, padx=10, pady=10)
|
|
201
|
+
|
|
202
|
+
self.create_application_buttons()
|
|
203
|
+
|
|
204
|
+
def create_application_buttons(self):
|
|
205
|
+
for category, apps in self.applications.items():
|
|
206
|
+
cat_frame = ttk.LabelFrame(self.apps_frame, text=category)
|
|
207
|
+
cat_frame.pack(fill='x', pady=5)
|
|
208
|
+
|
|
209
|
+
for app_name, app_path in apps.items():
|
|
210
|
+
btn = ttk.Button(cat_frame, text=app_name,
|
|
211
|
+
command=lambda p=app_path, n=app_name: self.launch_application(p, n))
|
|
212
|
+
btn.pack(side='left', padx=2, pady=2)
|
|
213
|
+
|
|
214
|
+
def create_system_monitor_tab(self, parent):
|
|
215
|
+
frame = ttk.Frame(parent)
|
|
216
|
+
parent.add(frame, text='System Monitor')
|
|
217
|
+
|
|
218
|
+
# Performance metrics
|
|
219
|
+
metrics_frame = ttk.LabelFrame(frame, text="Performance Metrics")
|
|
220
|
+
metrics_frame.pack(fill='x', padx=10, pady=10)
|
|
221
|
+
|
|
222
|
+
# CPU
|
|
223
|
+
cpu_frame = ttk.Frame(metrics_frame)
|
|
224
|
+
cpu_frame.pack(fill='x', padx=5, pady=5)
|
|
225
|
+
ttk.Label(cpu_frame, text="CPU:").pack(side='left')
|
|
226
|
+
self.cpu_var = tk.StringVar(value="0%")
|
|
227
|
+
ttk.Label(cpu_frame, textvariable=self.cpu_var).pack(side='left', padx=5)
|
|
228
|
+
self.cpu_progress = ttk.Progressbar(cpu_frame, length=200)
|
|
229
|
+
self.cpu_progress.pack(side='left', padx=5)
|
|
230
|
+
|
|
231
|
+
# Memory
|
|
232
|
+
mem_frame = ttk.Frame(metrics_frame)
|
|
233
|
+
mem_frame.pack(fill='x', padx=5, pady=5)
|
|
234
|
+
ttk.Label(mem_frame, text="Memory:").pack(side='left')
|
|
235
|
+
self.mem_var = tk.StringVar(value="0%")
|
|
236
|
+
ttk.Label(mem_frame, textvariable=self.mem_var).pack(side='left', padx=5)
|
|
237
|
+
self.mem_progress = ttk.Progressbar(mem_frame, length=200)
|
|
238
|
+
self.mem_progress.pack(side='left', padx=5)
|
|
239
|
+
|
|
240
|
+
# Disk
|
|
241
|
+
disk_frame = ttk.Frame(metrics_frame)
|
|
242
|
+
disk_frame.pack(fill='x', padx=5, pady=5)
|
|
243
|
+
ttk.Label(disk_frame, text="Disk:").pack(side='left')
|
|
244
|
+
self.disk_var = tk.StringVar(value="0%")
|
|
245
|
+
ttk.Label(disk_frame, textvariable=self.disk_var).pack(side='left', padx=5)
|
|
246
|
+
self.disk_progress = ttk.Progressbar(disk_frame, length=200)
|
|
247
|
+
self.disk_progress.pack(side='left', padx=5)
|
|
248
|
+
|
|
249
|
+
# Processes
|
|
250
|
+
processes_frame = ttk.LabelFrame(frame, text="Running Processes")
|
|
251
|
+
processes_frame.pack(fill='both', expand=True, padx=10, pady=10)
|
|
252
|
+
|
|
253
|
+
self.processes_text = scrolledtext.ScrolledText(processes_frame, height=15, bg='#2a2a2a', fg='white')
|
|
254
|
+
self.processes_text.pack(fill='both', expand=True, padx=5, pady=5)
|
|
255
|
+
|
|
256
|
+
self.update_processes_list()
|
|
257
|
+
|
|
258
|
+
def create_voice_control_tab(self, parent):
|
|
259
|
+
frame = ttk.Frame(parent)
|
|
260
|
+
parent.add(frame, text='Voice Control')
|
|
261
|
+
|
|
262
|
+
# Voice status
|
|
263
|
+
status_frame = ttk.LabelFrame(frame, text="Voice Status")
|
|
264
|
+
status_frame.pack(fill='x', padx=10, pady=10)
|
|
265
|
+
|
|
266
|
+
self.voice_status = tk.StringVar(value="Ready" if VOICE_ENABLED else "Voice Disabled")
|
|
267
|
+
ttk.Label(status_frame, textvariable=self.voice_status).pack(pady=10)
|
|
268
|
+
|
|
269
|
+
if VOICE_ENABLED:
|
|
270
|
+
ttk.Button(status_frame, text="Start Voice", command=self.start_voice_listening).pack(pady=5)
|
|
271
|
+
ttk.Button(status_frame, text="Stop Voice", command=self.stop_voice_listening).pack(pady=5)
|
|
272
|
+
|
|
273
|
+
# Command history
|
|
274
|
+
history_frame = ttk.LabelFrame(frame, text="Command History")
|
|
275
|
+
history_frame.pack(fill='both', expand=True, padx=10, pady=10)
|
|
276
|
+
|
|
277
|
+
self.history_text = scrolledtext.ScrolledText(history_frame, height=20, bg='#2a2a2a', fg='white')
|
|
278
|
+
self.history_text.pack(fill='both', expand=True, padx=5, pady=5)
|
|
279
|
+
|
|
280
|
+
# Manual command input
|
|
281
|
+
input_frame = ttk.LabelFrame(frame, text="Manual Command")
|
|
282
|
+
input_frame.pack(fill='x', padx=10, pady=10)
|
|
283
|
+
|
|
284
|
+
self.command_var = tk.StringVar()
|
|
285
|
+
command_entry = ttk.Entry(input_frame, textvariable=self.command_var)
|
|
286
|
+
command_entry.pack(side='left', fill='x', expand=True, padx=5, pady=5)
|
|
287
|
+
command_entry.bind('<Return>', self.execute_manual_command)
|
|
288
|
+
|
|
289
|
+
ttk.Button(input_frame, text="Execute", command=self.execute_manual_command).pack(side='right', padx=5, pady=5)
|
|
290
|
+
|
|
291
|
+
def create_github_tab(self, parent):
|
|
292
|
+
frame = ttk.Frame(parent)
|
|
293
|
+
parent.add(frame, text='GitHub')
|
|
294
|
+
|
|
295
|
+
# Git status
|
|
296
|
+
status_frame = ttk.LabelFrame(frame, text="Repository Status")
|
|
297
|
+
status_frame.pack(fill='x', padx=10, pady=10)
|
|
298
|
+
|
|
299
|
+
self.git_status = tk.StringVar(value="Git Disabled" if not GIT_ENABLED else "Ready")
|
|
300
|
+
ttk.Label(status_frame, textvariable=self.git_status).pack(pady=10)
|
|
301
|
+
|
|
302
|
+
if GIT_ENABLED:
|
|
303
|
+
git_actions = [
|
|
304
|
+
("Check Status", self.check_git_status),
|
|
305
|
+
("Pull Changes", self.git_pull),
|
|
306
|
+
("Push Changes", self.git_push),
|
|
307
|
+
("Commit Changes", self.git_commit),
|
|
308
|
+
("Sync Repository", self.git_sync)
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
for text, command in git_actions:
|
|
312
|
+
ttk.Button(status_frame, text=text, command=command).pack(pady=2)
|
|
313
|
+
|
|
314
|
+
# Git log
|
|
315
|
+
log_frame = ttk.LabelFrame(frame, text="Commit History")
|
|
316
|
+
log_frame.pack(fill='both', expand=True, padx=10, pady=10)
|
|
317
|
+
|
|
318
|
+
self.git_log = scrolledtext.ScrolledText(log_frame, height=15, bg='#2a2a2a', fg='white')
|
|
319
|
+
self.git_log.pack(fill='both', expand=True, padx=5, pady=5)
|
|
320
|
+
|
|
321
|
+
if GIT_ENABLED:
|
|
322
|
+
self.update_git_log()
|
|
323
|
+
|
|
324
|
+
def create_security_tab(self, parent):
|
|
325
|
+
frame = ttk.Frame(parent)
|
|
326
|
+
parent.add(frame, text='Security')
|
|
327
|
+
|
|
328
|
+
# Security status
|
|
329
|
+
status_frame = ttk.LabelFrame(frame, text="Security Status")
|
|
330
|
+
status_frame.pack(fill='x', padx=10, pady=10)
|
|
331
|
+
|
|
332
|
+
self.security_status = tk.StringVar(value="Secure")
|
|
333
|
+
ttk.Label(status_frame, textvariable=self.security_status).pack(pady=10)
|
|
334
|
+
|
|
335
|
+
# Security actions
|
|
336
|
+
security_actions = [
|
|
337
|
+
("Security Scan", self.security_check),
|
|
338
|
+
("Privacy Scan", self.privacy_scan),
|
|
339
|
+
("Encrypt Data", self.encrypt_data),
|
|
340
|
+
("Clear Tracks", self.clear_tracks),
|
|
341
|
+
("System Lock", self.system_lock),
|
|
342
|
+
("Privacy Check", self.privacy_check)
|
|
343
|
+
]
|
|
344
|
+
|
|
345
|
+
for text, command in security_actions:
|
|
346
|
+
ttk.Button(status_frame, text=text, command=command).pack(pady=2)
|
|
347
|
+
|
|
348
|
+
# Security log
|
|
349
|
+
log_frame = ttk.LabelFrame(frame, text="Security Log")
|
|
350
|
+
log_frame.pack(fill='both', expand=True, padx=10, pady=10)
|
|
351
|
+
|
|
352
|
+
self.security_log = scrolledtext.ScrolledText(log_frame, height=15, bg='#2a2a2a', fg='white')
|
|
353
|
+
self.security_log.pack(fill='both', expand=True, padx=5, pady=5)
|
|
354
|
+
|
|
355
|
+
def launch_application(self, path, name):
|
|
356
|
+
try:
|
|
357
|
+
if path.startswith('http'):
|
|
358
|
+
webbrowser.open(path)
|
|
359
|
+
self.log_message(f"Launched {name} in browser")
|
|
360
|
+
else:
|
|
361
|
+
subprocess.Popen(path, shell=True)
|
|
362
|
+
self.log_message(f"Launched {name}")
|
|
363
|
+
|
|
364
|
+
if self.engine:
|
|
365
|
+
self.engine.say(f"Launched {name}")
|
|
366
|
+
self.engine.runAndWait()
|
|
367
|
+
except Exception as e:
|
|
368
|
+
self.log_message(f"Error launching {name}: {e}")
|
|
369
|
+
messagebox.showerror("Error", f"Failed to launch {name}: {e}")
|
|
370
|
+
|
|
371
|
+
def system_scan(self):
|
|
372
|
+
self.log_message("Starting system scan...")
|
|
373
|
+
self.update_system_info()
|
|
374
|
+
self.update_processes_list()
|
|
375
|
+
self.log_message("System scan completed")
|
|
376
|
+
|
|
377
|
+
def security_check(self):
|
|
378
|
+
self.log_message("Performing security check...")
|
|
379
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Security scan started\n")
|
|
380
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Checking running processes...\n")
|
|
381
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Checking network connections...\n")
|
|
382
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Security check completed\n")
|
|
383
|
+
self.security_log.see(tk.END)
|
|
384
|
+
|
|
385
|
+
def privacy_scan(self):
|
|
386
|
+
self.log_message("Performing privacy scan...")
|
|
387
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Privacy scan started\n")
|
|
388
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Checking browser data...\n")
|
|
389
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Checking temporary files...\n")
|
|
390
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Privacy scan completed\n")
|
|
391
|
+
self.security_log.see(tk.END)
|
|
392
|
+
|
|
393
|
+
def system_cleanup(self):
|
|
394
|
+
self.log_message("Starting system cleanup...")
|
|
395
|
+
try:
|
|
396
|
+
# Clear temp files
|
|
397
|
+
temp_path = os.environ.get('TEMP', '')
|
|
398
|
+
if os.path.exists(temp_path):
|
|
399
|
+
for file in os.listdir(temp_path):
|
|
400
|
+
try:
|
|
401
|
+
file_path = os.path.join(temp_path, file)
|
|
402
|
+
if os.path.isfile(file_path):
|
|
403
|
+
os.remove(file_path)
|
|
404
|
+
except:
|
|
405
|
+
pass
|
|
406
|
+
|
|
407
|
+
self.log_message("System cleanup completed")
|
|
408
|
+
if self.engine:
|
|
409
|
+
self.engine.say("System cleanup completed")
|
|
410
|
+
self.engine.runAndWait()
|
|
411
|
+
except Exception as e:
|
|
412
|
+
self.log_message(f"Cleanup error: {e}")
|
|
413
|
+
|
|
414
|
+
def start_monitoring(self):
|
|
415
|
+
if not self.monitoring:
|
|
416
|
+
self.monitoring = True
|
|
417
|
+
self.monitor_thread = threading.Thread(target=self.monitor_system, daemon=True)
|
|
418
|
+
self.monitor_thread.start()
|
|
419
|
+
self.log_message("System monitoring started")
|
|
420
|
+
|
|
421
|
+
def stop_monitoring(self):
|
|
422
|
+
self.monitoring = False
|
|
423
|
+
self.log_message("System monitoring stopped")
|
|
424
|
+
|
|
425
|
+
def monitor_system(self):
|
|
426
|
+
while self.monitoring:
|
|
427
|
+
try:
|
|
428
|
+
# Update CPU
|
|
429
|
+
cpu_percent = psutil.cpu_percent()
|
|
430
|
+
self.cpu_var.set(f"{cpu_percent:.1f}%")
|
|
431
|
+
self.cpu_progress['value'] = cpu_percent
|
|
432
|
+
|
|
433
|
+
# Update Memory
|
|
434
|
+
memory = psutil.virtual_memory()
|
|
435
|
+
self.mem_var.set(f"{memory.percent:.1f}%")
|
|
436
|
+
self.mem_progress['value'] = memory.percent
|
|
437
|
+
|
|
438
|
+
# Update Disk
|
|
439
|
+
disk = psutil.disk_usage('/')
|
|
440
|
+
disk_percent = (disk.used / disk.total) * 100
|
|
441
|
+
self.disk_var.set(f"{disk_percent:.1f}%")
|
|
442
|
+
self.disk_progress['value'] = disk_percent
|
|
443
|
+
|
|
444
|
+
time.sleep(2)
|
|
445
|
+
except:
|
|
446
|
+
break
|
|
447
|
+
|
|
448
|
+
def update_system_info(self):
|
|
449
|
+
try:
|
|
450
|
+
info = []
|
|
451
|
+
info.append(f"System: {platform.system()} {platform.release()}")
|
|
452
|
+
info.append(f"Python: {sys.version.split()[0]}")
|
|
453
|
+
info.append(f"CPU: {psutil.cpu_count()} cores")
|
|
454
|
+
info.append(f"Memory: {psutil.virtual_memory().total / (1024**3):.1f} GB")
|
|
455
|
+
info.append(f"Disk: {psutil.disk_usage('/').total / (1024**3):.1f} GB")
|
|
456
|
+
info.append(f"Processes: {len(list(psutil.process_iter()))}")
|
|
457
|
+
|
|
458
|
+
self.info_text.delete(1.0, tk.END)
|
|
459
|
+
self.info_text.insert(tk.END, '\n'.join(info))
|
|
460
|
+
except Exception as e:
|
|
461
|
+
self.log_message(f"Error updating system info: {e}")
|
|
462
|
+
|
|
463
|
+
def update_processes_list(self):
|
|
464
|
+
try:
|
|
465
|
+
processes = []
|
|
466
|
+
for proc in psutil.process_iter(['pid', 'name', 'cpu_percent']):
|
|
467
|
+
try:
|
|
468
|
+
processes.append(f"{proc.info['pid']:>6} {proc.info['name']:<30} {proc.info['cpu_percent']:.1f}%")
|
|
469
|
+
except:
|
|
470
|
+
continue
|
|
471
|
+
|
|
472
|
+
self.processes_text.delete(1.0, tk.END)
|
|
473
|
+
self.processes_text.insert(tk.END, '\n'.join(processes[:50])) # Show first 50
|
|
474
|
+
except Exception as e:
|
|
475
|
+
self.log_message(f"Error updating processes: {e}")
|
|
476
|
+
|
|
477
|
+
def start_voice_listening(self):
|
|
478
|
+
if not VOICE_ENABLED:
|
|
479
|
+
return
|
|
480
|
+
|
|
481
|
+
def listen():
|
|
482
|
+
with self.microphone as source:
|
|
483
|
+
self.recognizer.adjust_for_ambient_noise(source)
|
|
484
|
+
self.voice_status.set("Listening...")
|
|
485
|
+
|
|
486
|
+
try:
|
|
487
|
+
audio = self.recognizer.listen(source, timeout=5)
|
|
488
|
+
self.voice_status.set("Processing...")
|
|
489
|
+
|
|
490
|
+
try:
|
|
491
|
+
command = self.recognizer.recognize_google(audio)
|
|
492
|
+
self.process_voice_command(command)
|
|
493
|
+
except:
|
|
494
|
+
try:
|
|
495
|
+
command = self.recognizer.recognize_sphinx(audio)
|
|
496
|
+
self.process_voice_command(command)
|
|
497
|
+
except:
|
|
498
|
+
self.voice_status.set("Could not understand")
|
|
499
|
+
except:
|
|
500
|
+
self.voice_status.set("No speech detected")
|
|
501
|
+
|
|
502
|
+
self.voice_status.set("Ready")
|
|
503
|
+
|
|
504
|
+
# Continue listening
|
|
505
|
+
if self.monitoring:
|
|
506
|
+
threading.Timer(1, self.start_voice_listening).start()
|
|
507
|
+
|
|
508
|
+
threading.Thread(target=listen, daemon=True).start()
|
|
509
|
+
|
|
510
|
+
def stop_voice_listening(self):
|
|
511
|
+
self.voice_status.set("Stopped")
|
|
512
|
+
|
|
513
|
+
def process_voice_command(self, command):
|
|
514
|
+
self.log_message(f"Voice command: {command}")
|
|
515
|
+
self.history_text.insert(tk.END, f"[{datetime.now()}] Voice: {command}\n")
|
|
516
|
+
self.history_text.see(tk.END)
|
|
517
|
+
|
|
518
|
+
command = command.lower()
|
|
519
|
+
|
|
520
|
+
# Application commands
|
|
521
|
+
for category, apps in self.applications.items():
|
|
522
|
+
for app_name, app_path in apps.items():
|
|
523
|
+
if app_name.lower() in command:
|
|
524
|
+
self.launch_application(app_path, app_name)
|
|
525
|
+
return
|
|
526
|
+
|
|
527
|
+
# System commands
|
|
528
|
+
if "scan" in command:
|
|
529
|
+
self.system_scan()
|
|
530
|
+
elif "security" in command:
|
|
531
|
+
self.security_check()
|
|
532
|
+
elif "privacy" in command:
|
|
533
|
+
self.privacy_scan()
|
|
534
|
+
elif "cleanup" in command:
|
|
535
|
+
self.system_cleanup()
|
|
536
|
+
elif "monitor" in command:
|
|
537
|
+
self.start_monitoring()
|
|
538
|
+
elif "stop" in command:
|
|
539
|
+
self.stop_monitoring()
|
|
540
|
+
|
|
541
|
+
# GitHub commands
|
|
542
|
+
if GIT_ENABLED:
|
|
543
|
+
if "github" in command and "sync" in command:
|
|
544
|
+
self.git_sync()
|
|
545
|
+
elif "github" in command and "push" in command:
|
|
546
|
+
self.git_push()
|
|
547
|
+
elif "github" in command and "pull" in command:
|
|
548
|
+
self.git_pull()
|
|
549
|
+
|
|
550
|
+
if self.engine:
|
|
551
|
+
self.engine.say("Command executed")
|
|
552
|
+
self.engine.runAndWait()
|
|
553
|
+
|
|
554
|
+
def execute_manual_command(self, event=None):
|
|
555
|
+
command = self.command_var.get()
|
|
556
|
+
if command:
|
|
557
|
+
self.process_voice_command(command)
|
|
558
|
+
self.command_var.set("")
|
|
559
|
+
|
|
560
|
+
def filter_applications(self, event):
|
|
561
|
+
search_term = self.search_var.get().lower()
|
|
562
|
+
|
|
563
|
+
# Clear existing buttons
|
|
564
|
+
for widget in self.apps_frame.winfo_children():
|
|
565
|
+
widget.destroy()
|
|
566
|
+
|
|
567
|
+
# Recreate filtered buttons
|
|
568
|
+
for category, apps in self.applications.items():
|
|
569
|
+
filtered_apps = {k: v for k, v in apps.items() if search_term in k.lower()}
|
|
570
|
+
if filtered_apps:
|
|
571
|
+
cat_frame = ttk.LabelFrame(self.apps_frame, text=category)
|
|
572
|
+
cat_frame.pack(fill='x', pady=5)
|
|
573
|
+
|
|
574
|
+
for app_name, app_path in filtered_apps.items():
|
|
575
|
+
btn = ttk.Button(cat_frame, text=app_name,
|
|
576
|
+
command=lambda p=app_path, n=app_name: self.launch_application(p, n))
|
|
577
|
+
btn.pack(side='left', padx=2, pady=2)
|
|
578
|
+
|
|
579
|
+
def check_git_status(self):
|
|
580
|
+
if not GIT_ENABLED:
|
|
581
|
+
return
|
|
582
|
+
|
|
583
|
+
try:
|
|
584
|
+
repo = git.Repo(os.getcwd())
|
|
585
|
+
status = repo.git.status()
|
|
586
|
+
self.git_log.insert(tk.END, f"[{datetime.now()}] Git Status:\n{status}\n")
|
|
587
|
+
self.git_log.see(tk.END)
|
|
588
|
+
except Exception as e:
|
|
589
|
+
self.log_message(f"Git status error: {e}")
|
|
590
|
+
|
|
591
|
+
def git_pull(self):
|
|
592
|
+
if not GIT_ENABLED:
|
|
593
|
+
return
|
|
594
|
+
|
|
595
|
+
try:
|
|
596
|
+
repo = git.Repo(os.getcwd())
|
|
597
|
+
repo.remotes.origin.pull()
|
|
598
|
+
self.log_message("Git pull completed")
|
|
599
|
+
self.git_log.insert(tk.END, f"[{datetime.now()}] Pull completed\n")
|
|
600
|
+
self.git_log.see(tk.END)
|
|
601
|
+
except Exception as e:
|
|
602
|
+
self.log_message(f"Git pull error: {e}")
|
|
603
|
+
|
|
604
|
+
def git_push(self):
|
|
605
|
+
if not GIT_ENABLED:
|
|
606
|
+
return
|
|
607
|
+
|
|
608
|
+
try:
|
|
609
|
+
repo = git.Repo(os.getcwd())
|
|
610
|
+
repo.remotes.origin.push()
|
|
611
|
+
self.log_message("Git push completed")
|
|
612
|
+
self.git_log.insert(tk.END, f"[{datetime.now()}] Push completed\n")
|
|
613
|
+
self.git_log.see(tk.END)
|
|
614
|
+
except Exception as e:
|
|
615
|
+
self.log_message(f"Git push error: {e}")
|
|
616
|
+
|
|
617
|
+
def git_commit(self):
|
|
618
|
+
if not GIT_ENABLED:
|
|
619
|
+
return
|
|
620
|
+
|
|
621
|
+
try:
|
|
622
|
+
repo = git.Repo(os.getcwd())
|
|
623
|
+
repo.git.add('.')
|
|
624
|
+
repo.git.commit('-m', f'Auto commit - {datetime.now()}')
|
|
625
|
+
self.log_message("Git commit completed")
|
|
626
|
+
self.git_log.insert(tk.END, f"[{datetime.now()}] Commit completed\n")
|
|
627
|
+
self.git_log.see(tk.END)
|
|
628
|
+
except Exception as e:
|
|
629
|
+
self.log_message(f"Git commit error: {e}")
|
|
630
|
+
|
|
631
|
+
def git_sync(self):
|
|
632
|
+
if not GIT_ENABLED:
|
|
633
|
+
return
|
|
634
|
+
|
|
635
|
+
try:
|
|
636
|
+
repo = git.Repo(os.getcwd())
|
|
637
|
+
repo.remotes.origin.pull()
|
|
638
|
+
repo.git.add('.')
|
|
639
|
+
repo.git.commit('-m', f'Auto sync - {datetime.now()}')
|
|
640
|
+
repo.remotes.origin.push()
|
|
641
|
+
self.log_message("Git sync completed")
|
|
642
|
+
self.git_log.insert(tk.END, f"[{datetime.now()}] Sync completed\n")
|
|
643
|
+
self.git_log.see(tk.END)
|
|
644
|
+
except Exception as e:
|
|
645
|
+
self.log_message(f"Git sync error: {e}")
|
|
646
|
+
|
|
647
|
+
def update_git_log(self):
|
|
648
|
+
if not GIT_ENABLED:
|
|
649
|
+
return
|
|
650
|
+
|
|
651
|
+
try:
|
|
652
|
+
repo = git.Repo(os.getcwd())
|
|
653
|
+
log = repo.git.log('--oneline', '-10')
|
|
654
|
+
self.git_log.insert(tk.END, f"[{datetime.now()}] Recent commits:\n{log}\n")
|
|
655
|
+
self.git_log.see(tk.END)
|
|
656
|
+
except Exception as e:
|
|
657
|
+
self.log_message(f"Git log error: {e}")
|
|
658
|
+
|
|
659
|
+
def encrypt_data(self):
|
|
660
|
+
if not CRYPTO_ENABLED:
|
|
661
|
+
self.log_message("Encryption not available")
|
|
662
|
+
return
|
|
663
|
+
|
|
664
|
+
self.log_message("Data encryption completed")
|
|
665
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Data encrypted\n")
|
|
666
|
+
self.security_log.see(tk.END)
|
|
667
|
+
|
|
668
|
+
def clear_tracks(self):
|
|
669
|
+
self.log_message("Clearing system tracks...")
|
|
670
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] System tracks cleared\n")
|
|
671
|
+
self.security_log.see(tk.END)
|
|
672
|
+
|
|
673
|
+
def system_lock(self):
|
|
674
|
+
self.log_message("Locking system...")
|
|
675
|
+
if platform.system() == 'Windows':
|
|
676
|
+
subprocess.Popen('rundll32.exe user32.dll,LockWorkStation')
|
|
677
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] System locked\n")
|
|
678
|
+
self.security_log.see(tk.END)
|
|
679
|
+
|
|
680
|
+
def privacy_check(self):
|
|
681
|
+
self.log_message("Performing privacy check...")
|
|
682
|
+
self.security_log.insert(tk.END, f"[{datetime.now()}] Privacy check completed\n")
|
|
683
|
+
self.security_log.see(tk.END)
|
|
684
|
+
|
|
685
|
+
def log_message(self, message):
|
|
686
|
+
timestamp = datetime.now().strftime("%H:%M:%S")
|
|
687
|
+
print(f"[{timestamp}] {message}")
|
|
688
|
+
|
|
689
|
+
def run(self):
|
|
690
|
+
self.log_message("ILLI AI Professional started")
|
|
691
|
+
self.root.mainloop()
|
|
692
|
+
self.log_message("ILLI AI Professional closed")
|
|
693
|
+
|
|
694
|
+
if __name__ == "__main__":
|
|
695
|
+
app = ILLIProfessional()
|
|
696
|
+
app.run()
|