-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsicon-gui.py
641 lines (556 loc) · 25 KB
/
sicon-gui.py
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtWidgets import (
QMainWindow,
QVBoxLayout,
QHBoxLayout,
QTabWidget,
QLineEdit,
QMessageBox,
QLabel,
QPushButton,
QTableWidget,
QTableWidgetItem,
QTextEdit,
QWidget,
)
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QPixmap, QIcon
import threading
import logging
from animation.horizontal_scan_widget import HorizontalScanWidget
from guiscan.wafscan import waf_scanning
from guiscan.portscan import port_scanning
from guiscan.subscan import SubdomainScanner
from guiscan.scandir import DirectoryScanner
from guiscan.techscan import TechnologyScanner
from guiscan.cmsscan import CMSScanner
# Configure logging
logging.basicConfig(
filename="application.log",
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
)
class ScannerApp(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("S1C0N: Advanced Recon & Enumeration Tools")
self.setGeometry(100, 100, 1000, 700)
self.setStyleSheet("background-color: #121212; color: #EDEDED;")
self.setWindowIcon(QIcon("elang.png"))
self.central_widget = QtWidgets.QWidget()
self.setCentralWidget(self.central_widget)
# Main Layout
self.main_layout = QVBoxLayout(self.central_widget)
# URL Input
self.add_url_input()
# Tab Widget for Scanning Outputs
self.tab_widget = QTabWidget()
self.tab_widget.setStyleSheet(
"""
QTabWidget::pane { border: 1px solid #25D366; }
QTabBar::tab { background: #121212; color: #EDEDED; padding: 10px; }
QTabBar::tab:selected { background: #25d366; color: #121212; }
QTabBar::tab:hover { background: #25D366; color: #121212; border: 2px solid #121212}
"""
)
self.main_layout.addWidget(self.tab_widget)
# Define Tabs for Each Feature
self.tabs = {
"🔐 WAF Scanning": {"function": waf_scanning, "tab": None, "columns": ["Target", "Status", "WAF Name"]},
"🌐 Port Scanning": {"function": port_scanning, "tab": None, "columns": ["Port", "Service", "State"]},
"🌍 Subdomain Scanning": {"function": None, "tab": None, "columns": ["Subdomain", "Type Panel", "Ports"]},
"📂 Directory Scanning": {"function": None, "tab": None, "columns": ["Status", "Directory"]},
"🔧 Technology Scanning": {"function": None, "tab": None,"columns": ["URL", "Technologies", "Status"]},
"🔍 CMS Scanning": {"function": None, "tab": None,"columns": ["URL", "CMS", "Status"]},
}
self.add_home_tab()
self.create_feature_description_tab()
# Create a Tab for Each Feature
for feature_name in self.tabs:
self.create_feature_tab(feature_name)
# Add Log Tab
self.create_log_tab()
# Subdomain Scanner Setup
self.subdomain_scanner = SubdomainScanner()
self.subdomain_scanner.update_signal.connect(self.update_table_subdomains)
self.subdomain_scanner.error_signal.connect(self.show_error_message)
# Directory Scanner Setup
self.directory_scanner = DirectoryScanner()
self.directory_scanner.update_signal.connect(self.update_table_directory)
self.directory_scanner.error_signal.connect(self.show_error_message)
# Technology Scanner setups
self.tech_scanner = TechnologyScanner()
self.tech_scanner.update_signal.connect(self.update_table_tech)
self.tech_scanner.error_signal.connect(self.show_error_message)
# CMS Scanner setups
self.cms_scanner = CMSScanner()
self.cms_scanner.update_signal.connect(self.update_table_cms)
self.cms_scanner.error_signal.connect(self.show_error_message)
def add_home_tab(self):
""" Add Home Tab """
home_tab = QWidget()
home_layout = QVBoxLayout(home_tab)
home_layout.addStretch(1)
# Logo
logo = QLabel()
pixmap = QPixmap("sicon.png")
logo.setPixmap(pixmap.scaled(700, 700, Qt.KeepAspectRatio))
logo.setAlignment(Qt.AlignCenter)
home_layout.addWidget(logo)
# Subjudul
subjudul = QLabel("Reconnaissance & Enumerations Tool")
subjudul.setAlignment(Qt.AlignCenter)
subjudul.setStyleSheet("font-size: 32px; color: #25D366; font-weight: bold; margin-top: 10px;")
home_layout.addWidget(subjudul)
home_layout.addStretch(1)
# Disclaimer
disclaimer_text = """
<p style="font-size: 14px; font-style: italic; color: green;">
Disclaimer : This Application is intended for educational and demonstration purposes only.Using<br> this tool for
scanning or enumeration without explicit permission from the system or network owner<br> may violate
applicable laws. The user is fully responsible for any actions taken using this application.
</p>
"""
disclaimer = QLabel(disclaimer_text, home_tab)
disclaimer.setAlignment(Qt.AlignCenter)
home_layout.addWidget(disclaimer)
home_layout.addStretch(1)
self.tab_widget.addTab(home_tab, "🏠 Beranda")
def create_feature_description_tab(self):
""" Create a tab with explanations for each feature. """
description_tab = QWidget()
layout = QVBoxLayout(description_tab)
# Title Label
title_label = QLabel("Feature Explanations - S1C0N Tools")
title_label.setAlignment(Qt.AlignCenter)
title_label.setStyleSheet("font-size: 24px; color: #25D366; font-weight: bold; margin-top:30px; margin-bottom: 30px")
layout.addWidget(title_label)
# WAF Scanning Explanation
waf_description = QLabel("""
<h3>🔐 WAF Scanning</h3>
WAF Scanning is used to detect the presence of a Web Application Firewall on the target site.
This tool helps to determine if the web application is protected by a WAF that may block attacks.
The scan will look for active WAF names and provide further details about the protection in place.
""")
waf_description.setWordWrap(True)
waf_description.setStyleSheet("font-size: 14px; color: #EDEDED;")
layout.addWidget(waf_description)
# Port Scanning Explanation
port_description = QLabel("""
<h3>🌐 Port Scanning</h3>
Port Scanning is used to scan for open ports on the server or web application.
Open ports can provide important information about the services running on the server.
This scan identifies open ports, their status, and the services running on those ports.
""")
port_description.setWordWrap(True)
port_description.setStyleSheet("font-size: 14px; color: #EDEDED;")
layout.addWidget(port_description)
# Subdomain Scanning Explanation
subdomain_description = QLabel("""
<h3>🌍 Subdomain Scanning</h3>
Subdomain Scanning is used to discover subdomains associated with the main domain.
Subdomains can reveal various services and additional areas within the domain that may serve as entry points for attacks.
This scan looks for subdomains linked to the target domain and identifies open ports associated with each subdomain.
""")
subdomain_description.setWordWrap(True)
subdomain_description.setStyleSheet("font-size: 14px; color: #EDEDED;")
layout.addWidget(subdomain_description)
# Directory Scanning Explanation
directory_description = QLabel("""
<h3>📂 Directory Scanning</h3>
Directory Scanning is used to scan for directories and files available on a web application.
Many websites have exposed files and directories that can be exploited by attackers.
This scan helps identify accessible directories and look for potential data leaks.
""")
directory_description.setWordWrap(True)
directory_description.setStyleSheet("font-size: 14px; color: #EDEDED;")
layout.addWidget(directory_description)
layout.addStretch(1)
self.tab_widget.addTab(description_tab, "ℹ️ Description")
def add_url_input(self):
"""Add URL input field and button."""
url_layout = QHBoxLayout()
self.url_entry = QLineEdit()
self.url_entry.setPlaceholderText("Enter the target URL...")
self.url_entry.setStyleSheet(
"background-color: #282D35; color: #25D366; padding: 10px; font-size: 14px; border: 2px solid #25D366; border-radius: 5px;"
)
url_layout.addWidget(self.url_entry)
self.scan_all_button = QPushButton("Scan All")
self.scan_all_button.setStyleSheet(
"""
QPushButton {
background-color: #25D366;
color: #121212;
font-weight: bold;
padding: 10px;
font-size: 14px;
border-radius: 5px;
}
QPushButton:hover {
background-color: #1DB954;
color: #FFFFFF;
}
"""
)
url_layout.addWidget(self.scan_all_button)
self.scan_all_button.clicked.connect(self.scan_all)
self.main_layout.addLayout(url_layout)
def create_feature_tab(self, feature_name):
"""Create a tab for a specific feature."""
tab = QtWidgets.QWidget()
layout = QVBoxLayout(tab)
# Status Label
status_label = QLabel(f"Status: Idle")
status_label.setStyleSheet("font-size: 14px; color: #25D366;")
layout.addWidget(status_label)
# Horizontal Scanning Animation Widget
scan_widget = HorizontalScanWidget()
scan_widget.setMinimumHeight(50)
layout.addWidget(scan_widget)
# Table for Results
result_table = QTableWidget()
result_table.setColumnCount(len(self.tabs[feature_name]["columns"]))
result_table.setHorizontalHeaderLabels(self.tabs[feature_name]["columns"])
result_table.setStyleSheet(
"""
QTableWidget {
background-color: #1E1E1E;
color: #EDEDED;
border: 2px solid #25D366;
}
QHeaderView::section {
background-color: #121212;
color: #EDEDED;
border: 1px solid #25D366;
}
QTableWidget::item {
text-align: center;
}
"""
)
layout.addWidget(result_table)
# Start Scan Button
start_button = QPushButton(f"Start {feature_name}")
start_button.setStyleSheet(
"""
QPushButton {
background-color: #25D366;
color: #121212;
font-weight: bold;
padding: 10px;
font-size: 14px;
border-radius: 5px;
}
QPushButton:hover {
background-color: #1DB954;
color: #FFFFFF;
}
"""
)
if feature_name == "🌍 Subdomain Scanning":
start_button.clicked.connect(
lambda: self.start_subdomain_scan(status_label, result_table)
)
elif feature_name == "📂 Directory Scanning":
start_button.clicked.connect(
lambda: self.start_directory_scan(status_label, result_table)
)
elif feature_name == "🔧 Technology Scanning":
start_button.clicked.connect(
lambda: self.start_tech_scan(status_label, result_table)
)
elif feature_name == "🔍 CMS Scanning":
start_button.clicked.connect(
lambda: self.start_cms_scan(status_label, result_table)
)
else:
start_button.clicked.connect(
lambda: self.start_scan(feature_name, status_label, result_table)
)
layout.addWidget(start_button)
self.tabs[feature_name]["tab"] = {
"status_label": status_label,
"scan_widget": scan_widget,
"result_table": result_table,
}
self.tab_widget.addTab(tab, feature_name)
def create_log_tab(self):
"""Create a tab to display logs."""
log_tab = QtWidgets.QWidget()
layout = QVBoxLayout(log_tab)
self.log_textbox = QTextEdit()
self.log_textbox.setReadOnly(True)
self.log_textbox.setStyleSheet(
"""
QTextEdit {
background-color: #1E1E1E;
color: #EDEDED;
border: 2px solid #25D366;
font-family: Consolas, monospace;
font-size: 20px;
}
"""
)
layout.addWidget(self.log_textbox)
self.tab_widget.addTab(log_tab, "📜 Log")
def add_log_entry(self, message):
"""Add an entry to the log file and GUI."""
logging.info(message)
QtCore.QMetaObject.invokeMethod(
self.log_textbox, "append", QtCore.Qt.QueuedConnection, QtCore.Q_ARG(str, message)
)
def start_scan(self, feature_name, status_label, result_table):
url = self.url_entry.text().strip()
if not url:
self.add_log_entry("Error: No URL entered.")
QMessageBox.critical(self, "Error", "Please enter a valid URL.")
return
scan_function = self.tabs[feature_name]["function"]
scan_widget = self.tabs[feature_name]["tab"]["scan_widget"]
scan_widget.start_animation()
status_label.setText(f"Status: Scanning {feature_name}...")
self.add_log_entry(f"Started scanning {feature_name} for URL: {url}")
threading.Thread(
target=self.run_scan,
args=(feature_name, url, scan_function, status_label),
daemon=True,
).start()
def run_scan(self, feature_name, url, scan_function, status_label):
scan_widget = self.tabs[feature_name]["tab"]["scan_widget"]
try:
result = scan_function(url)
self.update_table(feature_name, result)
status_label.setText(f"Status: Completed {feature_name}")
self.add_log_entry(f"Completed scanning {feature_name} for URL: {url}")
except Exception as e:
status_label.setText(f"Error: {e}")
self.add_log_entry(f"Error scanning {feature_name} for URL {url}: {e}")
finally:
scan_widget.stop_animation(completed=True)
def start_subdomain_scan(self, status_label, result_table):
"""Start subdomain scanning."""
url = self.url_entry.text().strip()
if not url:
self.add_log_entry("Error: No URL entered for Subdomain Scanning.")
QMessageBox.critical(self, "Error", "Please enter a valid URL.")
return
scan_widget = self.tabs["🌍 Subdomain Scanning"]["tab"]["scan_widget"]
# Mulai animasi scanning
scan_widget.start_animation()
status_label.setText("Status: Scanning Subdomains...")
self.add_log_entry(f"Started scanning 🌍 Subdomain Scanning for URL: {url}")
def run_subdomain_scan():
try:
# Jalankan scanning subdomain
self.subdomain_scanner.subdo_scanning(url)
status_label.setText("Status: Completed Subdomain Scanning")
self.add_log_entry(f"Completed scanning 🌍 Subdomain Scanning for URL: {url}")
except Exception as e:
status_label.setText(f"Error: {e}")
self.add_log_entry(f"Error during Subdomain Scanning for URL {url}: {e}")
finally:
# Hentikan animasi scanning
scan_widget.stop_animation(completed=True)
threading.Thread(
target=self.subdomain_scanner.subdo_scanning,
args=(url,),
daemon=True,
).start()
def start_directory_scan(self, status_label, result_table):
"""Mulai scan direktori."""
url = self.url_entry.text().strip()
if not url:
QMessageBox.critical(self, "Error", "Please enter a valid URL.")
self.add_log_entry("Error: No URL entered for Directory Scanning.")
return
# Ambil widget animasi dari tab
scan_widget = self.tabs["📂 Directory Scanning"]["tab"]["scan_widget"]
# Mulai animasi scanning
scan_widget.start_animation()
status_label.setText("Status: Scanning Directories...")
self.add_log_entry(f"Started scanning 📂 Directory Scanning for URL: {url}")
def run_directory_scan():
try:
# Jalankan scanning direktori
self.directory_scanner.scan_dir(url)
status_label.setText("Status: Completed Directory Scanning")
self.add_log_entry(f"Completed scanning 📂 Directory Scanning for URL: {url}")
except Exception as e:
status_label.setText(f"Error: {e}")
self.add_log_entry(f"Error during Directory Scanning for URL {url}: {e}")
finally:
# Hentikan animasi scanning
scan_wdidget.stop_animation(completed=True)
threading.Thread(
target=self.directory_scanner.scan_dir,
args=(url,),
daemon=True,
).start()
def start_tech_scan(self, status_label, result_table):
"""Mulai scan technology."""
url = self.url_entry.text().strip()
if not url:
QMessageBox.critical(self, "Error", "Please enter a valid URL.")
self.add_log_entry("Error: No URL entered for Technology Scanning.")
return
# Ambil widget animasi dari tab
scan_widget = self.tabs["🔧 Technology Scanning"]["tab"]["scan_widget"]
# Mulai animasi scanning
scan_widget.start_animation()
status_label.setText("Status: Scanning Technology...")
self.add_log_entry(f"Started scanning 🔧 Technology Scanning for URL: {url}")
def run_tech_scan():
try:
# Jalankan scanning teknologi
self.tech_scanner.tech_scanning(url)
status_label.setText("Status: Completed Technology Scanning")
self.add_log_entry(f"Completed scanning 🔧 Technology Scanning for URL: {url}")
except Exception as e:
status_label.setText(f"Error: {e}")
self.add_log_entry(f"Error during Technology Scanning for URL {url}: {e}")
finally:
# Hentikan animasi scanning
scan_wdidget.stop_animation(completed=True)
threading.Thread(
target=self.tech_scanner.tech_scanning,
args=(url,),
daemon=True,
).start()
def start_cms_scan(self, status_label, result_table):
"""Mulai scan cms."""
url = self.url_entry.text().strip()
if not url:
QMessageBox.critical(self, "Error", "Please enter a valid URL.")
self.add_log_entry("Error: No URL entered for CMS Scanning.")
return
# Ambil widget animasi dari tab
scan_widget = self.tabs["🔍 CMS Scanning"]["tab"]["scan_widget"]
# Mulai animasi scanning
scan_widget.start_animation()
status_label.setText("Status: Scanning CMS...")
self.add_log_entry(f"Started scanning 🔍 CMS Scanning for URL: {url}")
def run_cms_scan():
try:
# Jalankan scanning cms
self.cms_scanner.cms_scanning(url)
status_label.setText("Status: Completed CMS Scanning")
self.add_log_entry(f"Completed scanning 🔍 CMS Scanning for URL: {url}")
except Exception as e:
status_label.setText(f"Error: {e}")
self.add_log_entry(f"Error during CMS Scanning for URL {url}: {e}")
finally:
# Hentikan animasi scanning
scan_wdidget.stop_animation(completed=True)
threading.Thread(
target=self.cms_scanner.cms_scanning,
args=(url,),
daemon=True,
).start()
def update_table(self, feature_name, result):
"""Update the table with the results."""
tab = self.tabs[feature_name]["tab"]
table = tab["result_table"]
table.setRowCount(0)
for row_data in result:
row_position = table.rowCount()
table.insertRow(row_position)
for col, value in enumerate(row_data.values()):
cell = QTableWidgetItem(str(value))
cell.setTextAlignment(QtCore.Qt.AlignCenter)
table.setItem(row_position, col, cell)
def update_table_subdomains(self, data):
"""Update the subdomain scanning table."""
tab = self.tabs["🌍 Subdomain Scanning"]["tab"]
table = tab["result_table"]
row_position = table.rowCount()
table.insertRow(row_position)
# Add Subdomain, Type Panel, and Ports columns
table.setItem(row_position, 0, QTableWidgetItem(data["Subdomain"]))
table.setItem(row_position, 1, QTableWidgetItem(data["Type"]))
table.setItem(row_position, 2, QTableWidgetItem(data["Ports"]))
# Center-align all data
for col in range(3):
item = table.item(row_position, col)
if item:
item.setTextAlignment(QtCore.Qt.AlignCenter)
def update_table_directory(self, data):
"""Perbarui tabel hasil scan direktori."""
tab = self.tabs["📂 Directory Scanning"]["tab"]
table = tab["result_table"]
row_position = table.rowCount()
table.insertRow(row_position)
table.setItem(row_position, 0, QTableWidgetItem(str(data["Status"])))
table.setItem(row_position, 1, QTableWidgetItem(data["Directory"]))
for col in range(2):
item = table.item(row_position, col)
if item:
item.setTextAlignment(QtCore.Qt.AlignCenter)
def update_table_tech(self, data):
"""Update the technology scanning table."""
tab = self.tabs["🔧 Technology Scanning"]["tab"]
table = tab["result_table"]
row_position = table.rowCount()
table.insertRow(row_position)
# Add URL, Technologies, and Status columns
table.setItem(row_position, 0, QTableWidgetItem(data["URL"]))
table.setItem(row_position, 1, QTableWidgetItem(data["Technologies"]))
table.setItem(row_position, 2, QTableWidgetItem(data["Status"]))
# Center-align all data
for col in range(3):
item = table.item(row_position, col)
if item:
item.setTextAlignment(QtCore.Qt.AlignCenter)
def update_table_cms(self, data):
"""Update the CMS detection table."""
tab = self.tabs["🔍 CMS Scanning"]["tab"]
table = tab["result_table"]
row_position = table.rowCount()
table.insertRow(row_position)
# Add URL, CMS, and Status columns
table.setItem(row_position, 0, QTableWidgetItem(data["URL"]))
table.setItem(row_position, 1, QTableWidgetItem(data["CMS"]))
table.setItem(row_position, 2, QTableWidgetItem(data["Status"]))
# Center-align all data
for col in range(3):
item = table.item(row_position, col)
if item:
item.setTextAlignment(QtCore.Qt.AlignCenter)
def scan_all(self):
"""Start scanning all features sequentially."""
for feature_name in self.tabs:
if feature_name == "🌍 Subdomain Scanning":
self.start_subdomain_scan(
self.tabs[feature_name]["tab"]["status_label"],
self.tabs[feature_name]["tab"]["result_table"],
)
elif feature_name == "📂 Directory Scanning":
self.start_directory_scan(
self.tabs[feature_name]["tab"]["status_label"],
self.tabs[feature_name]["tab"]["result_table"],
)
elif feature_name == "🔧 Technology Scanning":
self.start_tech_scan(
self.tabs[feature_name]["tab"]["status_label"],
self.tabs[feature_name]["tab"]["result_table"],
)
elif feature_name == "🔍 CMS Scanning":
self.start_cms_scan(
self.tabs[feature_name]["tab"]["status_label"],
self.tabs[feature_name]["tab"]["result_table"],
)
else:
self.start_scan(
feature_name,
self.tabs[feature_name]["tab"]["status_label"],
self.tabs[feature_name]["tab"]["result_table"],
)
def show_error_message(self, message):
"""Display error messages in a dialog."""
QMessageBox.critical(self, "Error", message)
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
window = ScannerApp()
window.show()
sys.exit(app.exec_())