forked from Gooichand/LOOK_DGC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch_look_dgc.py
More file actions
60 lines (52 loc) · 1.63 KB
/
launch_look_dgc.py
File metadata and controls
60 lines (52 loc) · 1.63 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
#!/usr/bin/env python3
"""
LOOK-DGC Launcher
Developed by: Gopichand
Project: LOOK-DGC - Digital Image Forensics Toolkit
"""
import sys
import os
import subprocess
import socket
def check_internet():
"""Check if internet connection is available"""
try:
socket.create_connection(("8.8.8.8", 53), timeout=3)
return True
except OSError:
return False
def main():
print("="*50)
print(" LOOK-DGC - Digital Image Forensics Toolkit")
print(" Developed by: Gopichand")
print("="*50)
# Check network status
online = check_internet()
if online:
print(" 🌐 Status: Online - Full features available")
print(" 📡 HexEd.it: Online + Offline cached ready")
else:
print(" 📡 Status: Offline - Cached features available")
print(" 💾 HexEd.it: Offline ready (cached)")
print()
# Change to the gui directory
gui_dir = os.path.join(os.path.dirname(__file__), 'gui')
if not os.path.exists(gui_dir):
print(f"Error: GUI directory not found at {gui_dir}")
input("Press Enter to exit...")
return
os.chdir(gui_dir)
# Launch LOOK-DGC
try:
print("Starting LOOK-DGC...")
subprocess.run([sys.executable, 'look-dgc.py'], check=True)
except KeyboardInterrupt:
print("\nApplication closed by user")
except FileNotFoundError:
print("Error: look-dgc.py not found in gui directory")
input("Press Enter to exit...")
except Exception as e:
print(f"Error launching LOOK-DGC: {e}")
input("Press Enter to exit...")
if __name__ == "__main__":
main()