-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path_diamondsorter.py
2416 lines (1926 loc) · 110 KB
/
_diamondsorter.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
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import json
import os
import re
import random
import string
import sys
import webbrowser
from PyQt5 import QtCore, QtGui, QtWidgets, uic
from PyQt5.QtCore import QUrl, Qt, QProcess, QTimer, QTimer, pyqtSignal, pyqtSlot
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtWidgets import QApplication, QDockWidget, QMainWindow, QPlainTextEdit, QLCDNumber, QMainWindow, QWidget, QVBoxLayout, QTextBrowser, QFileDialog, QTextEdit, QComboBox, QPushButton, QMessageBox, QFrame, QInputDialog, QLabel, QCheckBox, QScrollBar, QDialogButtonBox, QDialog, QGridLayout
import hashlib
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtGui import QDesktopServices
import binascii # hex encoding
import json as jsond # json
import platform # check platform
import subprocess # needed for mac device
import time # sleep before exit
from datetime import datetime
from time import sleep
import shutil
from multiprocessing import Process, Queue
from PyQt5.QtCore import QRunnable, QObject, pyqtSignal
class Sender(QObject):
mySignal = pyqtSignal(int)
def sendData(self, data):
self.mySignal.emit(data)
class Receiver(QObject):
@pyqtSlot(int)
def receiveData(self, data):
print(f"Received data: {data}")
sender = Sender()
receiver = Receiver()
# Connect the signal from the sender to the slot in the receiver
sender.mySignal.connect(receiver.receiveData)
# Emit the signal from the sender
sender.sendData(10)
class MyProcess(Process):
def __init__(self, queue):
super(MyProcess, self).__init__()
self.queue = queue
def run(self):
result = 1 + 100
self.queue.put(result)
class CookieWindow(QtWidgets.QDialog):
def __init__(self):
super(CookieWindow, self).__init__()
uic.loadUi(r'ui_files\cookies_window.py', self)
# Add any additional setup for the new window here
class TaskTracker(QMainWindow):
def __init__(self):
super(TaskTracker, self).__init__()
# Create the main window layout
main_widget = QWidget(self)
main_layout = QVBoxLayout()
main_widget.setLayout(main_layout)
# Create the text edit widget for displaying tasks
self.task_text_edit = QTextEdit()
main_layout.addWidget(self.task_text_edit)
# Create the combo box for selecting task filters
self.filter_combo = QComboBox()
self.filter_combo.addItem("All")
self.filter_combo.addItem("Completed")
self.filter_combo.addItem("Pending")
main_layout.addWidget(self.filter_combo)
# Create the button for adding a new task
add_button = QPushButton("Add Task")
add_button.clicked.connect(self.add_task)
main_layout.addWidget(add_button)
# Set the main widget as the central widget of the main window
self.setCentralWidget(main_widget)
import_requests_button.clicked.connect(self.import_requests_dialog)
def open_directory_dialog(self):
dialog = QFileDialog()
dialog.setFileMode(QFileDialog.Directory)
if dialog.exec_():
selected_directory = dialog.selectedFiles()[0]
self.set_directory_path_element.setPlainText(selected_directory)
def handle_scrape_banking_data(self):
# Get the directory path from the specified file directory
directory_path = self.set_directory_path_element.toPlainText()
def update_line_count(self):
"""Update the line count in the UI."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
total_lines_number = self.findChild(QLCDNumber, "totalLinesNumber") # Replace "totalLinesNumber" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None:
input_lines = len(input_text.toPlainText().split("\n"))
output_lines = len(output_text.toPlainText().split("\n"))
except Exception as e:
print(f"An error occurred: {e}")
def import_requests(self):
file_dialog = QFileDialog(self)
file_dialog.setFileMode(QFileDialog.ExistingFile) # Set the file mode to ExistingFile
file_dialog.setNameFilter("Text Files (*.txt)") # Set the file filter for text files
if file_dialog.exec_():
file_path = file_dialog.selectedFiles()[0] # Get the selected file path
with open(file_path, 'r') as file:
text = file.read()
self.input_text.setText(text)
def launch_insomnia():
message_box = QtWidgets.QMessageBox()
message_box.setText("You are about to launch Insomnia. Continue?")
message_box.setWindowTitle("Diamond Sorter - Window")
message_box.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
message_box.setDefaultButton(QtWidgets.QMessageBox.Yes)
result = message_box.exec_()
if result == QtWidgets.QMessageBox.Yes:
insomnia_path = r'refrences\Insomnia.exe' # Replace with the actual path to Insomnia.exe
subprocess.Popen(insomnia_path)
class DiamondSorter(QtWidgets.QMainWindow):
finished = pyqtSignal(int)
def __init__(self):
super(DiamondSorter, self).__init__()
uic.loadUi(r'form.ui', self)
self.queue = queue
self.result = None
self.queue = queue
self.process = MyProcess(self.queue)
self.process.start()
self.console_layout = QVBoxLayout(self.consolewidget)
self.console_layout.addWidget(self.consolewidget)
self.set_directory_path_element = QtWidgets.QTextEdit()
self.recent_directories = []
redline_file_structure_text_browser = "Redline / Meta"
racoon_file_structure_text_browser = "Racoon Stealer"
whitesnake_file_structure_text_browser = "Whitesnake"
worldwind_file_structure_text_browser = "Worldwind / Prynt"
self.set_directory_path_button.clicked.connect(self.open_directory_dialog)
self.save_results_action_button.clicked.connect(self.open_save_directory_dialog)
self.app = QApplication.instance() # Get the instance of the QApplication
self.input_text = self.findChild(QTextEdit, "input_text")
self.output_text = self.findChild(QTextEdit, "output_text")
self.removed_data_text = self.findChild(QTextBrowser, "removed_data_text")
self.enable_wordwrap_checkbox = self.findChild(QCheckBox, "enable_wordwrap_checkbox") # Replace "enable_wordwrap_checkbox" with the actual object name
self.enable_wordwrap_checkbox.stateChanged.connect(self.toggle_word_wrap)
self.enable_remove_empty_lines_checkbox = self.findChild(QCheckBox, "remove_empty_lines_checkbox")
self.layout = QVBoxLayout() # Define layout as an instance variable
self.actionLaunch_Browser.triggered.connect(self.open_browser)
self.actionInsomnia_HTTP_Client.triggered.connect(launch_insomnia)
self.remove_trash_button = self.findChild(QPushButton, "remove_trash_button")
if self.remove_trash_button is not None:
self.remove_trash_button.clicked.connect(self.remove_trash_button_clicked)
self.display_function("MyFunction")
self.import_requests_button = QPushButton("Import Requests")
self.button = QtWidgets.QPushButton("Process Directory")
self.extract_phone_number_button = QtWidgets.QPushButton("Extract Phone Numbers")
self.extract_phone_number_button.clicked.connect(self.perform_extract_phone_number)
central_widget = QWidget(self)
layout = QVBoxLayout(central_widget)
self.extract_ip_addressButton = QPushButton("Extract IP")
self.extract_ip_addressButton.clicked.connect(self.extract_ip_addresses) # Connect to the class method
self.lcd_number_2 = self.findChild(QLCDNumber, "lcdNumber_2")
self.input_text.textChanged.connect(self.process_input_text)
self.timer = QTimer(self)
self.timer.setInterval(500) # Flashing interval in milliseconds
self.timer.setSingleShot(True) # Only trigger the timeout once
self.timer.timeout.connect(self.flash_callback) # Connect to the class method
self.timer.start()
self.pasteButton.clicked.connect(self.paste_input)
self.tab2_pasteButton.clicked.connect(self.paste_input)
self.removeLinksButton.clicked.connect(self.remove_links)
self.copyButton_2.clicked.connect(self.copy_output)
self.removeEndingPunctuationButton.clicked.connect(self.remove_ending_punctuation)
self.remove_domainsButton.clicked.connect(self.remove_domains)
self.removeDuplicatesButton.clicked.connect(self.remove_duplicates)
self.extract_md5Button.clicked.connect(self.extract_md5)
self.removeSpecialCharacterButton.clicked.connect(self.remove_special_character)
self.organizeLinesButton.clicked.connect(self.organize_lines)
self.showDomainStatsButton.clicked.connect(self.show_stats)
self.remove_capturesButton.clicked.connect(self.remove_captures)
self.split_by_linesButton.clicked.connect(self.split_by_lines)
self.removeAfterSpace.clicked.connect(self.removeAfterSpaceclicked)
self.removeAfter_Tab_Space.clicked.connect(self.removeAfter_Tab_Space_clicked)
self.sort_email_domainsButton = QPushButton("Sort Email Domains")
self.sort_email_domainsButton.clicked.connect(self.sort_email_domains)
self.sort_remove_similarButton.clicked.connect(self.sort_remove_similar)
self.emailPasswordButton.clicked.connect(self.email_password)
self.usernamePasswordButton.clicked.connect(self.username_password)
self.newtextdocuments_button.clicked.connect(self.handle_newtextdocuments)
self.remove_inbetween_two_variablesButton.clicked.connect(self.remove_inbetween_two_variablesButtonClicked) # Replace "remove_inbetween_two_variablesButton" with the actual object name
self.stealer_log_format_combo.currentIndexChanged.connect(self.update_text_browser)
self.password_working_function_combo.currentIndexChanged.connect(self.update_work_location_browser)
self.input_text = self.findChild(QTextEdit, "input_text")
self.domain_managerButton.clicked.connect(self.launch_domain_manager)
self.chrome_extensions_button = QPushButton("Chrome Extensions")
self.newtextdocuments_button = QPushButton("New Text Documents")
self.discord_sorting_button = QPushButton("Discord Files")
self.telegram_folder_sorting_button = QPushButton("Telegram Folders")
self.chrome_extensions_button.clicked.connect(self.handle_chrome_extensions)
self.discord_sorting_button.clicked.connect(self.handle_discord_files)
self.telegram_folder_sorting_button.clicked.connect(self.handle_telegram_folder_sorting)
self.authy_desktop_button.clicked.connect(self.handle_authy_desktop)
self.desktop_wallet_button.clicked.connect(self.handle_desktop_wallet)
self.browser_2fa_extension_button.clicked.connect(self.handle_browser_2fa_extension)
self.text_named_sorting_button.clicked.connect(self.handle_text_named_sorting)
self.pgp_button.clicked.connect(self.handle_pgp)
self.encryption_keys_button.clicked.connect(self.handle_encryption_keys)
self.auth_files_button.clicked.connect(self.handle_auth_files)
self.sort_by_cookies_button.clicked.connect(self.handle_sort_by_cookies)
self.button_scrape_keys.clicked.connect(self.handle_scrape_keys)
self.button_scrape_banking_data.clicked.connect(self.handle_scrape_banking_data)
self.button_scrape_backup_codes.clicked.connect(self.handle_scrape_backup_codes)
self.button_scrape_security_data.clicked.connect(self.handle_scrape_security_data)
self.emailPasswordButton.clicked.connect(self.email_password)
self.memberIDPINButton.clicked.connect(self.member_id_pin)
self.numberPasswordButton.clicked.connect(self.number_password)
self.business_emailfinder_button.clicked.connect(self.business_emails)
self.emailPasswordButton.clicked.connect(self.email_password)
self.usernamePasswordButton.clicked.connect(self.username_password)
self.memberIDPINButton.clicked.connect(self.member_id_pin)
self.wordpress_finder_button.clicked.connect(self.wordpress_finder)
self.business_emailfinder_button.clicked.connect(self.business_emails)
self.governmentDomainsButton.clicked.connect(self.gov_domains)
self.server_information_button.clicked.connect(self.server_information)
self.cpanel_account_button.clicked.connect(self.cpanel_accounts)
self.mailBoxesOptions_ComboButton.clicked.connect(self.checkmark)
self.advertisingButton.clicked.connect(self.advertisements)
self.socialForumsButton.clicked.connect(self.socials_forums)
self.create_password_list.clicked.connect(self.create_passwordlist)
self.extract_phone_number_button = QtWidgets.QPushButton("Extract Phone Numbers")
self.extract_phone_number_button.clicked.connect(self.perform_extract_phone_number)
self.input_text.textChanged.connect(self.update_line_count)
self.output_text.textChanged.connect(self.update_line_count)
self.removed_data_text.textChanged.connect(self.update_line_count)
def remove_domains(self):
"""Remove domains from the input_text widget."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None and output_text is not None:
text = input_text.toPlainText()
text_without_domains = re.sub(r'@\S+\.', '', text)
output_text.clear()
output_text.setPlainText(text_without_domains)
except Exception as e:
print(f"An error occurred: {e}")
def update_line_count(self):
"""Update the line count in the UI."""
try:
total_lines_number_lcd_input = self.findChild(QLCDNumber, "totalLinesNumber")
results_tab_lcd_input = self.findChild(QLCDNumber, "lcdNumber_2")
removed_data_tab_lcd_input = self.findChild(QLCDNumber, "lcdNumber_3")
do_remove_empty_lines = self.remove_empty_lines_checkbox.isChecked()
n_input_lines = calc_lines(self.input_text.toPlainText(), do_remove_empty_lines)
total_lines_number_lcd_input.display(n_input_lines)
n_output_result_lines = calc_lines(self.output_text.toPlainText(), do_remove_empty_lines)
results_tab_lcd_input.display(n_output_result_lines)
n_output_removed_data_lines = calc_lines(self.removed_data_text.toPlainText(), do_remove_empty_lines)
removed_data_tab_lcd_input.display(n_output_removed_data_lines)
except Exception as e:
print(f"An error occurred: {e}")
def flash_callback(self):
"""Callback function for the QTimer timeout event."""
self.totalLinesNumber.setSegmentStyle(QLCDNumber.Flat)
self.totalLinesNumber.setDigitCount(4)
self.totalLinesNumber.setMode(QLCDNumber.Dec)
self.totalLinesNumber.setSegmentStyle(QLCDNumber.Flat)
self.totalLinesNumber.setSegmentStyle(QLCDNumber.Flat)
self.totalLinesNumber.setSegmentStyle(QLCDNumber.Flat)
self.totalLinesNumber.display(9999)
input_lines = len(self.input_text.toPlainText().split("\n"))
self.lcdNumber_2.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_2.setDigitCount(4)
self.lcdNumber_2.setMode(QLCDNumber.Dec)
self.lcdNumber_2.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_2.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_2.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_2.display(input_lines)
output_lines = len(self.output_text.toPlainText().split("\n"))
self.lcdNumber_3.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_3.setDigitCount(4)
self.lcdNumber_3.setMode(QLCDNumber.Dec)
self.lcdNumber_3.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_3.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_3.setSegmentStyle(QLCDNumber.Flat)
self.lcdNumber_3.display(output_lines)
removed_lines = len(self.removed_data_text.toPlainText().split("\n"))
def extract_ip_addresses(self):
pattern = r"\b(?:\d{1,3}\.){3}\d{1,3}\b" # Regular expression pattern for IP addresses
ip_addresses = re.findall(pattern, self.input_text.toPlainText()) # Use self.input_text to get the text from the input_text QTextEdit
ip_addresses.sort() # Sort the extracted IP addresses
self.output_text.setPlainText("\n".join(ip_addresses))
def on_tab_switched(self, index):
current_tab = self.tabWidget.tabText(index)
notice = f"Switched to tab: {current_tab}"
self.console_widget_textedit.appendPlainText(notice)
def process_input_text(self):
# Initialize the lcdNumber_2 widget
lcd_number_2 = self.findChild(QLCDNumber, "lcdNumber_2")
# Set the initial value to 9999
lcd_number_2.display(9999)
# Create a QTimer to control the flashing behavior
timer = QTimer(self)
timer.setInterval(500) # Flashing interval in milliseconds
timer.setSingleShot(True) # Only trigger the timeout once
# Define a callback function for the QTimer timeout
def flash_callback():
# Display 9999 for two flashes
lcd_number_2.display(9999)
QTimer.singleShot(500, lambda: lcd_number_2.display(0))
QTimer.singleShot(1000, lambda: lcd_number_2.display(9999))
QTimer.singleShot(1500, lambda: lcd_number_2.display(0))
# Connect the QTimer timeout to the callback function
timer.timeout.connect(flash_callback)
# Start the QTimer
timer.start()
def totalLinesNumber(self, count):
self.totalLinesNumber.display(count)
def count_left_to_go(self, count):
self.count_left_to_go.display(count)
def count_already_ran(self, count):
self.count_already_ran.display(count)
def count_error_lines(self, count):
self.count_error_lines.display(count)
def handle_process_finished(self, result):
print(result)
# Update lcdNumber_1 with the result
def run(self):
my_function(self.queue, 1)
def display_function(self, function_name):
"""Update the text of the running_task_placeholder label."""
if function_name == self.redline_file_structure_text_browser:
self.stealer_log_file_structure_path.setText(self.redline_file_structure_text_browser)
elif function_name == self.racoon_file_structure_text_browser:
self.stealer_log_file_structure_path.setText(self.racoon_file_structure_text_browser)
elif function_name == self.whitesnake_file_structure_text_browser:
self.stealer_log_file_structure_path.setText(self.whitesnake_file_structure_text_browser)
elif function_name == self.worldwind_file_structure_text_browser:
self.stealer_log_file_structure_path.setText(self.worldwind_file_structure_text_browser)
self.stealer_log_file_structure_path(self.queue, 1)
def remove_trash_button_clicked(self):
"""Handle the button click event for remove_trash_button."""
options = ["Remove Unknown", "Remove ****", "Remove Short", "Remove Simalar", "Option 5", "Option 6"] # Replace with your specific options
# Create the custom dialog
dialog = QDialog(self)
dialog.setWindowTitle("Remove Trash Options") # Set the title of the dialog window
layout = QGridLayout(dialog) # Use QGridLayout for the layout
checkboxes = []
for i, option in enumerate(options):
checkbox = QCheckBox(option)
row = i // 3 # Calculate the row based on the index
col = i % 3 # Calculate the column based on the index
layout.addWidget(checkbox, row, col) # Add the checkbox to the layout
checkboxes.append(checkbox)
# Add OK and Cancel buttons
buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttons.accepted.connect(dialog.accept)
buttons.rejected.connect(dialog.reject)
layout.addWidget(buttons, row + 1, 0, 1, 3) # Add the buttons to the layout
# Execute the dialog and get the selected options
if dialog.exec_() == QDialog.Accepted:
selected_options = [checkbox.text() for checkbox in checkboxes if checkbox.isChecked()]
# Start the removal process based on the selected options
self.start_removal(selected_options)
def start_removal(self, selected_options):
"""Perform the removal process based on the selected options."""
# Implement the removal process based on the selected options
# You can use control structures like if-else or loops to handle different options
# Example code:
for option in selected_options:
if option == "Remove Unknown":
# Handle Option 1 removal
pass
elif option == "Remove ****":
# Handle Option 2 removal
pass
elif option == "Remove Short":
# Handle Option 3 removal
pass
elif option == "Remove Simalar":
# Handle Option 1 removal
pass
elif option == "Option 5":
# Handle Option 2 removal
pass
elif option == "Option 6":
# Handle Option 3 removal
pass
def update_output_text(self):
output_text = self.password_format_tab.output_text.toPlainText()
if self.remove_empty_lines_checkbox.isChecked():
output_text = "\n".join(line for line in output_text.split("\n") if line.strip())
self.password_format_tab.output_text.setPlainText(output_text)
def open_save_directory_dialog(self):
directory = QFileDialog.getExistingDirectory(self, "Select Directory")
if directory:
self.savedResultsTextBox.setText(directory)
def open_browser(self):
message_box = QtWidgets.QMessageBox()
message_box.setText("You are about to launch the built-in browser. Continue?")
message_box.setWindowTitle("Diamond Sorter - Window")
message_box.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
message_box.setDefaultButton(QtWidgets.QMessageBox.Yes)
result = message_box.exec_()
if result == QtWidgets.QMessageBox.Yes:
script_path = "browser.py" # Path to the browser script
subprocess.Popen(["python", script_path])
def cleanup(self):
"""Cleanup the input text."""
try:
# Ask for confirmation
reply = QMessageBox.question(
self,
"Confirmation",
"Are you sure you want to perform the cleanup action?",
QMessageBox.Yes | QMessageBox.No,
QMessageBox.No
)
if reply == QMessageBox.Yes:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None and output_text is not None:
text = input_text.toPlainText()
lines = text.split("\n")
cleaned_lines = [line.strip() for line in lines if line.strip()]
output_text.clear()
output_text.setPlainText("\n".join(cleaned_lines))
self.update_line_count() # Assuming update_line_count is a method in your class
# Display the pop-up window with checkboxes
dialog = QDialog(self)
layout = QVBoxLayout(dialog)
# Add checkboxes
checkbox1 = QCheckBox("Checkbox 1")
checkbox2 = QCheckBox("Checkbox 2")
checkbox3 = QCheckBox("Checkbox 3")
checkbox4 = QCheckBox("Checkbox 4")
checkbox5 = QCheckBox("Checkbox 5")
checkbox6 = QCheckBox("Checkbox 6")
checkbox7 = QCheckBox("Checkbox 7")
layout.addWidget(checkbox1)
layout.addWidget(checkbox2)
layout.addWidget(checkbox3)
layout.addWidget(checkbox4)
layout.addWidget(checkbox5)
layout.addWidget(checkbox6)
layout.addWidget(checkbox7)
# Add OK and Cancel buttons
buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttons.accepted.connect(dialog.accept)
buttons.rejected.connect(dialog.reject)
layout.addWidget(buttons)
if dialog.exec_() == QDialog.Accepted:
# OK button pressed, perform further actions based on the checkbox states
if checkbox1.isChecked():
# Handle checkbox 1 checked
pass
if checkbox2.isChecked():
# Handle checkbox 2 checked
pass
# ... handle other checkboxes
except Exception as e:
print(f"An error occurred: {e}")
def update_line_count(self):
"""Update the line count in the UI."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None and output_text is not None:
input_lines = len(input_text.toPlainText().split("\n"))
output_lines = len(output_text.toPlainText().split("\n"))
except Exception as e:
print(f"An error occurred: {e}")
def create_userlist(self):
"""Create a list of values before the specified value."""
try:
specified_value, ok = QInputDialog.getText(self, "Create User List", "Enter the specified value:")
if ok and specified_value:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None and output_text is not None:
text = input_text.toPlainText()
lines = text.split("\n")
user_list = [line.split(specified_value)[0].strip() for line in lines if specified_value in line]
output_text.clear()
output_text.setPlainText("\n".join(user_list))
except Exception as e:
print(f"An error occurred: {e}")
def create_numberlist(self):
"""Create a list of number values that could be phone numbers."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None and output_text is not None:
text = input_text.toPlainText()
lines = text.split("\n")
number_list = []
for line in lines:
numbers = re.findall(r"\d{3}-\d{3}-\d{4}", line) # Assuming phone numbers are in the format XXX-XXX-XXXX
if numbers:
number_list.extend(numbers)
output_text.clear()
output_text.setPlainText("\n".join(number_list))
except Exception as e:
print(f"An error occurred: {e}")
def create_passwordlist(self):
"""Create a list of values after the specified value."""
try:
specified_value, ok = QInputDialog.getText(self, "Create Password List", "Enter the specified value:")
if ok and specified_value:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if input_text is not None and output_text is not None:
text = input_text.toPlainText()
lines = text.split("\n")
password_list = [line.split(specified_value)[1].strip() for line in lines if specified_value in line]
output_text.clear()
output_text.setPlainText("\n".join(password_list))
except Exception as e:
print(f"An error occurred: {e}")
def remove_links(self):
"""Remove links from the input_text widget."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
if input_text is not None:
text = input_text.toPlainText()
text_without_links = re.sub(r'http\S+', '', text)
input_text.clear()
input_text.setPlainText(text_without_links)
except Exception as e:
print(f"An error occurred: {e}")
def show_install_dialog(self):
# Create a message box asking the user if they want to install undetected-chromedriver
reply = QMessageBox.question(
self,
"Install undetected-chromedriver",
"Do you want to run 'pip install undetected-chromedriver'?",
QMessageBox.Yes | QMessageBox.No
)
# Process the user's response
if reply == QMessageBox.Yes:
# Run the pip install command
# You can use the subprocess module to run the command
# subprocess.run(["pip", "install", "undetected-chromedriver"])
print("Running: pip install undetected-chromedriver")
else:
print("Installation canceled")
def menuBrowser(self, signalArguments):
subprocess.Popen(["python", "browser.py"])
def tab_changed(self, index):
"""Perform actions based on the selected tab index."""
password_working_function_combo = self.findChild(QComboBox, "password_working_function_combo") # Replace "password_working_function_combo" with the actual object name
if password_working_function_combo is not None:
current_value = password_working_function_combo.currentText()
if current_value == "Working from Directory":
# Change the file directory path for Working from Directory
self.set_directory_path_element.setText("New Directory Path")
elif current_value == "Working from Input Requests":
# Change the file directory path for Working from Input Requests
self.set_directory_path_element.setText("New Input Requests Path")
def toggle_word_wrap(self, state):
"""Enable or disable word wrap and scroll bar based on the state of enable_wordwrap_checkbox."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
removed_data_text = self.findChild(QTextBrowser, "removed_data_text") # Replace "removed_data_text" with the actual object name
if input_text is not None and output_text is not None and removed_data_text is not None:
if state == Qt.Checked:
input_text.setLineWrapMode(QTextEdit.WidgetWidth)
input_text.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
output_text.setLineWrapMode(QTextEdit.WidgetWidth)
output_text.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
removed_data_text.setLineWrapMode(QTextEdit.WidgetWidth)
removed_data_text.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
else:
input_text.setLineWrapMode(QTextEdit.NoWrap)
input_text.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
output_text.setLineWrapMode(QTextEdit.NoWrap)
output_text.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
removed_data_text.setLineWrapMode(QTextEdit.NoWrap)
removed_data_text.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
# Update the scroll bar visibility
input_text.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
input_text.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
output_text.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
output_text.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
removed_data_text.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
removed_data_text.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
input_text.updateGeometry()
output_text.updateGeometry()
removed_data_text.updateGeometry()
except Exception as e:
print(f"An error occurred: {e}")
def copy_output(self):
"""Copy content from output_text widget to clipboard."""
try:
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
if output_text is not None:
clipboard = self.app.clipboard()
clipboard.setText(output_text.toPlainText())
except Exception as e:
print(f"An error occurred: {e}")
def paste_input(self):
"""Paste content from clipboard to input_text widget."""
try:
clipboard_content = QtWidgets.QApplication.clipboard().text()
input_text = self.findChild(QtWidgets.QTextEdit, "input_text") # Replace "input_text" with the actual object name
if input_text is not None:
input_text.setPlainText(clipboard_content)
except Exception as e:
print(f"An error occurred: {e}")
def replace_with_listButton():
repeating_string = input("Enter the repeating string or value: ")
lines = input("Copy and paste the list of lines: ").splitlines()
for line in lines:
replaced_line = line.replace(repeating_string, line)
print(replaced_line)
def remove_ending_punctuation(self):
"""Remove ending punctuation from the input_text widget."""
try:
input_text = self.findChild(QTextEdit, "input_text") # Replace "input_text" with the actual object name
output_text = self.findChild(QTextEdit, "output_text") # Replace "output_text" with the actual object name
removed_data_text = self.findChild(QTextBrowser, "removed_data_text") # Replace "removed_data_text" with the actual object name
if input_text is not None and output_text is not None and removed_data_text is not None:
text = input_text.toPlainText()
text_without_punctuation = re.sub(r'([^\w\s]|(?<=\w)[.,!?])\s*$', '', text)
removed_data_text = re.sub(rf'(?<!\w){re.escape(text_without_punctuation)}(?!\w)', '', text)
removed_data_text.append(removed_data_text)
output_text.clear()
output_text.setPlainText(text_without_punctuation)
except Exception as e:
print(f"An error occurred: {e}")
def removeAfter_Tab_Space_clicked(self):
num_tabs, ok = QInputDialog.getInt(self, "Specify Number of Tab Spaces",
"Enter the number of Tab Spaces to move after:")
if ok:
# Perform the desired action with the value entered by the user
lines = self.input_text.toPlainText().split('\n')
output_lines = []
removed_lines = []
for line in lines:
tab_count = line.count('\t')
if tab_count > num_tabs:
removed_lines.append(line)
else:
output_lines.append(line)
self.output_text.setPlainText('\n'.join(output_lines))
self.removed_data_text.setPlainText('\n'.join(removed_lines))
else:
# User canceled the input dialog, handle it accordingly
print("User canceled the input dialog")
def perform_extract_phone_number(self):
input_text = "..." # Replace with your input text
output_text = ""
removed_data_text = ""
# Code logic for extracting phone numbers
extracted_numbers = extract_phone_number(input_text)
cleaned_text, phone_numbers = extracted_numbers
output_text = "\n".join(phone_numbers)
removed_data_text = cleaned_text
def extract_ip_address_clicked(self):
# Define the regex pattern for IP address or IP:PORT address
pattern = r"\b(?:\d{1,3}\.){3}\d{1,3}(?::\d{1,5})?\b"
# Extract lines that match the pattern
lines = self.input_text.toPlainText().split('\n')
extracted_lines = []
removed_lines = []
for line in lines:
match = re.search(pattern, line)
if match:
extracted_lines.append(line)
else:
removed_lines.append(line)
# Set the extracted and removed lines in the respective text widgets
self.output_text.setPlainText('\n'.join(extracted_lines))
self.removed_data_text.setPlainText('\n'.join(removed_lines))
def paste_input(self):
"""Paste content from clipboard to input_text widget."""
try:
clipboard_content = QtWidgets.QApplication.clipboard().text()
input_text = self.findChild(QtWidgets.QTextEdit, "input_text") # Replace "input_text" with the actual object name
if input_text is not None:
input_text.setPlainText(clipboard_content)
except Exception as e:
print(f"An error occurred: {e}")
def replace_with_listButton():
repeating_string = input("Enter the repeating string or value: ")
lines = input("Copy and paste the list of lines: ").splitlines()
for line in lines:
replaced_line = line.replace(repeating_string, line)
print(replaced_line)
def handle_auth_files(self):
# Functionality for handling Auth Files Button
print("Auth Files Button clicked")
def wordpress_finder(self):
# Logic for the "Wordpress Finder" button
pass
def handle_scrape_keys(self):
# Functionality for handling Scrape Keys button
print("Scrape Keys button clicked")
def server_information(self):
# Logic for the "Server Information" button
pass
def cpanel_accounts(self, set_directory_path_element):
try:
directory_path = self.set_directory_path_element.toPlainText()
if directory_path:
# Define the regex pattern for Cpanel, WHM, and related port numbers
pattern = r"\b(Cpanel|WHM|2083|2082|2086|3306|2096)\b"
# Create a new folder for saving the results
now = datetime.now()
timestamp = now.strftime("%Y%m%d%H%M%S")
new_folder_name = f"CpanelAccounts_{timestamp}"
save_directory = os.path.join(directory_path, new_folder_name)
os.makedirs(save_directory)
# Crawl the specified directory path and search for matching files
for root, dirs, files in os.walk(directory_path):
for file in files:
file_path = os.path.join(root, file)
with open(file_path, 'r') as f:
content = f.read()
if re.search(pattern, content):
shutil.copy2(file_path, save_directory)
print("Cpanel accounts extraction completed.")
else:
print("Invalid directory path.")
except Exception as e:
print(f"Error: {str(e)}")
def emails(self):
# Logic for the "Emails" button
pass
def html_head(self):
# Logic for the "<html><head/" button
pass
def checkmark(self):
# Logic for the "✅" button
pass
def advertisements(self):
# Logic for the "Advertisements" button
pass
def socials_forums(self):
# Logic for the "Socials && Forums" button
pass
def update_lcdNumber(self):
count = self.lcdNumber_4.intValue()
self.lcdNumber_4.display(count)
def handle_scrape_banking_data(self):
# Get the directory path from the specified file directory
directory_path = self.set_directory_path_element.toPlainText()
# Get the stealer log format combo value
stealer_log_format = self.stealer_log_format_combo.currentText()
# Display the actions, results, and stats in the console widget
self.console_widget.appendPlainText("Scrape Banking Data button clicked")
self.console_widget.appendPlainText("Starting crawling from directory: " + directory_path)
self.console_widget.appendPlainText("Stealer log format: " + stealer_log_format)
# Perform the crawling and display the results
# Add your crawling and displaying logic here
# Display the stats
self.console_widget.appendPlainText("Crawling completed. Displaying stats")
# Add your stats displaying logic here
# Check if the directory path is valid
if not os.path.isdir(directory_path):
self.console_data() # Call the console_data function
return
# Display the actions, results, and stats in the console widget
print("Scrape Banking Data button clicked")
print("Starting crawling from directory:", directory_path)
print("Stealer log format:", stealer_log_format)
# Perform the crawling and display the results
# Add your crawling and displaying logic here
# Display the stats
print("Crawling completed. Displaying stats")
# Add your stats displaying logic here
def sort_passwords_textButton(self):
# Get the specified directory path from the set_directory_path_element
directory_path = self.set_directory_path_element.toPlainText()
# Loop through all subdirectories in the specified directory
for subdir, dirs, files in os.walk(directory_path):
# Loop through all files in the current subdirectory
for file in files:
# Check if the current file is a passwords.txt file
if file.lower() == "passwords.txt" or "Password List.txt" or "_AllPasswords_list.txt":
# Define the path to the current file
file_path = os.path.join(subdir, file)
# Open the current file for reading
try:
with open(file_path, "r", encoding="utf-8") as f:
# Read the contents of the file
contents = f.read()
except UnicodeDecodeError:
print(f"Error: Unable to read file {file_path}. Skipping...")
continue
# Split the contents of the file into individual password entries
entries = contents.split("===============\n")
# Loop through each password entry
for entry in entries:
# Split the entry into individual lines
lines = entry.strip().split("\n")
# Extract the URL, username, and password from the entry
url = ""
user = ""
password = ""
for line in lines:
if line.startswith("URL:") or line.startswith("url:") or line.startswith("Url:") or line.startswith("Host:") or line.startswith("HOSTNAME:"):
url = line.split(":", 1)[1].strip() if len(line.split(":")) > 1 else ""
elif line.startswith("USER:") or line.startswith("login:") or line.startswith("Login") or line.startswith("Username") or line.startswith("USER LOGIN:"):
user = line.split(":")[1].strip() if len(line.split(":")) > 1 else ""
elif line.startswith("PASS:") or line.startswith("password:") or line.startswith("Password") or line.startswith("USER PASSWORD"):
password = line.split(":")[1].strip() if len(line.split(":")) > 1 else ""
# Format the entry as "URL:USER:PASS"
if url:
if url.startswith("android"):
package_name = url.split("@")[-1]
package_name = package_name.replace("-", "").replace("_", "").replace(".", "")
package_name = ".".join(package_name.split("/")[::-1])
package_name = ".".join(package_name.split(".")[::-1])
url = f"{package_name}android.app"
else:
url_components = urlsplit(url)
url = f"{url_components.scheme}://{url_components.netloc}"
formatted_entry = f'"{url}":{user}:{password}\n'
# Open the output file for appending
with open(os.path.join(output_folder, output_file2, encoding='utf-8'), "a") as f:
# Write the formatted entry to the output file
f.write(formatted_entry)
def handle_scrape_backup_codes(self):
pattern = r"\b[A-Za-z0-9]{4,8}\b" # Example regex pattern for 2FA codes, authentication codes, or PGP
backup_codes = []
lines = self.input_text.toPlainText().split('\n')