├── guilib ├── __init__.py ├── VirusTotalApiKeyConfiguration_controller.py ├── html_text_generator │ └── html_draft.py ├── main_icon_file.py ├── external_thread_modules │ ├── HTS_AnalaysThread_1.py │ ├── FaceRecognitionManuelDatabaseSearch.py │ └── FaceRecognitionDirectoryTransfer_old.py ├── coomingSoom_controller.py ├── MatplotShowScreen.py ├── TcNumberValidationChecker_controller.py ├── ShodanApiKeyConfiguration_controller.py ├── BinLookup_controller.py ├── new_account_controller.py ├── PhoneNumberParser_controller.py ├── IPtracerBasic_controller.py ├── TcNumberCalculator_controller.py ├── login_controller.py ├── BinLookupScreen.py ├── coomingSoonScreen.py ├── HtsAnalaysis_controller.py ├── IPtracerBasicScreen.py ├── changePassword_controller.py ├── TcNumberValidationCheckerScreen.py ├── ShodanApiKeyConfigurationScreen.py ├── VirusTotalApiKeyConfigurationScreen.py ├── PhoneNumberParserScreen.py ├── soundConverter_controller.py ├── TcNumberCalculatorScreen.py ├── ibanParser_controller.py └── AndroidAnlysisScreen.py ├── hivelibrary ├── system_log.py ├── __init__.py ├── install_insightface_model.py ├── __pycache__ │ ├── env.cpython-311.pyc │ ├── __init__.cpython-311.pyc │ ├── system_init.cpython-311.pyc │ ├── console_tools.cpython-311.pyc │ ├── database_tools.cpython-311.pyc │ └── database_structure.cpython-311.pyc ├── VirusTotal │ ├── search.py │ └── url_scanner.py ├── types.py ├── psqlConfig.py ├── banner.py ├── ansii_variables.py ├── file_operations │ ├── file_information.py │ ├── generic_tools.py │ └── video_tools.py ├── map_tools.py ├── ImageTools │ └── opencv_tools.py ├── identify │ ├── voice_comparsion.py │ ├── phoneNumper_tools.py │ └── tc_number_tools.py ├── load_config.py ├── os_information.py ├── env.py ├── console_tools.py ├── consolePrint.py ├── AndroidTools │ └── androguard_tools.py ├── make_config_schema.py ├── hash_tools.py ├── database_structure.py ├── osint │ └── reverse_ip.py ├── bin_lookup.py ├── rsa_tools.py ├── sound_converter.py ├── hts_toolkit │ └── format_detector.py ├── face_recognition_database_tools_sqlite.py └── face_recognition_database_tools.py ├── img ├── temsil2.png ├── BinLookup.png ├── video2frame.png ├── FaceDetection.png ├── HTS_format_1.png ├── ibanParserGUI.png ├── installing_1.png ├── installing_2.png ├── personNoInDB.png ├── welcomeScreen.png ├── FaceVerification.png ├── personInDatabase.png ├── soundConverter.png ├── AndroidAnalysis_1.png ├── voiceVerification.png ├── reverseIPlookup_basic.png ├── windows_installing_1.png ├── windows_installing_2.png └── FaceVerificationFarkliKisiler.png ├── iconfiles ├── logo.png └── main_icon_files.qrc ├── CONTRIBUTING.md ├── binary └── windows │ └── insightface-0.7.3-cp311-cp311-win_amd64.whl ├── requirements.txt ├── .gitignore ├── documents ├── Ip Tracer.md ├── HTS analysis.md ├── Iban Parser.md ├── Linux Kurulumu.md ├── Windows Kurulumu.md └── FACE RECOGNITION.md ├── raw_ui_files ├── passwordGenerator.ui ├── MatplotShowScreen.ui ├── advancedSystemMonitor.ui ├── BinLookupScreen.ui ├── coomingSoonScreen.ui ├── StaticIPtracerScreen.ui ├── RsaToolkitScreen.ui ├── TcNumberValidationCheckerScreen.ui ├── ApiKeyConfigurationOnlyKeyScreen.ui ├── phoneNumberParserScreen.ui ├── AndroidAnlysisScreen.ui ├── RSAoperationsScreen.ui ├── ibanParserScreen.ui └── TcNumberCalculatorScreen.ui ├── SECURITY.md ├── sql └── postgresql_schema.sql ├── main.py └── README.md /guilib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hivelibrary/system_log.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /guilib/VirusTotalApiKeyConfiguration_controller.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hivelibrary/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "2.0.0" 2 | __author__ = "Prime Security" -------------------------------------------------------------------------------- /img/temsil2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/temsil2.png -------------------------------------------------------------------------------- /iconfiles/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/iconfiles/logo.png -------------------------------------------------------------------------------- /img/BinLookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/BinLookup.png -------------------------------------------------------------------------------- /img/video2frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/video2frame.png -------------------------------------------------------------------------------- /hivelibrary/install_insightface_model.py: -------------------------------------------------------------------------------- 1 | import insightface 2 | app = insightface.app.FaceAnalysis() 3 | -------------------------------------------------------------------------------- /img/FaceDetection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/FaceDetection.png -------------------------------------------------------------------------------- /img/HTS_format_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/HTS_format_1.png -------------------------------------------------------------------------------- /img/ibanParserGUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/ibanParserGUI.png -------------------------------------------------------------------------------- /img/installing_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/installing_1.png -------------------------------------------------------------------------------- /img/installing_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/installing_2.png -------------------------------------------------------------------------------- /img/personNoInDB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/personNoInDB.png -------------------------------------------------------------------------------- /img/welcomeScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/welcomeScreen.png -------------------------------------------------------------------------------- /img/FaceVerification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/FaceVerification.png -------------------------------------------------------------------------------- /img/personInDatabase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/personInDatabase.png -------------------------------------------------------------------------------- /img/soundConverter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/soundConverter.png -------------------------------------------------------------------------------- /img/AndroidAnalysis_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/AndroidAnalysis_1.png -------------------------------------------------------------------------------- /img/voiceVerification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/voiceVerification.png -------------------------------------------------------------------------------- /img/reverseIPlookup_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/reverseIPlookup_basic.png -------------------------------------------------------------------------------- /img/windows_installing_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/windows_installing_1.png -------------------------------------------------------------------------------- /img/windows_installing_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/windows_installing_2.png -------------------------------------------------------------------------------- /iconfiles/main_icon_files.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | logo.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /img/FaceVerificationFarkliKisiler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/img/FaceVerificationFarkliKisiler.png -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Thanks to everyone who contributed for their time ❤️ 2 | 3 | Contributors 4 | 5 | Ömer Şayak | https://github.com/omersayak 6 | -------------------------------------------------------------------------------- /hivelibrary/__pycache__/env.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/hivelibrary/__pycache__/env.cpython-311.pyc -------------------------------------------------------------------------------- /hivelibrary/__pycache__/__init__.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/hivelibrary/__pycache__/__init__.cpython-311.pyc -------------------------------------------------------------------------------- /hivelibrary/__pycache__/system_init.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/hivelibrary/__pycache__/system_init.cpython-311.pyc -------------------------------------------------------------------------------- /hivelibrary/__pycache__/console_tools.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/hivelibrary/__pycache__/console_tools.cpython-311.pyc -------------------------------------------------------------------------------- /hivelibrary/__pycache__/database_tools.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/hivelibrary/__pycache__/database_tools.cpython-311.pyc -------------------------------------------------------------------------------- /binary/windows/insightface-0.7.3-cp311-cp311-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/binary/windows/insightface-0.7.3-cp311-cp311-win_amd64.whl -------------------------------------------------------------------------------- /hivelibrary/__pycache__/database_structure.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MehmetYukselSekeroglu/TheHive/HEAD/hivelibrary/__pycache__/database_structure.cpython-311.pyc -------------------------------------------------------------------------------- /hivelibrary/VirusTotal/search.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | 4 | 5 | 6 | def searchVirusTotal(parametres:str) -> list: 7 | try: 8 | pass 9 | 10 | except Exception as err: 11 | pass -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyQt5 2 | pydub 3 | psutil 4 | colorama 5 | beautifulsoup4 6 | requests 7 | opencv-python 8 | onnxruntime 9 | onnxruntime-gpu 10 | insightface 11 | numpy 12 | shodan 13 | PyQtWebEngine 14 | folium 15 | psycopg2 16 | androguard -------------------------------------------------------------------------------- /hivelibrary/types.py: -------------------------------------------------------------------------------- 1 | import psycopg2 2 | import sqlite3 3 | 4 | t_PsqlCnn = psycopg2.extensions.connection 5 | t_PsqlCursor = psycopg2.extensions.cursor 6 | 7 | 8 | t_sqliteCnn = sqlite3.Connection 9 | t_sqliteCursor = sqlite3.Cursor 10 | 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | config/* 2 | __pycache__ 3 | hive_database.sqlite3 4 | testFile.py 5 | *.sqlite3 6 | *.db 7 | tmp* 8 | data* 9 | bin/* 10 | lib* 11 | pyvenv.cfg 12 | share* 13 | testFile* 14 | test* 15 | primeexternal* 16 | *.venv 17 | .venv/* 18 | .venv 19 | .venv* 20 | -------------------------------------------------------------------------------- /guilib/html_text_generator/html_draft.py: -------------------------------------------------------------------------------- 1 | from hivelibrary.console_tools import GetTime 2 | 3 | def gen_error_text(text:str) -> str: 4 | return f"[ {GetTime()} ] [ ERROR ]: {text}" 5 | 6 | 7 | def gen_info_text(text:str) -> str: 8 | return f"[ {GetTime()} ] [ INFO ]: {text}" -------------------------------------------------------------------------------- /hivelibrary/psqlConfig.py: -------------------------------------------------------------------------------- 1 | from hivelibrary.env import DATABASE_NAME 2 | # enter the postgresql database server connection info 3 | 4 | POSTGRESQL_CONFIG = { 5 | "host":"localhost", 6 | "port":"5432", 7 | "user":"postgres", 8 | "password":"", 9 | "database":DATABASE_NAME 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /documents/Ip Tracer.md: -------------------------------------------------------------------------------- 1 | # IP Tracer Modülü: 2 | 3 | 4 | IP Tracer modülü arka planda `ipinfo.io` api'sinden yararlanmaktadır. Basit bir şekilde IP adresini api üzerinden sorgular ve gelen çıktıyı okunur hale getirir ek olarak coğrafi bir fikir vermesi için verilen IP kordinatlarını haritada işaretler. 5 | 6 | 7 | -------------------------------------------------------------------------------- /guilib/main_icon_file.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/main_icon_files.qrc' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | -------------------------------------------------------------------------------- /hivelibrary/banner.py: -------------------------------------------------------------------------------- 1 | BANNER_TEXT:str = """ 2 | _____ _ _ _ _ ____ 3 | |_ _| |__ ___| | | (_)_ _____ __ _|___ \ 4 | | | | '_ \ / _ \ |_| | \ \ / / _ \ \ \ / / __) | 5 | | | | | | | __/ _ | |\ V / __/ \ V / / __/ 6 | |_| |_| |_|\___|_| |_|_| \_/ \___| \_/ |_____| 7 | 8 | """ 9 | 10 | 11 | def printBanner() -> None: 12 | print(BANNER_TEXT) -------------------------------------------------------------------------------- /guilib/external_thread_modules/HTS_AnalaysThread_1.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtCore import QObject, QThread, pyqtSignal 2 | 3 | 4 | 5 | 6 | class analaysThread(QThread): 7 | statusSignal = pyqtSignal(dict) 8 | 9 | 10 | def __init__(self, targetFilePath:str, targetFileFormat:str) -> None: 11 | super().__init__() 12 | 13 | 14 | 15 | def run(self): 16 | pass -------------------------------------------------------------------------------- /hivelibrary/ansii_variables.py: -------------------------------------------------------------------------------- 1 | from colorama import Fore 2 | 3 | 4 | # UYARI! 5 | # Bu alan daha sonra lisans sorunları yaşamamak için standart ASCII kodlarıan çevrilecektir 6 | # Unutulmaması Gereken Bir Alandır! 7 | 8 | 9 | C_ORANGE = "\033[38;5;208m" 10 | C_GREEN = Fore.GREEN 11 | C_BLUE = Fore.GREEN 12 | C_RESET = Fore.RESET 13 | C_YELLOW = Fore.YELLOW 14 | C_RED = Fore.RED 15 | 16 | T_BOLD = "\033[1m" 17 | T_BOLD_RESET = "\033[0m" -------------------------------------------------------------------------------- /hivelibrary/file_operations/file_information.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | def sizeMB(file_path:str) -> str: 5 | data_is = os.path.getsize(file_path) 6 | kb_size = data_is / 1024 7 | if kb_size < 1.0: 8 | return f"{round(data_is,2)} Bayt" 9 | 10 | mb_size = kb_size / 1024 11 | if mb_size < 1.0: 12 | return f"{round(kb_size,2)} KB" 13 | 14 | return f"{round(mb_size,2)} MB" 15 | 16 | 17 | -------------------------------------------------------------------------------- /raw_ui_files/passwordGenerator.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | PasswordGemerator 4 | 5 | 6 | 7 | 0 8 | 0 9 | 812 10 | 336 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /guilib/coomingSoom_controller.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtWidgets import * 2 | from guilib.coomingSoonScreen import Ui_CoomingSoonScreen 3 | 4 | 5 | 6 | class CoomingSoonPage(QWidget): 7 | def __init__(self, outputMessage:str): 8 | super().__init__() 9 | self.coomingPage = Ui_CoomingSoonScreen() 10 | self.coomingPage.setupUi(self) 11 | self.setWindowTitle("Coooming Soon") 12 | self.outputMessage = outputMessage 13 | self.coomingPage.textBrowser_infotmationPage.setHtml(outputMessage) -------------------------------------------------------------------------------- /documents/HTS analysis.md: -------------------------------------------------------------------------------- 1 | # HTS analysis 2 | 3 |

HTS kayıtlarının hızlı şekilde incelene bilmesi için TheHive'a eklenen bir modül. Kısıtlı örnek veri nedeniyle şuan desteklemekte olduğu formatlar sınırlıdır.aktif olarak desteklenmekte olan formatlar aşağıdaki gibidir. 4 | 5 | 6 | Şu anda geliştirme aşaması aktif olarak devam etmektedir ve kararlı çalışan sürüm aktif değildir, beklemede kalınız. 7 |

8 | 9 | 10 | 11 | # Desteklenen formatlar: 12 | 13 | 14 | ## Excel format 1: 15 | 16 |
17 | 18 | 19 | 20 |
-------------------------------------------------------------------------------- /hivelibrary/map_tools.py: -------------------------------------------------------------------------------- 1 | import io 2 | import folium 3 | 4 | 5 | 6 | def drawNewMap(cordinate_array_or_tuple, note_text:str=None,zoom_start:int=6) -> bytes: 7 | MemStorage = io.BytesIO() 8 | cordinate_array_or_tuple = tuple(cordinate_array_or_tuple) 9 | newMap = folium.Map(location=cordinate_array_or_tuple, zoom_start=zoom_start) 10 | 11 | if note_text is not None: 12 | folium.Marker(location=cordinate_array_or_tuple, popup=note_text).add_to(newMap) 13 | 14 | newMap.save(outfile=MemStorage,close_file=False) 15 | return MemStorage.getvalue().decode() 16 | -------------------------------------------------------------------------------- /raw_ui_files/MatplotShowScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MatplotShow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 908 10 | 507 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /hivelibrary/file_operations/generic_tools.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | def binaryData(file_path:str) -> bytes: 4 | with open(file_path, "rb") as target: 5 | return target.read() 6 | 7 | 8 | 9 | def cosineSimilarityCalculator(face_embedding_sourceFile, face_embedding_targetFile) -> int: 10 | dot_product_size = np.dot(face_embedding_sourceFile, face_embedding_targetFile) 11 | norm_sound1 = np.linalg.norm(face_embedding_sourceFile) 12 | norm_sound2 = np.linalg.norm(face_embedding_targetFile) 13 | # kosinus benzerliğini hesaplama 14 | GetSimilarity = dot_product_size / (norm_sound1 * norm_sound2) 15 | GetSimilarity = GetSimilarity * 100 16 | GetSimilarity = int(GetSimilarity) 17 | 18 | if GetSimilarity < 0: 19 | GetSimilarity = 0 20 | 21 | return GetSimilarity -------------------------------------------------------------------------------- /documents/Iban Parser.md: -------------------------------------------------------------------------------- 1 | # Iban Parser Özelliği Nedir Ne İşe Yarar? 2 | 3 | 4 | IBAN Para transferi için kullanılan küresel bir sistemdir bu nedenle bu sistem içerisinde belirlir tanımlayıcı unsurlar bulunmaktadır. Iban parser modülü de bu tanımlayıcı bilgileri Iban içerisinden çıkartarak insanların anlayabileceği bir formata getirmektedir. 5 | 6 | 7 | IBAN içerisinde gelen bazı bilgiler: 8 | 9 | - Ülke Kodu 10 | - Sepa Desteği 11 | - Hesap Kontrolü Desteği 12 | - Şube Kontrolü 13 | - Banka Kodu 14 | - Hesap Numarası 15 | - Şube Kodu 16 | - Müşteri Numarası 17 | - Hesap Ek Numrası 18 | 19 | 20 | Bu bilgilerden bazıları yetkili makamlar hariç bizim işimize yaramasada banka adı ,şube kodu, Müşteri numarası işimize yarar farklı ibanların aynı müşterinin mi olduğuna, şube kodu ile kişinin yaşadığı tahmini bölge tespit edilebilmektedir. Bu nedenle dolandırıcılık vs gibi olaylarda bu modülden yararlanmak zamandan kazandırır. -------------------------------------------------------------------------------- /hivelibrary/ImageTools/opencv_tools.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy 3 | 4 | 5 | 6 | def landmarks_rectangle(cv2_image:numpy.ndarray, data_list:list) -> numpy.ndarray: 7 | left, top, right, bottom = map(int, data_list) 8 | cv2.rectangle(cv2_image, (left, top), (right, bottom), (0, 255, 0), 3) 9 | return cv2_image 10 | 11 | 12 | def landmarks_rectangle_2d(cv2_image:numpy.ndarray, data_list:list) -> numpy.ndarray: 13 | for landmark_point in data_list: 14 | x,y = map(int, landmark_point) 15 | cv2.circle(cv2_image, (x,y),1, (0,255,0), -1) 16 | 17 | return cv2_image 18 | 19 | 20 | 21 | def draw_face_name(cv2_image:numpy.ndarray, face_name:str, data_list:list) -> numpy.ndarray: 22 | left, top, right, bottom = map(int, data_list) 23 | cv2.putText(cv2_image,face_name,(left, top - 15), 24 | cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 1) 25 | 26 | pass -------------------------------------------------------------------------------- /hivelibrary/identify/voice_comparsion.py: -------------------------------------------------------------------------------- 1 | import os 2 | import numpy as np 3 | from resemblyzer import preprocess_wav, VoiceEncoder 4 | 5 | 6 | def CompareSounds(sound_1_path:str, sound_2_path:str) -> dict: 7 | if not os.path.exists(sound_1_path) or not os.path.exists(sound_2_path): 8 | return { "success":False, "code":"file not found" } 9 | 10 | sound_encoder = VoiceEncoder(verbose=False) 11 | file_1 = preprocess_wav(sound_1_path) 12 | file_2 = preprocess_wav(sound_2_path) 13 | 14 | encoded_sound1 = sound_encoder.embed_utterance(file_1) 15 | encoded_sound2 = sound_encoder.embed_utterance(file_2) 16 | 17 | dot_product_size = np.dot(encoded_sound1, encoded_sound2) 18 | norm_sound1 = np.linalg.norm(encoded_sound1) 19 | norm_sound2 = np.linalg.norm(encoded_sound2) 20 | 21 | # kosinus benzerliğini hesaplama 22 | GetSimilarity = dot_product_size / (norm_sound1 * norm_sound2) 23 | GetSimilarity = GetSimilarity * 100 24 | GetSimilarity = int(GetSimilarity) 25 | return { "success":True ,"similarity":str(GetSimilarity) } -------------------------------------------------------------------------------- /hivelibrary/load_config.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from .env import CONFIG_FILE_PATH as __CONFIG_FILE_PATH__ 4 | from .consolePrint import (p_info,p_error,p_warn) 5 | 6 | __MODULE_LOG_NAME__ ="LOAD_CONFIG" 7 | 8 | 9 | def load_config_from_file(config_file:str=__CONFIG_FILE_PATH__) -> list[bool,dict]: 10 | try: 11 | if config_file != __CONFIG_FILE_PATH__: 12 | p_warn(f"Loading External Config File: {config_file}",__MODULE_LOG_NAME__) 13 | 14 | with open(config_file, "r") as confFile: 15 | _loaded_config = json.loads(confFile.read()) 16 | 17 | p_info(f"Successfuly load config file: {config_file}",__MODULE_LOG_NAME__) 18 | return [True, _loaded_config] 19 | 20 | 21 | except Exception as err: 22 | _err_msg = f"Failed To Load Config File: {config_file}, {err}" 23 | p_error(_err_msg, __MODULE_LOG_NAME__) 24 | return [False, _err_msg] 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | We currently do not have an official distributable binary package, and are actively working on version 2.x.x on the git repository. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | If you have identified a vulnerability, please report it to contact.primesec@gmail.com. When sending the email, include the following information, and ensure that you are using the latest updated version. 10 | 11 | Information to be included in the email: 12 | 13 | - **Date Detected:** 14 | - **Type of Vulnerability or Vulnerability:** 15 | - **Operating System You Are Using:** 16 | - **Library, Code, or File Containing the Vulnerability:** 17 | 18 | Emailed reports are reviewed promptly, and if the reported situation is confirmed, work on the patch process begins as soon as possible. 19 | 20 | ## Security Reviews and Audits 21 | 22 | We conduct regular security reviews and audits to promptly address vulnerabilities detected within our system. 23 | 24 | --- 25 | 26 | **Note to Supporters:** 27 | 28 | Thank you for being a valued supporter of our project. Your efforts help make our project more secure for everyone. 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /raw_ui_files/advancedSystemMonitor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | AdvancedSystemMonitor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 928 10 | 487 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 30 20 | 10 21 | 891 22 | 291 23 | 24 | 25 | 26 | font: 12pt "Hack"; 27 | 28 | 29 | General 30 | 31 | 32 | 33 | 34 | 10 35 | 30 36 | 871 37 | 251 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /hivelibrary/os_information.py: -------------------------------------------------------------------------------- 1 | import psutil, platform, socket, os 2 | 3 | 4 | 5 | def get_hostname() -> object: 6 | try: 7 | return socket.gethostname() 8 | except Exception: 9 | return "Failed To Detect" 10 | 11 | 12 | def total_cpu_count() -> object: 13 | return os.cpu_count() 14 | 15 | 16 | def get_active_user() -> object: 17 | return os.getlogin() 18 | 19 | 20 | def patlform_info() -> object: 21 | return platform.platform() 22 | 23 | 24 | 25 | # cpu and other source usaga statics 26 | def get_cpu_usage() -> object: 27 | cpu_percent = psutil.cpu_percent(interval=1) 28 | return cpu_percent 29 | 30 | 31 | def get_battery_percentage() -> str: 32 | battery = psutil.sensors_battery() 33 | percentage = "%"+str(round(battery.percent,1)) if battery else "Bilinmiyor" 34 | return percentage 35 | 36 | 37 | def get_memory_usage() -> dict: 38 | memory = psutil.virtual_memory() 39 | total = memory.total / (1024 ** 3) # GB 40 | used = memory.used / (1024 ** 3) # GB 41 | percentage = memory.percent 42 | return { "total":round(total, 1),"used": round(used,1),"yüzde": percentage} 43 | 44 | 45 | def max_thread_calculator() -> int: 46 | total_cpı = total_cpu_count() 47 | maxThread = total_cpı 48 | return maxThread -------------------------------------------------------------------------------- /guilib/MatplotShowScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/MatplotShowScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_MatplotShow(object): 15 | def setupUi(self, MatplotShow): 16 | MatplotShow.setObjectName("MatplotShow") 17 | MatplotShow.resize(908, 507) 18 | self.gridLayout = QtWidgets.QGridLayout(MatplotShow) 19 | self.gridLayout.setObjectName("gridLayout") 20 | self.plt_shower_widget = QtWidgets.QWidget(MatplotShow) 21 | self.plt_shower_widget.setObjectName("plt_shower_widget") 22 | self.gridLayout.addWidget(self.plt_shower_widget, 0, 0, 1, 1) 23 | 24 | self.retranslateUi(MatplotShow) 25 | QtCore.QMetaObject.connectSlotsByName(MatplotShow) 26 | 27 | def retranslateUi(self, MatplotShow): 28 | _translate = QtCore.QCoreApplication.translate 29 | MatplotShow.setWindowTitle(_translate("MatplotShow", "Form")) 30 | 31 | 32 | if __name__ == "__main__": 33 | import sys 34 | app = QtWidgets.QApplication(sys.argv) 35 | MatplotShow = QtWidgets.QWidget() 36 | ui = Ui_MatplotShow() 37 | ui.setupUi(MatplotShow) 38 | MatplotShow.show() 39 | sys.exit(app.exec_()) 40 | -------------------------------------------------------------------------------- /guilib/TcNumberValidationChecker_controller.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtWidgets import * 2 | from guilib.TcNumberValidationCheckerScreen import Ui_TcValidatorScreen 3 | from hivelibrary.identify.tc_number_tools import gecerlilik_kontrol 4 | 5 | 6 | 7 | 8 | 9 | 10 | class TcValidatorCheckerWidget(QWidget): 11 | def __init__(self): 12 | super().__init__() 13 | 14 | # set window 15 | self.TcValidator = Ui_TcValidatorScreen() 16 | self.TcValidator.setupUi(self) 17 | self.setWindowTitle("Tc Validity Checker") 18 | 19 | # slot connections 20 | self.TcValidator.pushButton_runValidationChecker.clicked.connect(self.__runValidtorChecker) 21 | 22 | 23 | def __runValidtorChecker(self): 24 | self.__clearLogConsole() 25 | getInput = self.TcValidator.lineEdit_tcInput.text() 26 | tcStatus = gecerlilik_kontrol(getInput) 27 | 28 | if len(getInput) != 11: 29 | return self.TcValidator.textBrowser_logConsole.append("HATA: Lütfen 11 haneli hedef tc numarası giriniz.") 30 | 31 | if not getInput.isnumeric(): 32 | return self.TcValidator.textBrowser_logConsole.append("HATA: Tc numarası sadece rakamlardan oluşmalıdır.") 33 | 34 | self.TcValidator.textBrowser_logConsole.append(tcStatus["data"]) 35 | 36 | def __clearLogConsole(self): 37 | self.TcValidator.textBrowser_logConsole.setHtml("LOG AND RESULTS:
") -------------------------------------------------------------------------------- /hivelibrary/file_operations/video_tools.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import os 3 | 4 | 5 | SUPPORTED_VIDEO_FORMATS = ["avi","mp4","mkv","mov","flv","wmv","webm","mpeg","mpg"] 6 | 7 | 8 | def preparedVideoForCV2(video_path:str) -> dict: 9 | if not os.path.exists(video_path) or os.path.isdir(video_path): 10 | return { "success":False, "data":"invalid file path" } 11 | try: 12 | TargetVideo = cv2.VideoCapture(video_path) 13 | except Exception as err: 14 | return {"success":False, "data":err } 15 | 16 | return {"success":True, "data":TargetVideo} 17 | 18 | 19 | def releaseVideoForCV2(preparedVideo:cv2.VideoCapture) -> dict: 20 | preparedVideo.release() 21 | 22 | def getFrameCountOnVideo(preparedVideo:cv2.VideoCapture, counter:int) -> dict: 23 | while(True): 24 | is_succes, now_frame = preparedVideo.read() 25 | if is_succes: 26 | cv2.imwrite(f"tmp{os.sep}cv2output{os.sep}frame_{FrameNumber}.jpg", now_frame) 27 | else: 28 | break 29 | 30 | FrameNumber = FrameNumber + 1 31 | print("\n[+] Finished...") 32 | preparedVideo.release() 33 | 34 | 35 | 36 | def frame_sharpening(frame) -> object: 37 | converGray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) 38 | konstrat_arttir = cv2.adaptiveThreshold(converGray,255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 11,2) 39 | clear_noise = cv2.bilateralFilter(frame,9,75,75) 40 | finaly_image = cv2.addWeighted(clear_noise, 1.5,konstrat_arttir,-0.5,0) 41 | return finaly_image -------------------------------------------------------------------------------- /hivelibrary/env.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | # new types 5 | CONFIG_FILE_NAME = "config.json" 6 | APPLICATION_BASE_DIR = os.getcwd().split(os.path.sep)[-1] 7 | CONFIG_FILE_PATH = "config" + os.path.sep + "config.json" 8 | DEFAULT_CHARSET = "utf-8" 9 | 10 | 11 | 12 | 13 | # table structure 14 | DB_SYSTEM_TABLE = "system_core" 15 | DB_BLOB_STORAGE = "blob_storage" 16 | DB_LOCAL_AUTHENTICATE_TABLE = "authentication" 17 | DB_FACE_RECOGNITION_TABLE = "face_recognition_standart" 18 | 19 | # Data storage types 20 | DB_DATA_TYPE__SYSTEM = "system" 21 | DB_DATA_TYPE__USER = "user" 22 | 23 | 24 | # Application value 25 | APPLICATION_VENDOR_VALUE = "Prime Security" 26 | APPLICATION_NAME_VALUE = "The Hive Remastred" 27 | APPLICATION_VERSION_VALUE = "2.0.0" 28 | 29 | DATABASE_INIT_STATUS = "database_status" 30 | 31 | # Application database keys 32 | APPLICATION_VENDOR_KEY = "application_vendor" 33 | APPLICATION_NAME_KEY = "application_name" 34 | APPLICATION_VERSION_KEY = "application_version" 35 | SHODAN_API_KEY = "shodan_api_key" 36 | VIRUSTOTAL_API_KEY = "virustotal_api_key" 37 | 38 | DATABASE_NAME = "thehive" 39 | 40 | 41 | DATABASE_FILE_NAME = "hive_database.sqlite3" 42 | DATABASE_PATH = DATABASE_FILE_NAME 43 | 44 | # Default charset 45 | DEFAULT_CHARSET = "utf-8" 46 | 47 | 48 | # default log file 49 | DEFAULT_LOG_FILE_NAME = "hive_logs.txt" 50 | 51 | 52 | # default app root dir 53 | DEFAULT_ROOT_DIR_NAME = "data" 54 | DEFAULT_TEMP_DIR ="tmp" 55 | 56 | 57 | # DEFAULT LOGO PATH 58 | DEFAULT_LOGO_PATH = f"iconfiles{os.path.sep}logo.png" -------------------------------------------------------------------------------- /hivelibrary/console_tools.py: -------------------------------------------------------------------------------- 1 | from colorama import * 2 | import time 3 | 4 | 5 | 6 | # COLOR CODES 7 | kalın ="\033[1m" 8 | kalın_reset ="\033[0m" 9 | green = Fore.GREEN 10 | blue = Fore.BLUE 11 | color_reset = Fore.RESET 12 | red = Fore.RED 13 | orange = "\033[38;5;208m" 14 | 15 | 16 | def GetTime(): 17 | """ 18 | herhangi parametre almadan sisteme ait güncel zamanı 19 | saat:dakika:saniye olarak döndürür 20 | 21 | Returns: 22 | str: saat:dakika:saniye 23 | """ 24 | current_time = time.localtime() 25 | hour = current_time.tm_hour 26 | minute = current_time.tm_min 27 | second = current_time.tm_sec 28 | day_is = current_time.tm_mday 29 | mount_is = current_time.tm_mon 30 | year_is = current_time.tm_year 31 | zone_is = current_time.tm_zone 32 | formatted_time = f"{day_is}/{mount_is}/{year_is} {hour:02d}:{minute:02d}:{second:02d}" 33 | return formatted_time 34 | 35 | # BILGILENDIRMELER ICIN 36 | def InformationPrinter(mesages:str): 37 | print(f"{green}[{GetTime()}]{kalın} [ info ]: {kalın_reset}{mesages}") 38 | 39 | # HATA MESAJLARI ICIN 40 | def ErrorPrinter(mesages:str): 41 | print(f"{red}[{GetTime()}]{kalın} [ error ]: {kalın_reset}{mesages}") 42 | 43 | # Uyarıları için 44 | def WarnPrinter(mesages:str): 45 | print(f"{orange}[{GetTime()}]{kalın} [ warning ]: {kalın_reset}{mesages}") 46 | 47 | #Log mesajları için 48 | def LogPrinter(mesages:str): 49 | print(f"{blue}[{GetTime()}] [ log ]: {mesages}") 50 | 51 | def TitlePrinter(your_title:str): 52 | print(f"{kalın}{blue}>> {your_title}{color_reset}{kalın_reset}") -------------------------------------------------------------------------------- /guilib/ShodanApiKeyConfiguration_controller.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtWidgets import * 2 | from guilib.ShodanApiKeyConfigurationScreen import Ui_ApiKeyConfScreen 3 | from hivelibrary.database_tools import check_exists_systemTable 4 | from hivelibrary.env import SHODAN_API_KEY 5 | import os 6 | import shodan 7 | import shodan.exception 8 | 9 | class shodanApiKeyConfigurationScreen(QWidget): 10 | def __init__(self, db_cnn, db_cursor): 11 | super().__init__() 12 | 13 | 14 | self.DB_CONNECTIONS = db_cnn 15 | self.DB_CUROSR = db_cursor 16 | 17 | self.apiKeyConfScreen = Ui_ApiKeyConfScreen() 18 | self.apiKeyConfScreen.setupUi(self) 19 | 20 | if check_exists_systemTable(db_curosr=self.DB_CUROSR,sql_key=SHODAN_API_KEY)[0]: 21 | self.alredyConfigurated() 22 | 23 | self.setWindowTitle("Enter Shodan Api Key And Configure") 24 | 25 | self.apiKeyConfScreen.pushButton_exitScreen.clicked.connect(self.exitThisScreen) 26 | self.apiKeyConfScreen.pushButton_startConfiguration.clicked.connect(self.configureApi) 27 | 28 | def alredyConfigurated(self): 29 | pass 30 | 31 | def exitThisScreen(self): 32 | self.hide() 33 | 34 | def configureApi(self): 35 | pass 36 | 37 | def testApiKey(self, api_key) -> list[bool ,str]: 38 | try: 39 | SHODAN_API = shodan.Shodan(key=api_key) 40 | data = SHODAN_API.host("1.1.1.1") 41 | return [ True, "Api Key Allowed"] 42 | 43 | except shodan.exception.APIError: 44 | return [ False, "Invalid Api Key" ] -------------------------------------------------------------------------------- /hivelibrary/consolePrint.py: -------------------------------------------------------------------------------- 1 | import time 2 | import sys 3 | from .ansii_variables import (C_ORANGE, C_BLUE, C_GREEN, C_RESET, C_RED, T_BOLD, T_BOLD_RESET) 4 | 5 | 6 | def _GetTime(): 7 | """ 8 | herhangi parametre almadan sisteme ait güncel zamanı 9 | str: day/mount/year hour:min:sec olarak döndürür 10 | 11 | Returns: 12 | str: day/mount/year hour:min:sec 13 | """ 14 | current_time = time.localtime() 15 | hour = current_time.tm_hour 16 | minute = current_time.tm_min 17 | second = current_time.tm_sec 18 | day_is = current_time.tm_mday 19 | mount_is = current_time.tm_mon 20 | year_is = current_time.tm_year 21 | 22 | formatted_time = f"{day_is}/{mount_is}/{year_is} {hour:02d}:{minute:02d}:{second:02d}" 23 | return formatted_time 24 | 25 | 26 | 27 | 28 | 29 | # BILGILENDIRMELER ICIN 30 | def p_info(mesages:str, locations:str=None): 31 | sys.stdout.write(f"{C_GREEN}[{_GetTime()}]{T_BOLD} [INFO]: {T_BOLD_RESET}{mesages}\n") 32 | sys.stdout.flush() 33 | 34 | # HATA MESAJLARI ICIN 35 | def p_error(mesages:str,locations:str=None): 36 | sys.stderr.write(f"{C_RED}[{_GetTime()}]{T_BOLD} [ERR]: {T_BOLD_RESET}{mesages}\n") 37 | sys.stdout.flush() 38 | 39 | # Uyarıları için 40 | def p_warn(mesages:str,locations:str=None): 41 | print(f"{C_ORANGE}[{_GetTime()}]{T_BOLD} [WARN]: {T_BOLD_RESET}{mesages}") 42 | 43 | #Log mesajları için 44 | def p_log(mesages:str,locations:str=None): 45 | print(f"{C_BLUE}[{_GetTime()}] [LOG]: {mesages}") 46 | 47 | def p_title(your_title:str,locations:str=None): 48 | 49 | print(f"{T_BOLD}{C_BLUE}>> {your_title}{C_RESET}{T_BOLD_RESET}") -------------------------------------------------------------------------------- /hivelibrary/AndroidTools/androguard_tools.py: -------------------------------------------------------------------------------- 1 | from androguard.core.apk import * 2 | from androguard.util import set_log 3 | 4 | 5 | def get_information_standard(apk_path:str) -> list: 6 | try: 7 | set_log("CRITICAL") 8 | targetApk = APK(apk_path) 9 | 10 | apk_appname = targetApk.get_app_name() 11 | apk_packageName = targetApk.get_package() 12 | apk_targetSdk = targetApk.get_target_sdk_version() 13 | apk_minSdk = targetApk.get_min_sdk_version() 14 | apk_maxSdk = targetApk.get_max_sdk_version() 15 | apk_internalVersion = targetApk.get_androidversion_code() 16 | apk_displayedVersion = targetApk.get_androidversion_name() 17 | apk_permissions = targetApk.get_permissions() 18 | apk_services = targetApk.get_services() 19 | apk_v1_issigned = targetApk.is_signed_v1() 20 | apk_v2_issigned = targetApk.is_signed_v2() 21 | apk_v3_issigned = targetApk.is_signed_v3() 22 | included_files = targetApk.get_files() 23 | included_librarys = targetApk.get_libraries() 24 | 25 | return [True, [apk_appname, apk_packageName, apk_targetSdk, apk_minSdk, apk_maxSdk, apk_internalVersion, 26 | apk_displayedVersion, apk_permissions, apk_services, apk_v1_issigned, apk_v2_issigned, apk_v3_issigned, 27 | included_librarys, included_files]] 28 | 29 | except Exception as err: 30 | return [False, err] 31 | 32 | 33 | 34 | if __name__ == "__main__": 35 | import sys 36 | 37 | apkfile = sys.argv[1] 38 | data = get_information_standard(apk_path=apkfile) 39 | 40 | for a in data: 41 | print(a) 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /documents/Linux Kurulumu.md: -------------------------------------------------------------------------------- 1 | 2 | Öncelikle Repomuzu GitHub dan çekerek içerisinde girelim sonra diğer adımlara geçebiliriz. 3 | 4 | ```shell 5 | git clone https://github.com/MehmetYukselSekeroglu/TheHive.git 6 | cd TheHive 7 | ``` 8 | 9 | 10 | ## 1) Config Dosyasını Oluşturma 11 | 12 | İlk olarak `config/config.json` yapılandırma dosyamızı oluşturmamız gerekiyor. Bunun için proje klasörü içinde şu komutu çalıştırın. 13 | 14 | ```shell 15 | python3 -m hivelibrary.make_config_schema 16 | ``` 17 | 18 | 19 | Eğer aşşağıdaki gibi bir sonuç aldıysanız başarıyla oluşturulmuştur. 20 | 21 | 22 | 23 | 24 | ## 2) Config Dosyasına Ayarlarımızı Girelim 25 | 26 | NOT: Eğer özel bir PostgreSQL parolası istemiyorsanız bu alanı atlayın. 27 | 28 | Herhangi bir metin editörü ile `config/config.json` dosyamızı açalım. Bu dosyada sadece database config içinde `password` kısmına istediğiniz veritabanı parolasını yazmanız yeterli isterseni olduğu gibi de bırakabilirsiniz. 29 | 30 | Config Dosyasının içeriği aşşağıdaki gibi otomatik oluşturulmuş olacaktır. Gerekli kısma parola yazıp kaydedip çıkabilirsiniz. 31 | 32 | 33 | 34 | 35 | 36 | ## 3) Kurulumun başlatılması 37 | 38 | Otomatik kurulum işletimini başlatmadan önce kullandığınız linux dağıtımı için `libpq-dev` , `python3` , `python3-dev` , `python3-pip` , `docker`'i kurmanız gerekli. 39 | 40 | 41 | 42 | Eğer paketleri kurduysanız otomatik kurulumu başlatabilirsiniz. Aşşağıdaki gibi. 43 | 44 | NOT: Otomatik indirme sistemi `sudo` veya direk olarak `root` ile çalışmaz gerekli olduğu zaman sizden parola ister. 45 | 46 | ```shell 47 | bash linux.sh --wizard 48 | ``` 49 | 50 | 51 | Kurulum tamamlandığı zaman otomatik olarak TheHive açılacaktır. 52 | 53 | 54 | 55 | 56 | ## 4) Kurulum sonrası elle başlatma 57 | 58 | 59 | ```shell 60 | bash linux.sh --start-hive 61 | ``` 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
-------------------------------------------------------------------------------- /sql/postgresql_schema.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS "system_core" ( 2 | id SERIAL PRIMARY KEY, 3 | unique_key VARCHAR(100) NOT NULL UNIQUE, 4 | value VARCHAR(100) NOT NULL 5 | ); 6 | CREATE TABLE IF NOT EXISTS "blob_storage" ( 7 | id SERIAL PRIMARY KEY, 8 | unique_blob_key TEXT NOT NULL UNIQUE, 9 | key_value BYTEA NOT NULL, 10 | data_type TEXT NOT NULL DEFAULT 'user', 11 | information_notes TEXT DEFAULT NULL 12 | ); 13 | CREATE TABLE IF NOT EXISTS "authentication" ( 14 | id SERIAL PRIMARY KEY, 15 | username VARCHAR(128) NOT NULL UNIQUE, 16 | password VARCHAR(128) NOT NULL 17 | ); 18 | CREATE TABLE IF NOT EXISTS "face_recognition_standart" ( 19 | id SERIAL PRIMARY KEY, 20 | face_picture_blob BYTEA NOT NULL, 21 | picture_sha1_hash TEXT NOT NULL UNIQUE, 22 | face_embedding_data BYTEA NOT NULL, 23 | landmarks_2d BYTEA NOT NULL, 24 | face_box BYTEA NOT NULL, 25 | face_name TEXT NOT NULL, 26 | add_date TIMESTAMP DEFAULT NOW() 27 | ======= 28 | "id" SERIAL PRIMARY KEY, 29 | "unique_key" VARCHAR(100) NOT NULL UNIQUE, 30 | "value" VARCHAR(100) NOT NULL 31 | ); 32 | CREATE TABLE IF NOT EXISTS "blob_storage" ( 33 | "id" SERIAL PRIMARY KEY, 34 | "unique_blob_key" TEXT NOT NULL UNIQUE, 35 | "key_value" BYTEA NOT NULL, 36 | "data_type" TEXT NOT NULL DEFAULT 'user', 37 | "information_notes" TEXT DEFAULT NULL 38 | ); 39 | CREATE TABLE IF NOT EXISTS "authentication" ( 40 | "id" SERIAL PRIMARY KEY, 41 | "username" VARCHAR(128) NOT NULL UNIQUE, 42 | "password" VARCHAR(128) NOT NULL 43 | ); 44 | CREATE TABLE IF NOT EXISTS "face_recognition_standart" ( 45 | "id" SERIAL PRIMARY KEY, 46 | "face_picture_blob" BYTEA NOT NULL, 47 | "picture_sha1_hash" TEXT NOT NULL UNIQUE, 48 | "face_embedding_data" BYTEA NOT NULL, 49 | "landmarks_2d" BYTEA NOT NULL, 50 | "face_box" BYTEA NOT NULL, 51 | "face_name" TEXT NOT NULL, 52 | "add_date" TIMESTAMP DEFAULT NOW() 53 | ); 54 | -------------------------------------------------------------------------------- /hivelibrary/make_config_schema.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # 5 | # config.json generator for TheHive Remastred 6 | # 7 | 8 | # external library import's 9 | import json 10 | import sys 11 | import os 12 | 13 | 14 | 15 | 16 | # local library import's 17 | from .env import CONFIG_FILE_PATH as __CONFIG_FILE_PATH__ 18 | 19 | 20 | 21 | # private varables 22 | __BASE_DIR__ = os.getcwd() + os.path.sep 23 | __TEMP_DIR__ = __BASE_DIR__ + "tmp" + os.path.sep 24 | __DATA_DIR__ = __BASE_DIR__ + "data" + os.path.sep 25 | __SQL_SCHMEA_PATH__ = __BASE_DIR__ + "sql" + os.path.sep + "postgresql_schema.sql" 26 | 27 | 28 | # for json 29 | __CONFIG_FILE_DATA__ = { 30 | 31 | "vendor":"Prime Security", 32 | "name":"TheHive", 33 | "version":"0.0.0+1", 34 | "base_dir":__BASE_DIR__, 35 | "temp_dir":__TEMP_DIR__, 36 | "data_dir":__DATA_DIR__, 37 | "database_schema":__SQL_SCHMEA_PATH__, 38 | 39 | "database_config":{ 40 | "database":"thehive", 41 | "user":"postgres", 42 | "password":"your_secret_password", 43 | "host":"127.0.0.1", 44 | "port":"5432", 45 | }, 46 | "insightface":{ 47 | "ctx_id":-1, 48 | "det_thresh":0.5, 49 | "det_size":(640,640) 50 | } 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | } 59 | 60 | 61 | # if executed the module run config generator 62 | if __name__ == "__main__": 63 | os.makedirs(str(__CONFIG_FILE_PATH__.split(os.path.sep)[-2]), exist_ok=True) 64 | 65 | try: 66 | with open(__CONFIG_FILE_PATH__,"w+") as conf_file: 67 | json.dump(__CONFIG_FILE_DATA__,conf_file,indent=4) 68 | 69 | except Exception as err: 70 | print(f"Failed to crate {__CONFIG_FILE_PATH__}, {err}") 71 | sys.exit(-1) 72 | 73 | print(f"{__CONFIG_FILE_PATH__} successfuly generated.") 74 | sys.exit(0) 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /hivelibrary/hash_tools.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | from hivelibrary.env import DEFAULT_CHARSET 3 | 4 | 5 | def string_to_hash(hash_strings="NULL", hash_algorithm="sha512") -> dict: 6 | if hash_strings == "NULL" or hash_strings == "": 7 | return {"success" : "false","message" : "HASH STRING IS NULL!"} 8 | 9 | if hash_algorithm == "sha1": 10 | hasher = hashlib.sha1() 11 | elif hash_algorithm == "sha256": 12 | hasher = hashlib.sha256() 13 | elif hash_algorithm == "sha512": 14 | hasher = hashlib.sha512() 15 | elif hash_algorithm == "md5": 16 | hasher = hashlib.md5() 17 | elif hash_algorithm == "sha224": 18 | hasher = hashlib.sha224() 19 | else: 20 | return {"success" : "false","message" : "NOT SUPPORTED HASH ALGORITHM!"} 21 | 22 | hasher.update(hash_strings.encode("utf-8")) 23 | hashed_data = str(hasher.hexdigest()) 24 | return {"success" : "true","data" : hashed_data} 25 | 26 | 27 | 28 | def sha512hasher(text:str) -> str: 29 | hasher = hashlib.sha512() 30 | hasher.update(text.encode(DEFAULT_CHARSET)) 31 | return str(hasher.hexdigest()) 32 | 33 | 34 | def loginCreditHhasher(text:str) -> str: 35 | text = sha512hasher(text=text) 36 | text = sha512hasher(text=text) 37 | return text 38 | 39 | 40 | def file_hash_sha1(file_path:str) -> str: 41 | sha_1_hasher = hashlib.sha1() 42 | with open(file_path,"rb") as targetFile: 43 | sha_1_hasher.update(targetFile.read()) 44 | return sha_1_hasher.hexdigest() 45 | 46 | 47 | def all_hash(file_path:str) -> dict: 48 | with open(file_path, "rb") as targetFile: 49 | raw_data = targetFile.read() 50 | 51 | return { 52 | "sha1": hashlib.sha1(raw_data).hexdigest(), 53 | "sha256":hashlib.sha256(raw_data).hexdigest(), 54 | "md5":hashlib.md5(raw_data).hexdigest() 55 | } 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /raw_ui_files/BinLookupScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | BIN_LOOKUP_WIDGET 4 | 5 | 6 | 7 | 0 8 | 0 9 | 795 10 | 476 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | start 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 351 29 | 16777215 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | 301 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | clear 48 | 49 | 50 | 51 | 52 | 53 | 54 | Target BIN: 55 | 56 | 57 | 58 | 59 | 60 | 61 | <html><head/><body><p align="center">BIN Lookup</p></body></html> 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /documents/Windows Kurulumu.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Windows için kuruluma başlamadan önce `docker`, `git` ve `python3`paketlerini sisteme kurmamız gerekli. 7 | 8 | 9 | Docker'i indirmek için tıklayın 10 | Python3'ü indirmek için tıklayın 11 | Git'i indirmek için tıklayın 12 | 13 | 14 | Öncelikle Repomuzu GitHub dan çekerek içerisinde girelim sonra diğer adımlara geçebiliriz. 15 | 16 | ```shell 17 | git clone https://github.com/MehmetYukselSekeroglu/TheHive.git 18 | cd TheHive 19 | ``` 20 | 21 | 22 | ## 1) Config Dosyasını Oluşturma 23 | 24 | İlk olarak `config/config.json` yapılandırma dosyamızı oluşturmamız gerekiyor. Bunun için proje klasörü içinde şu komutu çalıştırın. 25 | 26 | ```shell 27 | python3 -m hivelibrary.make_config_schema 28 | ``` 29 | 30 | Çıktısı aşşağıdaki gibi olmalıdır: 31 | 32 | 33 | 34 | 35 | 36 | ## 2) Config Dosyasına Ayarlarımızı Girelim 37 | 38 | NOT: Eğer özel bir PostgreSQL parolası istemiyorsanız bu alanı atlayın. 39 | 40 | Herhangi bir metin editörü ile `config/config.json` dosyamızı açalım. Bu dosyada sadece database config içinde `password` kısmına istediğiniz veritabanı parolasını yazmanız yeterli isterseni olduğu gibi de bırakabilirsiniz. 41 | 42 | Config Dosyasının içeriği aşşağıdaki gibi otomatik oluşturulmuş olacaktır. Gerekli kısma parola yazıp kaydedip çıkabilirsiniz. 43 | 44 | 45 | 46 | 47 | ## 3) Kuruluma başlayalım 48 | 49 | TheHive indirme işlemi için otomatik bir kurulum dosyası sağlar. Aşşağıdaki komutu proje klasörü içinde çalıştırırsanız otomatik kurulum başlayacaktır. 50 | 51 | ### NOT: Docker'in açık olması gerekli! 52 | 53 | ```shell 54 | python windows.py --wizard 55 | ``` 56 | 57 | Kurulum tamamlandığı zaman TheHive otomatik olaraç açılacaktır. 58 | 59 | 60 | 61 | ## 4) Kurulum sonrası elle başlatma 62 | 63 | İster `main.py` dosyasını çalıştırın isterseniz aşşağıdaki gibi açabilirsiniz. 64 | 65 | ```shell 66 | python windows.py --start-hive 67 | ``` 68 | 69 | 70 | 71 | # Windows Arayüzünden Örnek Bir Görüntü: 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /guilib/BinLookup_controller.py: -------------------------------------------------------------------------------- 1 | from guilib.BinLookupScreen import Ui_BIN_LOOKUP_WIDGET 2 | from PyQt5.QtWidgets import * 3 | from guilib.html_text_generator.html_draft import gen_error_text,gen_info_text 4 | from hivelibrary.bin_lookup import lookup_bin 5 | 6 | 7 | 8 | class BinLookupWidget(QWidget): 9 | def __init__(self): 10 | super().__init__() 11 | 12 | # temel sistem kuruldu 13 | self.BinLookup = Ui_BIN_LOOKUP_WIDGET() 14 | self.BinLookup.setupUi(self) 15 | self.setWindowTitle(f"Bin Lookup") 16 | 17 | # buton sinyalleri slotlara bağlandı 18 | self.BinLookup.pushButton_start.clicked.connect(self.startLookup) 19 | self.BinLookup.pushButton_clear.clicked.connect(self.clearResults) 20 | 21 | # ön tanımlı değerler atandı 22 | self.BinLookup.textBrowser_logConsole.setText("LOG CONSOLE:") 23 | 24 | def startLookup(self): 25 | # Girilen bin alındı 26 | targetBin = self.BinLookup.lineEdit_bin_input.text() 27 | 28 | # Girdinin doğruluğu kontrol edildi 29 | if len(targetBin) < 6 or not targetBin[:6].isnumeric(): 30 | self.BinLookup.textBrowser_logConsole.append(gen_error_text("❌ Invalid BIN, example: 123123")) 31 | return 32 | 33 | # kullanıcı feedback 34 | self.BinLookup.textBrowser_logConsole.append(gen_info_text("Sending api")) 35 | 36 | # sistem apisine verinin gönderilmesi 37 | lookup_data = lookup_bin(target_bin=targetBin) 38 | 39 | # işlem başarısının kontrolü 40 | if lookup_data[0] == False: 41 | self.BinLookup.textBrowser_logConsole.append(gen_error_text(lookup_data[1])) 42 | return 43 | 44 | # işlem başarılı ise verinin ekrana verilmesi 45 | self.BinLookup.textBrowser_logConsole.append(gen_info_text("Proccess success")) 46 | self.BinLookup.textBrowser_logConsole.append(str(">"*15) + str("<"*15)) 47 | self.BinLookup.textBrowser_logConsole.append(lookup_data[1]) 48 | self.BinLookup.textBrowser_logConsole.append(str(">"*15) + str("<"*15)) 49 | 50 | 51 | def clearResults(self): 52 | # Çıktıların temizlenmesi 53 | self.BinLookup.textBrowser_logConsole.setText("LOG CONSOLE:") 54 | self.BinLookup.lineEdit_bin_input.clear() 55 | 56 | 57 | -------------------------------------------------------------------------------- /hivelibrary/database_structure.py: -------------------------------------------------------------------------------- 1 | from hivelibrary.env import DB_BLOB_STORAGE,DB_SYSTEM_TABLE,DB_LOCAL_AUTHENTICATE_TABLE, DB_FACE_RECOGNITION_TABLE 2 | 3 | 4 | POSTGRESQL_DATABASE_STRUCTURE = f""" 5 | CREATE TABLE IF NOT EXISTS {DB_SYSTEM_TABLE} ( 6 | id SERIAL PRIMARY KEY, 7 | unique_key VARCHAR(100) NOT NULL UNIQUE, 8 | value VARCHAR(100) NOT NULL 9 | ); 10 | CREATE TABLE IF NOT EXISTS {DB_BLOB_STORAGE} ( 11 | id SERIAL PRIMARY KEY, 12 | unique_blob_key TEXT NOT NULL UNIQUE, 13 | key_value BYTEA NOT NULL, 14 | data_type TEXT NOT NULL DEFAULT 'user', 15 | information_notes TEXT DEFAULT NULL 16 | ); 17 | CREATE TABLE IF NOT EXISTS {DB_LOCAL_AUTHENTICATE_TABLE} ( 18 | id SERIAL PRIMARY KEY, 19 | username VARCHAR(128) NOT NULL UNIQUE, 20 | password VARCHAR(128) NOT NULL 21 | ); 22 | CREATE TABLE IF NOT EXISTS {DB_FACE_RECOGNITION_TABLE} ( 23 | id SERIAL PRIMARY KEY, 24 | face_picture_blob BYTEA NOT NULL, 25 | picture_sha1_hash TEXT NOT NULL UNIQUE, 26 | face_embedding_data BYTEA NOT NULL, 27 | landmarks_2d BYTEA NOT NULL, 28 | face_box BYTEA NOT NULL, 29 | face_name TEXT NOT NULL, 30 | add_date TIMESTAMP DEFAULT NOW() 31 | ); 32 | 33 | """ 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | # OLD SQLITE STRUCTURE 48 | 49 | DATABASE_STRUCTURE_COMMAND_SQLITE = f""" 50 | CREATE TABLE IF NOT EXISTS {DB_SYSTEM_TABLE} ( 51 | id INTEGER NOT NULL, 52 | uniq_key TEXT NOT NULL UNIQUE, 53 | value TEXT NOT NULL, 54 | PRIMARY KEY("id") 55 | ); 56 | CREATE TABLE IF NOT EXISTS {DB_BLOB_STORAGE} ( 57 | id INTEGER NOT NULL, 58 | unique_blob_key TEXT NOT NULL UNIQUE, 59 | key_value BLOB NOT NULL, 60 | data_type TEXT NOT NULL DEFAULT 'user', 61 | information_notes TEXT DEFAULT NULL, 62 | PRIMARY KEY("id") 63 | ); 64 | CREATE TABLE IF NOT EXISTS {DB_LOCAL_AUTHENTICATE_TABLE} ( 65 | id INTEGER NOT NULL, 66 | username TEXT(64) NOT NULL UNIQUE, 67 | password TEXT(64) NOT NULL, 68 | PRIMARY KEY("id") 69 | ); 70 | 71 | CREATE TABLE IF NOT EXISTS {DB_FACE_RECOGNITION_TABLE} ( 72 | id INTEGER PRIMARY KEY AUTOINCREMENT, 73 | face_picture_blob BLOB NOT NULL, 74 | picture_sha1_hash TEXT NOT NULL UNIQUE, 75 | face_embedding_data BLOB NOT NULL, 76 | landmarks_2d BLOB NOT NULL, 77 | face_box BLOB NOT NULL, 78 | face_name TEXT NOT NULL, 79 | add_date DATETIME DEFAULT CURRENT_TIMESTAMP 80 | ); 81 | """ 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /hivelibrary/osint/reverse_ip.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from hivelibrary.user_agent_tools import randomUserAgent 3 | 4 | IPINFO_IO_API_URL:str ="https://ipinfo.io/" 5 | def reverseIpLookup_ipinfoio(target_ip:str) -> dict: 6 | try: 7 | RESULT_DICT = {} 8 | 9 | request_url = IPINFO_IO_API_URL + target_ip 10 | request_headers = {"User-Agent":randomUserAgent(),} 11 | 12 | queryRequest = requests.get(url=request_url) 13 | 14 | if not queryRequest.ok: 15 | return { "success":False, "data":f"IP query failed, status code: {queryRequest.status_code}","cordinate":None ,"dict":None} 16 | 17 | queryData = queryRequest.json() 18 | queryKeys = queryData.keys() 19 | if "ip" in queryKeys: 20 | RESULT_DICT["ip"] = queryData["ip"] 21 | 22 | if "hostname" in queryKeys: 23 | RESULT_DICT["hostname"] = queryData["hostname"] 24 | 25 | if "anycast" in queryKeys: 26 | RESULT_DICT["anycast"] = queryData["anycast"] 27 | 28 | if "city" in queryKeys: 29 | RESULT_DICT["city"] = queryData["city"] 30 | 31 | if "region" in queryKeys: 32 | RESULT_DICT["region"] = queryData["region"] 33 | 34 | if "country" in queryKeys: 35 | RESULT_DICT["country"] = queryData["country"] 36 | 37 | if "loc" in queryKeys: 38 | RESULT_DICT["loc"] = queryData["loc"] 39 | 40 | if "org" in queryKeys: 41 | RESULT_DICT["org"] = queryData["org"] 42 | 43 | if "postal" in queryKeys: 44 | RESULT_DICT["postal"] = queryData["postal"] 45 | 46 | if "timezone" in queryKeys: 47 | RESULT_DICT["timezone"] = queryData["timezone"] 48 | 49 | 50 | 51 | if len(RESULT_DICT) == 1: 52 | return { "success":False, "data":f"Non valied ip addres: {target_ip}", "cordinate":None,"dict":None} 53 | 54 | 55 | if "loc" in RESULT_DICT.keys(): 56 | return {"success":True, "data":"IP query successfuly", "cordinate":RESULT_DICT["loc"],"dict":RESULT_DICT} 57 | 58 | 59 | return {"success":True, "data":"IP query successfuly", "cordinate":None,"dict":RESULT_DICT} 60 | 61 | except Exception as err: 62 | return {"success":False, "data":f"IP query failed, error message: {err}", "cordinate":None,"dict":None} -------------------------------------------------------------------------------- /raw_ui_files/coomingSoonScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CoomingSoonScreen 4 | 5 | 6 | 7 | 0 8 | 0 9 | 883 10 | 421 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | :/mainLogo/logo.png:/mainLogo/logo.png 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | font: 11pt "Hack"; 28 | 29 | 30 | <html><head/><body><p align="center">This Future Not Available This Version</p></body></html> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | font: 11pt "Hack"; 41 | 42 | 43 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 44 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 45 | p, li { white-space: pre-wrap; } 46 | </style></head><body style=" font-family:'Hack'; font-size:11pt; font-weight:400; font-style:normal;"> 47 | <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell';"><br /></p></body></html> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /hivelibrary/identify/phoneNumper_tools.py: -------------------------------------------------------------------------------- 1 | # From https://github.com/MehmetYukselSekeroglu/TurkOperator_bilgileri 2 | 3 | 4 | 5 | 6 | def check_number_only_TR(phone_numbber:str) -> dict: 7 | 8 | abone_numarası = phone_numbber[6:13] 9 | 10 | abone_numarası = str(abone_numarası) 11 | 12 | if len(phone_numbber) < 13: 13 | return {"success":False, "message":"numara olması gerekenden kısa"} 14 | 15 | if len(phone_numbber) > 13: 16 | return {"success":False, "message":"numara olması gerekenden uzun"} 17 | 18 | saglayıcı_kodu=phone_numbber[3:6] 19 | TurkTelekom = ["501", "505", "506","507","552","553","554","555","559"] 20 | TurkCell = ["530","531","532","533","534","535", "536", "537", "538", "539"] 21 | Vodafone = ["541", "542", "543", "544", "545", "546", "547", "548", "549"] 22 | 23 | operator_supported_codes = [] 24 | if saglayıcı_kodu in TurkTelekom: 25 | SaglayıcıBilgisi = "TürkTelekom" 26 | operator_supported_codes = TurkTelekom 27 | 28 | elif saglayıcı_kodu == "551": 29 | SaglayıcıBilgisi = "BIMcell sanal öperatör | TürkTelekom" 30 | operator_supported_codes = TurkTelekom 31 | 32 | elif saglayıcı_kodu in TurkCell: 33 | SaglayıcıBilgisi = "Turkcell" 34 | operator_supported_codes = TurkCell 35 | 36 | elif saglayıcı_kodu == "516": 37 | SaglayıcıBilgisi = "Bursa mobile sanal öperatör | Turkcell" 38 | operator_supported_codes = TurkCell 39 | 40 | elif saglayıcı_kodu == "561": 41 | SaglayıcıBilgisi = "61cell sanal öperatör | Turkcell" 42 | operator_supported_codes = TurkCell 43 | 44 | elif saglayıcı_kodu in Vodafone: 45 | SaglayıcıBilgisi = "Vodafone" 46 | operator_supported_codes = Vodafone 47 | 48 | else: 49 | SaglayıcıBilgisi="Tespit edilemedi, bölgesel numara olabilir" 50 | operator_supported_codes = [ "No Data" ] 51 | 52 | googleDork = generateGoogleDork(phone_numbber) 53 | return {"success":True, "operatör":SaglayıcıBilgisi, "supported_codes":operator_supported_codes, "dork":googleDork} 54 | 55 | 56 | 57 | 58 | 59 | def generateGoogleDork(phone_numbber:str) -> str: 60 | abone_numarası = phone_numbber[3:13] 61 | raw_number = phone_numbber 62 | raw_number_2 = "0" + abone_numarası 63 | DORK = f"""INURL:"{raw_number}" OR INTEXT:"{raw_number}" OR INTITLE:"{raw_number}" OR INURL:"{abone_numarası}" OR INTEXT:"{abone_numarası}" OR INTITLE:"{abone_numarası}" """ 64 | return DORK 65 | 66 | -------------------------------------------------------------------------------- /guilib/new_account_controller.py: -------------------------------------------------------------------------------- 1 | from hivelibrary import database_tools 2 | from guilib.newAccountScreen import Ui_ConfigureAccounts 3 | 4 | from PyQt5.QtWidgets import * 5 | 6 | import sqlite3 7 | import sys 8 | 9 | 10 | 11 | 12 | class NewAccountScreen(QWidget): 13 | def __init__(self, db_connections, db_cursor, targetWindow,MainConfig): 14 | super().__init__() 15 | 16 | # setup the ui 17 | self.newAccountPage = Ui_ConfigureAccounts() 18 | self.newAccountPage.setupUi(self) 19 | 20 | # set dabase connections and cursor 21 | self.db_connections = db_connections 22 | self.db_cursor = db_cursor 23 | self.DBS_CONF = [self.db_connections, self.db_cursor] 24 | # set return window 25 | self.targetMainWindow = targetWindow(*self.DBS_CONF,MainConfig) 26 | 27 | # set window title 28 | self.setWindowTitle("Configure Local Accounts") 29 | 30 | self.newAccountPage.pushButton_confirmAccount.clicked.connect(self.configureNewAccounts) 31 | self.newAccountPage.pushButton_exit_app.clicked.connect(self.exitProtocol) 32 | 33 | 34 | 35 | def configureNewAccounts(self): 36 | 37 | input_new_username = self.newAccountPage.lineEdit_getNewUsername.text() 38 | input_new_password = self.newAccountPage.lineEdit_getNewPassword.text() 39 | input_new_password_confirm = self.newAccountPage.lineEdit_getNewPasswordVerify.text() 40 | 41 | if len(input_new_username) < 3 or len(input_new_password) < 8 or len(input_new_password_confirm) < 8: 42 | err_msg="Status: username min len 3, password min len 8 chars" 43 | self.newAccountPage.label_status_info.setText(err_msg) 44 | return 45 | 46 | if input_new_password != input_new_password_confirm: 47 | err_msg="Status: passwords not match" 48 | self.newAccountPage.label_status_info.setText(err_msg) 49 | return 50 | 51 | config_status = database_tools.generate_admin_accounts(username=input_new_username, password=input_new_password,db=self.db_connections,db_cursor=self.db_cursor) 52 | 53 | if config_status["success"] != True: 54 | err_msg=f"Status: {config_status['data']} " 55 | self.newAccountPage.label_status_info.setText(err_msg) 56 | return 57 | 58 | self.hide() 59 | self.targetMainWindow.show() 60 | 61 | 62 | 63 | def exitProtocol(self): 64 | sys.exit(1) 65 | 66 | -------------------------------------------------------------------------------- /documents/FACE RECOGNITION.md: -------------------------------------------------------------------------------- 1 | # TheHive / Yüz Tanımlama ( Recognition ) 2 | 3 | 4 | ## Kullanılan kütüphaneler ve sistemler: 5 | - InsightFace : Yüz tespiti için kullanılan kütüphane 6 | - numpy : Benzerlik hesaplamaları için 7 | - PostgreSQL : Yüksek hacimli veriyi saklamak için 8 | 9 | 10 | Yüz tanıma sisteminin temelini [InsightFace](https://github.com/deepinsight/insightface) açık kaynaklı kütüphanesi oluşturur. Gerek güncel olması gerek ön tanımlı kullanmış olduğu modellerin doğruluğu sayesinde diğer sistemlerden daha verimli çalışmaktadır kanaatimizce. 11 | 12 | 13 | 14 | ## Nasıl çalışır: 15 | InsightFace kütüpahnesi ile resimdeki yüzleri tespit ederek yüzler için önemli olan noktaları PostgreSQL üzerinde BLOB (Binary Large Object ) olarak saklıyoruz bu sayede numpy dizilerinin bozulması engelleniyor veritabanı içerisinde Resmin kendisi, 2d olarak yüzün yer işaretleri, gömme bilgileri ( hesaplama için kullanılan vektörler) ve eklenme tarihleri saklanır. Sistem üzerinde bir arama yapılacağı zaman kaynak resimdeki vektörler alınarak veritabanında saklanan TÜM vektörler ile tek tek numpy ile karşılaştırılır karşılaştırma sonucunda `kosinüs` benzerliği oranları elde edilir bu oranlardan güncel olarak en yüksek 10 adeti resmin id'si ile bir python sözlüğü içerisinde saklanır ve tüm veritabanı araması bittiği zaman sözlük içerisindeki en yüksek benzerlik değeri veritabanından seçilerek ekrana getirilir. Sistem eşik değerin üstündeki ilk sonucu değil en yüksek oranı getirecek şekilde ayarlıdır bu nedenle yüksek oranda doğruluk sağlamaktadır. Şuanki veritabanı yapısı ve arama modeli nedeniyle çok geniş bir veritabanına sahipseniz canlı tanıma için kullanmaya elverişli değildir (100.000+ resim örneğin). 16 | 17 | 18 | ## Benzerlik hesaplaması: 19 | Benzerliğin hesaplanması için yüz vektörlerinin direk olarak numpy üzerinden kosinüs benzerliği hesaplanır, benzerlik hesaplamasında herhangi bir model kullanılmaz bu nedenle aynı kişinin 2 resmi üzerinde bile bazen %100 vermez ama farklı kişiler içinde bi okadar hassaslık sağlar. 20 | 21 | 22 | 23 | Örnek olarak ( Doğrulama sisteminden bir ekran görüntüsü ): 24 | 25 | 26 | 27 | 28 | 29 | 30 | ## Yeni veritabanları ve servisler oluşturulabilirmi? 31 | 32 | Şuan için grafiksel arayüz üzerinden ayrı ayrı veritabanları oluşturma ve kullanma desteği eklenmemiştir. Yakın zamanda bu destek eklenecektir. 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 | Son Düzenleme: 19.02.2024 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /hivelibrary/VirusTotal/url_scanner.py: -------------------------------------------------------------------------------- 1 | 2 | import requests 3 | from urllib.parse import urlparse 4 | 5 | 6 | def virustotal_url_scanner(target_url, vt_api_key) -> list: 7 | target_url = str(target_url) 8 | vt_api_key = str(vt_api_key) 9 | STATIC_URL_SCAN_API_URL = "https://www.virustotal.com/vtapi/v2/url/scan" 10 | request_parametres = {"apikey" : vt_api_key,"url" : target_url} 11 | 12 | rawReq = requests.post(url=STATIC_URL_SCAN_API_URL, data=request_parametres) 13 | if rawReq.status_code == 200: 14 | try: 15 | parsed_req = rawReq.json() 16 | if parsed_req["response_code"] == 1: 17 | scan_id_is = parsed_req["scan_id"] 18 | return [ True, str(scan_id_is) ] 19 | 20 | else: 21 | return [ False, "API isteği kabul etmedi veya edemedi" ] 22 | except Exception: 23 | return [ False, "Veri işlenirken hata gerçekleşti" ] 24 | else: 25 | return [ False, f"İstek geçersiz durum kodu döndürdü kod: {str(rawReq.status_code)}" ] 26 | 27 | 28 | 29 | def virustotal_url_response_handler(vt_api_key, is_response_id) -> list: 30 | vt_api_key = str(vt_api_key) 31 | is_response_id = str(is_response_id) 32 | # api url 33 | STATIC_REPORT_URL = "https://www.virustotal.com/vtapi/v2/url/report" 34 | request_prametres = {"apikey" : vt_api_key,"resource" : is_response_id} 35 | 36 | get_results = requests.get(url=STATIC_REPORT_URL, params=request_prametres) 37 | if get_results.status_code == 200: 38 | try: 39 | results_json = get_results.json() 40 | 41 | # if respons success 42 | if results_json["response_code"] == 1: 43 | target_url = results_json["url"] 44 | vt_sonuc_linki = results_json["permalink"] 45 | toplam_tarayan = results_json["total"] 46 | tespit_edilen = results_json["positives"] 47 | tarama_tarihi = results_json["scan_date"] 48 | 49 | return [True, [ target_url, toplam_tarayan, tespit_edilen, tarama_tarihi, vt_sonuc_linki ] ] 50 | 51 | else: 52 | return [ False, "API isteği kabul etmedi veya edemedi" ] 53 | 54 | # error exceptions and feedback 55 | except Exception: 56 | return [False, f"Veri işlenirken hata gerçekleşti"] 57 | else: 58 | return [ False, f"İstek geçersiz durum kodu döndürdü kod: {str(get_results.status_code)}" ] 59 | 60 | 61 | 62 | def is_url(string): 63 | parsed_url = urlparse(string) 64 | if parsed_url.netloc: 65 | return True 66 | return False -------------------------------------------------------------------------------- /guilib/PhoneNumberParser_controller.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtWidgets import * 2 | from guilib.PhoneNumberParserScreen import Ui_phoneNumberParser 3 | from guilib.html_text_generator.html_draft import * 4 | 5 | from hivelibrary.identify.phoneNumper_tools import check_number_only_TR 6 | 7 | 8 | class PhoneNumberParserWidget(QWidget): 9 | 10 | def __init__(self): 11 | super().__init__() 12 | 13 | self.phoneNumberParser = Ui_phoneNumberParser() 14 | self.phoneNumberParser.setupUi(self) 15 | 16 | 17 | self.setWindowTitle("Phone Number Parser") 18 | 19 | 20 | self.phoneNumberParser.pushButton_startProccess.clicked.connect(self.runParser) 21 | self.phoneNumberParser.pushButton_saveResults.clicked.connect(self.saveResult) 22 | 23 | 24 | def runParser(self): 25 | self.clearLogConsole() 26 | getNumber = self.phoneNumberParser.lineEdit_phoneInput.text() 27 | 28 | if len(getNumber) < 4: 29 | self.phoneNumberParser.textBrowser_logConsole.append(gen_error_text( 30 | f"Geçersiz numara formatı, format: +12948938591")) 31 | return 32 | 33 | if getNumber[0] != "+": 34 | self.phoneNumberParser.textBrowser_logConsole.append(gen_error_text( 35 | f"Geçersiz numara formatı, format: +12948938591")) 36 | return 37 | 38 | if getNumber[0:3] != "+90": 39 | self.phoneNumberParser.textBrowser_logConsole.append(gen_error_text( 40 | f"Şuanda sadece türk numaraları desteklenmektedir.")) 41 | return 42 | 43 | data_is = check_number_only_TR(phone_numbber=getNumber) 44 | 45 | if data_is["success"] != True: 46 | self.phoneNumberParser.textBrowser_logConsole.append(gen_error_text( 47 | data_is["message"])) 48 | return 49 | 50 | currentOperator = data_is["operatör"] 51 | otherCodesForCurrentOperator = data_is["supported_codes"] 52 | googleDorkForNumber = data_is["dork"] 53 | 54 | text = f"""Numara için sonuçlar:

55 | Geçerli operatör: {currentOperator}
56 | Operatöre ait diğer kodlar: {otherCodesForCurrentOperator}
57 |
58 | Google Dork: {googleDorkForNumber}

59 | {"-"*30}""" 60 | self.phoneNumberParser.textBrowser_logConsole.append(text) 61 | 62 | 63 | def saveResult(self): 64 | self.phoneNumberParser.textBrowser_logConsole.append(gen_error_text(f"Bu özellik şuanda aktif değildir")) 65 | 66 | 67 | def clearLogConsole(self): 68 | self.phoneNumberParser.textBrowser_logConsole.setText("LOG AND RESULTS: ") -------------------------------------------------------------------------------- /guilib/IPtracerBasic_controller.py: -------------------------------------------------------------------------------- 1 | from guilib.IPtracerBasicScreen import Ui_IPTracerWidget_ipinfoio 2 | from guilib.html_text_generator.html_draft import gen_error_text,gen_info_text 3 | 4 | from PyQt5.QtWidgets import * 5 | from PyQt5 import QtGui 6 | from PyQt5 import QtCore 7 | 8 | 9 | from hivelibrary.env import DEFAULT_LOGO_PATH 10 | from hivelibrary.map_tools import drawNewMap 11 | from hivelibrary.osint.reverse_ip import reverseIpLookup_ipinfoio 12 | 13 | class BasicIPtracerWidget(QWidget): 14 | 15 | def __init__(self): 16 | super().__init__() 17 | 18 | 19 | self.BasicIpTracer = Ui_IPTracerWidget_ipinfoio() 20 | self.BasicIpTracer.setupUi(self) 21 | self.setWindowTitle("IP Tracer Basic") 22 | self.BasicIpTracer.textBrowser_logConsole.setText("LOG CONSOLE:") 23 | 24 | self.showDefaultMap() 25 | 26 | self.BasicIpTracer.pushButton_clearResults.clicked.connect(self.clearOutputs) 27 | self.BasicIpTracer.pushButton_startQuery.clicked.connect(self.startIpTracer) 28 | 29 | 30 | 31 | def startIpTracer(self): 32 | self.showDefaultMap() 33 | self.BasicIpTracer.textBrowser_logConsole.setText("LOG CONSOLE:") 34 | getInput = self.BasicIpTracer.lineEdit_ipInput.text() 35 | getInput = str(getInput) 36 | 37 | if len(getInput) < 1: 38 | self.BasicIpTracer.textBrowser_logConsole.append(gen_error_text("No ip input, process stopped")) 39 | return 40 | 41 | resultDict = reverseIpLookup_ipinfoio(target_ip=getInput) 42 | 43 | if resultDict["success"] != True: 44 | self.BasicIpTracer.textBrowser_logConsole.append(gen_error_text(resultDict["data"])) 45 | return 46 | 47 | if resultDict["cordinate"] != None: 48 | dict_is = resultDict["cordinate"] 49 | dict_is = str(resultDict["cordinate"]).split(",") 50 | mapData = drawNewMap(cordinate_array_or_tuple=dict_is, note_text="IP network distribution point or location") 51 | self.BasicIpTracer.webView_mapView.setHtml(mapData) 52 | 53 | for dict_key in resultDict["dict"].keys(): 54 | name_is = str(dict_key).upper() 55 | self.BasicIpTracer.textBrowser_logConsole.append(f"[ {name_is} ]: {resultDict['dict'][dict_key]}") 56 | 57 | 58 | def clearOutputs(self): 59 | self.showDefaultMap() 60 | self.BasicIpTracer.textBrowser_logConsole.setText("LOG CONSOLE:") 61 | self.BasicIpTracer.lineEdit_ipInput.clear() 62 | 63 | 64 | def showDefaultMap(self): 65 | self.BasicIpTracer.webView_mapView.setHtml(drawNewMap(cordinate_array_or_tuple=(0.0,0.0),zoom_start=1)) 66 | -------------------------------------------------------------------------------- /hivelibrary/bin_lookup.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | def lookup_bin(target_bin) -> list[bool, str]: 4 | 5 | REQ_HEADERS = {"Accept-Version" : "3"} 6 | RAW_BIN_INPUT = str(target_bin) 7 | target_bin = str(target_bin[:6]) 8 | REQ_URL:str = f"https://lookup.binlist.net/{target_bin}" 9 | 10 | 11 | 12 | try: 13 | query_req = requests.get(url=REQ_URL, headers=REQ_HEADERS) 14 | except Exception as err: 15 | err_msg = "❌ Server error, rety after 60 seconds." 16 | return [ False, err_msg] 17 | 18 | 19 | if query_req.status_code == 404 or query_req.status_code == 400: 20 | err_msg = "❌ Not valid BIN, BIN not found!" 21 | return [ False, err_msg] 22 | 23 | if query_req.status_code == 429: 24 | err_msg = "❌ API full, rety after 60 seconds." 25 | return [ False, err_msg ] 26 | 27 | if query_req.status_code != 200: 28 | err_msg = "❌ Server error, rety after 60 seconds." 29 | return [ False, err_msg ] 30 | 31 | try: 32 | req_data = query_req.json() 33 | 34 | except Exception as err: 35 | err_msg = f"❌ {err}, rety after 60 seconds." 36 | return [ False, err_msg ] 37 | 38 | if "scheme" in req_data.keys(): 39 | card_vendor = str(req_data["scheme"]) 40 | else: 41 | card_vendor = "NULL" 42 | 43 | if "type" in req_data.keys(): 44 | card_type = str(req_data["type"]) 45 | else: 46 | card_type = "NULL" 47 | 48 | if "brand" in req_data.keys(): 49 | card_brand = str(req_data["brand"]) 50 | else: 51 | card_brand = "NULL" 52 | 53 | if type(req_data["country"]) == dict: 54 | if "name" in req_data["country"].keys(): 55 | card_country_name = str(req_data["country"]["name"]) 56 | else: 57 | card_country_name = "NULL" 58 | else: 59 | card_country_name = "NULL" 60 | 61 | if type(req_data["bank"]) == dict: 62 | if "name" in req_data["bank"].keys(): 63 | card_bank_name = str(req_data["bank"]["name"]) 64 | else: 65 | card_bank_name = "Failed to detect bank name." 66 | else: 67 | card_bank_name = "Failed to detect bank name." 68 | 69 | if card_vendor == "NULL" and card_type=="NULL" and card_brand=="NULL" and card_country_name == "NULL": 70 | err_msg = "❌ Not valid BIN, no info for target BIN!" 71 | return [ False, err_msg] 72 | 73 | return_text = f"""Valid BIN ✅ 74 | BIN: {target_bin} 75 | Vendor: {card_vendor} 76 | Type: {card_type} 77 | Brand: {card_brand} 78 | Country: {card_country_name} 79 | Bank: {card_bank_name} 80 | 81 | Source: {REQ_URL}""" 82 | 83 | 84 | return [ True, return_text ] 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /raw_ui_files/StaticIPtracerScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | IPTracerWidget_ipinfoio 4 | 5 | 6 | 7 | 0 8 | 0 9 | 866 10 | 514 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 391 22 | 0 23 | 24 | 25 | 26 | 27 | 28 | 29 | <html><head/><body><p align="center"><span style=" font-weight:600;">IP Tracer | ipinfo.io</span></p></body></html> 30 | 31 | 32 | 33 | 34 | 35 | 36 | Target IP: 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | Start 47 | 48 | 49 | 50 | 51 | 52 | 53 | Clear 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 400 68 | 0 69 | 70 | 71 | 72 | 73 | about:blank 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | QWebEngineView 83 | QWidget 84 |
QtWebEngineWidgets/QWebEngineView
85 |
86 |
87 | 88 | 89 |
90 | -------------------------------------------------------------------------------- /hivelibrary/rsa_tools.py: -------------------------------------------------------------------------------- 1 | import rsa 2 | import os 3 | DEFAULT_CHARSET_ENCODINGS = "utf-8" 4 | SUPPORTED_KEY_SIZES = [1024,2048,4096] 5 | 6 | def generateNewKeyAndSave(keysize:int, key_name:str, save_dir:str) -> dict: 7 | if keysize not in SUPPORTED_KEY_SIZES: 8 | return {"success":False, "message":"Not supported keysize", "private_path":None, "public_path":None, "code":"invalid_ksize"} 9 | 10 | if os.name == "nt": 11 | check_digit = str(save_dir[-2:]) 12 | if not str(os.path.sep) in check_digit: 13 | save_dir = str(save_dir) + str(os.path.sep) 14 | else: 15 | check_digit = str(save_dir[-1]) 16 | if not str(os.path.sep) in check_digit: 17 | save_dir = str(save_dir) + str(os.path.sep) 18 | 19 | 20 | PRIVATE_KEY_PATH = save_dir + key_name + ".priv" 21 | PUBLIC_KEY_PATH = save_dir + key_name + ".pub" 22 | 23 | if os.path.exists(PRIVATE_KEY_PATH) or os.path.exists(PUBLIC_KEY_PATH): 24 | return { "success":False, "message":"Key files alredy exists proccess stopped", "private_path":None, "public_path":None, "code":"keyfiles_exists" } 25 | 26 | 27 | public_key, private_key = rsa.newkeys(keysize) 28 | 29 | with open(PUBLIC_KEY_PATH, "wb") as public_key_file: 30 | public_key_file.write(public_key.save_pkcs1()) 31 | 32 | 33 | with open(PRIVATE_KEY_PATH, "wb") as private_key_file: 34 | private_key_file.write(private_key.save_pkcs1()) 35 | 36 | 37 | return {"success":True,"message":"RSA new keys successfully generated","private_path": PRIVATE_KEY_PATH, 38 | "public_path": PUBLIC_KEY_PATH, 39 | "code":"success"} 40 | 41 | 42 | 43 | 44 | def loadPrivateKey(private_key_file_path:str) -> dict: 45 | if not os.path.exists(private_key_file_path): 46 | return {"success": "false","message": f"{private_key_file_path} not found"} 47 | 48 | with open(private_key_file_path, "rb") as private_key_file: 49 | key_data = private_key_file.read() 50 | key_data = rsa.PrivateKey.load_pkcs1(key_data) 51 | return {"success":"true","data": key_data} 52 | 53 | 54 | def loadPublicKey(public_key_file_path:str) -> dict: 55 | if not os.path.exists(public_key_file_path): 56 | return {"success" : False,"message" : f"{public_key_file_path} not found"} 57 | 58 | with open(public_key_file_path, "rb") as public_key_file: 59 | key_data = public_key_file.read() 60 | key_data = rsa.PublicKey.load_pkcs1(key_data) 61 | return {"success" : True,"data": key_data} 62 | 63 | 64 | 65 | 66 | 67 | def encrypte_string(public_key, target_string:str) -> str: 68 | target_string = str(target_string) 69 | return rsa.encrypt(target_string.encode(DEFAULT_CHARSET_ENCODINGS),pub_key=public_key) 70 | 71 | def decrypte_string(private_key, target_string) -> str: 72 | return rsa.decrypt(target_string,priv_key=private_key).decode(DEFAULT_CHARSET_ENCODINGS) -------------------------------------------------------------------------------- /guilib/TcNumberCalculator_controller.py: -------------------------------------------------------------------------------- 1 | from guilib.TcNumberCalculatorScreen import Ui_TcNumberCalculator 2 | from guilib.html_text_generator.html_draft import gen_error_text, gen_info_text 3 | from PyQt5.QtWidgets import * 4 | from hivelibrary.identify.tc_number_tools import tc_uretici, gecerlilik_kontrol 5 | 6 | 7 | 8 | 9 | 10 | class TcCalculatorWidget(QWidget): 11 | def __init__(self): 12 | super().__init__() 13 | 14 | self.TcCalculatorPage = Ui_TcNumberCalculator() 15 | self.TcCalculatorPage.setupUi(self) 16 | self.setWindowTitle("Tc Calculator") 17 | 18 | self.TcCalculatorPage.pushButton_startCalculator.clicked.connect(self.startCalculating) 19 | 20 | def startCalculating(self): 21 | self.clearLogConsole() 22 | getTc = self.TcCalculatorPage.lineEdit_tcNumberInput.text() 23 | getCount = self.TcCalculatorPage.spinBox_numberOfCalculating.value() 24 | 25 | if len(getTc) != 11: 26 | self.TcCalculatorPage.textBrowser_logConsole.append(str(gen_error_text("Tc numrası 11 haneli olmalıdır, işlem iptal edildi"))) 27 | return 28 | 29 | if not getTc.isnumeric(): 30 | self.TcCalculatorPage.textBrowser_logConsole.append(str(gen_error_text("Tc numrası sadece rakamlardan oluşmalıdır, işlem iptal edildi"))) 31 | return 32 | 33 | if getCount < 1: 34 | self.TcCalculatorPage.textBrowser_logConsole.append(str(gen_error_text("Hesaplama adeti 0 olamaz, işlem iptal edildi "))) 35 | return 36 | 37 | 38 | check_before_tc_calculator = gecerlilik_kontrol(tc=getTc) 39 | 40 | if check_before_tc_calculator["success"] != True: 41 | self.TcCalculatorPage.textBrowser_logConsole.append(str(gen_error_text 42 | ("Girilen Tc numarası geçersiz bu nedenle bu numara üzerinden hesaplama yapılamaz, işlem iptal edildi "))) 43 | return 44 | 45 | ileriye_donuk, geriye_donuk = tc_uretici(uretilecek_tc=getTc,olustuma_adedi=getCount) 46 | 47 | self.TcCalculatorPage.textBrowser_logConsole.append(str(gen_info_text("Hesaplama başaryıla tamamlandı."))) 48 | self.TcCalculatorPage.textBrowser_logConsole.append("
[ INFO ]: İleriye Dönük") 49 | for tc in ileriye_donuk: 50 | tc = f"{tc}" 51 | self.TcCalculatorPage.textBrowser_logConsole.append(str(tc)) 52 | 53 | self.TcCalculatorPage.textBrowser_logConsole.append("
[ INFO ]: Geriye Dönük") 54 | for tc in geriye_donuk: 55 | tc = f"{tc}" 56 | self.TcCalculatorPage.textBrowser_logConsole.append(tc) 57 | 58 | self.TcCalculatorPage.textBrowser_logConsole.append(str(gen_info_text("İşlem başarıyla tamamlandı"))) 59 | 60 | 61 | def clearLogConsole(self): 62 | self.TcCalculatorPage.textBrowser_logConsole.setText("LOG AND RESULTS: ") 63 | 64 | -------------------------------------------------------------------------------- /guilib/login_controller.py: -------------------------------------------------------------------------------- 1 | 2 | from guilib.loginScreen import Ui_AuthenticationScreen 3 | 4 | from hivelibrary import database_tools 5 | from hivelibrary import console_tools 6 | 7 | from PyQt5.QtWidgets import * 8 | import sys 9 | 10 | 11 | class LoginScreen(QWidget): 12 | def __init__(self, sqlite_cnn, sqlite_curosr, targetWindow, MainConfig): 13 | super().__init__() 14 | # Console Log 15 | console_tools.InformationPrinter("Starting login screen") 16 | 17 | # set external varaibles 18 | self.db_connections = sqlite_cnn 19 | self.db_cursor = sqlite_curosr 20 | self.DBS_CONF = [ self.db_connections, self.db_cursor ] 21 | 22 | # set current widget ui 23 | self.loginScreen = Ui_AuthenticationScreen() 24 | self.loginScreen.setupUi(self) 25 | 26 | # set return window 27 | self.targetMainWindow = targetWindow(*self.DBS_CONF,MainConfig) 28 | 29 | # set login credientals 30 | self.MAX_LOGIN_TRY = 3 31 | self.CURRENT_TRY = 0 32 | 33 | # set window title 34 | self.setWindowTitle(f"Local Authentication") 35 | 36 | # set button targets 37 | self.loginScreen.pushButton_initralAuth_authenticateButton.clicked.connect(self.tryAuthenticate) 38 | self.loginScreen.pushButton_initralAuth_exitButton.clicked.connect(self.exitProtocol) 39 | 40 | def tryAuthenticate(self): 41 | # add count in current trying 42 | self.CURRENT_TRY += 1 43 | 44 | # get username & password 45 | input_username = self.loginScreen.lineEdit_initralAuth_username.text() 46 | input_password = self.loginScreen.lineEdit_initralAuth_password.text() 47 | 48 | # check trying count 49 | if self.CURRENT_TRY > self.MAX_LOGIN_TRY: 50 | console_tools.WarnPrinter("Maximum trial limit exceeded, exiting the program") 51 | self.exitProtocol() 52 | 53 | # send username password to hive api 54 | authenticateStatus = database_tools.is_authenticated(username=input_username,password=input_password,db_cursor=self.db_cursor) 55 | 56 | # TheHive api ye gönderilen verilerin sonuçları kontrol edilir 57 | if authenticateStatus["success"] != True: 58 | console_tools.ErrorPrinter("Wrong password or username") 59 | err_text = f"Status: Failed, {str(self.MAX_LOGIN_TRY - self.CURRENT_TRY)} credit left." 60 | self.loginScreen.label_4_authenticate_status.setText(err_text) 61 | self.loginScreen.lineEdit_initralAuth_username.clear() 62 | self.loginScreen.lineEdit_initralAuth_password.clear() 63 | return 64 | 65 | else: 66 | console_tools.InformationPrinter("Authentication successfully") 67 | self.hide() 68 | self.targetMainWindow.show() 69 | 70 | # for exit button and broken authenticate protocol 71 | def exitProtocol(self): 72 | sys.exit(1) -------------------------------------------------------------------------------- /guilib/BinLookupScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/BinLookupScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_BIN_LOOKUP_WIDGET(object): 15 | def setupUi(self, BIN_LOOKUP_WIDGET): 16 | BIN_LOOKUP_WIDGET.setObjectName("BIN_LOOKUP_WIDGET") 17 | BIN_LOOKUP_WIDGET.resize(795, 476) 18 | self.gridLayout = QtWidgets.QGridLayout(BIN_LOOKUP_WIDGET) 19 | self.gridLayout.setObjectName("gridLayout") 20 | self.pushButton_start = QtWidgets.QPushButton(BIN_LOOKUP_WIDGET) 21 | self.pushButton_start.setObjectName("pushButton_start") 22 | self.gridLayout.addWidget(self.pushButton_start, 1, 2, 1, 1) 23 | self.lineEdit_bin_input = QtWidgets.QLineEdit(BIN_LOOKUP_WIDGET) 24 | self.lineEdit_bin_input.setMaximumSize(QtCore.QSize(351, 16777215)) 25 | self.lineEdit_bin_input.setObjectName("lineEdit_bin_input") 26 | self.gridLayout.addWidget(self.lineEdit_bin_input, 1, 1, 1, 1) 27 | self.textBrowser_logConsole = QtWidgets.QTextBrowser(BIN_LOOKUP_WIDGET) 28 | self.textBrowser_logConsole.setMinimumSize(QtCore.QSize(0, 301)) 29 | self.textBrowser_logConsole.setObjectName("textBrowser_logConsole") 30 | self.gridLayout.addWidget(self.textBrowser_logConsole, 2, 0, 1, 4) 31 | self.pushButton_clear = QtWidgets.QPushButton(BIN_LOOKUP_WIDGET) 32 | self.pushButton_clear.setObjectName("pushButton_clear") 33 | self.gridLayout.addWidget(self.pushButton_clear, 1, 3, 1, 1) 34 | self.label_2 = QtWidgets.QLabel(BIN_LOOKUP_WIDGET) 35 | self.label_2.setObjectName("label_2") 36 | self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) 37 | self.label = QtWidgets.QLabel(BIN_LOOKUP_WIDGET) 38 | self.label.setObjectName("label") 39 | self.gridLayout.addWidget(self.label, 0, 0, 1, 4) 40 | 41 | self.retranslateUi(BIN_LOOKUP_WIDGET) 42 | QtCore.QMetaObject.connectSlotsByName(BIN_LOOKUP_WIDGET) 43 | 44 | def retranslateUi(self, BIN_LOOKUP_WIDGET): 45 | _translate = QtCore.QCoreApplication.translate 46 | BIN_LOOKUP_WIDGET.setWindowTitle(_translate("BIN_LOOKUP_WIDGET", "Form")) 47 | self.pushButton_start.setText(_translate("BIN_LOOKUP_WIDGET", "start")) 48 | self.pushButton_clear.setText(_translate("BIN_LOOKUP_WIDGET", "clear")) 49 | self.label_2.setText(_translate("BIN_LOOKUP_WIDGET", "Target BIN:")) 50 | self.label.setText(_translate("BIN_LOOKUP_WIDGET", "

BIN Lookup

")) 51 | 52 | 53 | if __name__ == "__main__": 54 | import sys 55 | app = QtWidgets.QApplication(sys.argv) 56 | BIN_LOOKUP_WIDGET = QtWidgets.QWidget() 57 | ui = Ui_BIN_LOOKUP_WIDGET() 58 | ui.setupUi(BIN_LOOKUP_WIDGET) 59 | BIN_LOOKUP_WIDGET.show() 60 | sys.exit(app.exec_()) 61 | -------------------------------------------------------------------------------- /hivelibrary/sound_converter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import random 4 | import os 5 | from pydub import AudioSegment 6 | SUPPORTED_SOUND_FORMATS = ["MP3","OGG","FLAC","AAC","AIFF","WMA","WAV","M4A"] 7 | 8 | # SES DEN METNE FONKSIYONUNDA GOOGLE API ICIN * FORMATDAN VAW FORMATINA CEVIRME FONKSIYONIU 9 | def GenericAudioConverter(target_file_path:str, temp_dir_path:str, TARGET_FILE_FORMAT="mp3") -> list: 10 | """ Desteklenen formatlardaki ses dosyalarını vaw foarmatına dönüştütüt 11 | Desteklenen formatlar -> "MP3","OGG","FLAC","AAC","AIFF","WMA","WAV" 12 | Args: 13 | target_file_path (str): hedef dosyanın dosya yolu 14 | temp_dir_path (str, optional): final olarak oluşan *.vaw dosyasının kayıt konumu. Defaults to TEMP_DIR. 15 | Returns: 16 | dict: key: success -> true,false eğer urum başarılı ise success:true ve path döner değilse code:hata durumu 17 | UYARI: geri döndürülen path kendisi silinmez 18 | """ 19 | TEMP_DIR = temp_dir_path 20 | 21 | if not os.path.exists(target_file_path) or not os.path.exists(temp_dir_path): 22 | return {"success":"false", "code":"invalid path"} 23 | 24 | target_file_extensions = target_file_path.split(".") 25 | target_file_extensions = target_file_extensions[len(target_file_extensions)-1] 26 | 27 | supported_formats = ["MP3","OGG","FLAC","AAC","AIFF","WMA","WAV"] 28 | 29 | if target_file_extensions.upper() not in supported_formats: 30 | return {"success":"false", "code":"not supported file extensions"} 31 | 32 | LoadedAudio = AudioSegment.from_file(target_file_path, format=target_file_extensions) 33 | export_name = TEMP_DIR+"exported_file_"+str(random.randint(1,999))+"."+TARGET_FILE_FORMAT 34 | 35 | # dosyanın export edilmesi 36 | LoadedAudio.export(export_name, format=TARGET_FILE_FORMAT) 37 | 38 | if os.path.exists(export_name): 39 | return {"success":"true", "path":str(export_name)} 40 | else: 41 | return { "success":"false", "code":"export error"} 42 | 43 | 44 | 45 | def ConvertAnyAudio_to_wav(target_file_path:str, temp_dir_path:str): 46 | 47 | TARGET_FILE_FORMAT = "wav" 48 | 49 | if not os.path.exists(target_file_path) or not os.path.exists(temp_dir_path): 50 | return {"success":"false", "code":"invaid path"} 51 | 52 | target_file_extensions = target_file_path.split(".") 53 | target_file_extensions = target_file_extensions[len(target_file_extensions)-1] 54 | 55 | supported_formats = ["MP3","OGG","FLAC","AAC","AIFF","WMA","WAV", "M4A"] 56 | 57 | if target_file_extensions.upper() not in supported_formats: 58 | return {"success":"false", "code":"not supported file extensions"} 59 | 60 | LoadedAudio = AudioSegment.from_file(target_file_path, format=target_file_extensions) 61 | export_name = temp_dir_path+"exported_file_"+str(random.randint(1,999))+"."+TARGET_FILE_FORMAT 62 | 63 | LoadedAudio.export(export_name, format=TARGET_FILE_FORMAT) 64 | 65 | if os.path.exists(export_name): 66 | return {"success":"true", "path":str(export_name)} 67 | else: 68 | return { "success":"false", "code":"export error"} -------------------------------------------------------------------------------- /hivelibrary/identify/tc_number_tools.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | """ 4 | 01.12.2022 Developed By Prıme Security | Automatic Tc Number Calculator 5 | Github Page: https://github.com/MehmetYukselSekeroglu/tc-hesaplayici 6 | """ 7 | 8 | 9 | 10 | 11 | 12 | #girilen tc numarası matematiksel olarak geçerlimi kontrol eder 13 | def gecerlilik_kontrol(tc:str) -> dict: 14 | if len(tc) != 11: 15 | return { "success": False, "data":"TC numarası 11 hane olmadığı için geçerli değildir" } 16 | 17 | if not tc.isnumeric(): 18 | return { "success": False, "data":"Tc numarası nümerik olmadığı için geçerli değildir" } 19 | 20 | step_1 = int(tc[0]) + int(tc[2]) + int(tc[4]) + int(tc[6]) + int(tc[8]) 21 | step_1 = step_1 * 7 22 | 23 | step_2 = int(tc[1]) + int(tc[3]) + int(tc[5]) + int(tc[7]) 24 | step_2 = step_2 * 9 25 | 26 | final_indis_10 = step_1 + step_2 27 | final_indis_10 = final_indis_10 % 10 28 | final_indis_11 = 0 29 | 30 | for z in range(10): 31 | final_indis_11 = final_indis_11 + int(tc[z]) 32 | 33 | final_indis_10 = str(final_indis_10) 34 | final_indis_11=final_indis_11%10 35 | final_indis_11 = str(final_indis_11) 36 | 37 | if final_indis_10 == tc[9] and final_indis_11 == tc[10]: 38 | return { "success": True, "data":f"{str(tc)} numarası geçerlidir" } 39 | 40 | return { "success":False, "data":"Tc numarası geçerisz yapıdadır" } 41 | 42 | def kontrol_basamakları(ilk_9_indis): 43 | tc = str(ilk_9_indis) 44 | step_1 = int(tc[0]) + int(tc[2]) + int(tc[4]) + int(tc[6]) + int(tc[8]) 45 | step_1 = step_1 * 7 46 | 47 | step_2 = int(tc[1]) + int(tc[3]) + int(tc[5]) + int(tc[7]) 48 | step_2 = step_2 * 9 49 | 50 | final_indis_10 = step_1 + step_2 51 | final_indis_10 = final_indis_10 % 10 52 | final_indis_11 = 0 53 | tc=f"{tc}{final_indis_10}" 54 | for i in range(10): 55 | final_indis_11 = final_indis_11 + int(tc[i]) 56 | final_indis_10 = str(final_indis_10) 57 | final_indis_11 = final_indis_11 % 10 58 | final_indis_11 = str(final_indis_11) 59 | 60 | final= final_indis_10+final_indis_11 61 | return final 62 | 63 | 64 | 65 | def tc_uretici(uretilecek_tc,olustuma_adedi): 66 | olustuma_adedi = int(olustuma_adedi) 67 | ilk_9indis = uretilecek_tc[0:9] 68 | ilk_9indis = int(ilk_9indis) 69 | geriye_donuk = ilk_9indis 70 | ileri_donuk = ilk_9indis 71 | ileri_donuk_liste=[] 72 | geriye_donuk_liste=[] 73 | a = 0 74 | while (a <= int(olustuma_adedi)): 75 | geriye_donuk = geriye_donuk - 29999 76 | dondurulecek_deger = f"{geriye_donuk}{kontrol_basamakları(geriye_donuk)}" 77 | if gecerlilik_kontrol(dondurulecek_deger)["success"]: 78 | geriye_donuk_liste.append(dondurulecek_deger) 79 | a= a+1 80 | b = 0 81 | while (b <= int(olustuma_adedi)): 82 | ileri_donuk = ileri_donuk + 29999 83 | dondurulecek_deger = str(ileri_donuk)+str(kontrol_basamakları(ileri_donuk)) 84 | if gecerlilik_kontrol(dondurulecek_deger)["success"]: 85 | ileri_donuk_liste.append(dondurulecek_deger) 86 | b=b+1 87 | return ileri_donuk_liste,geriye_donuk_liste 88 | 89 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Project: TheHive v2 Remastred 3 | # Official GitHub Address: https://github.com/MehmetYukselSekeroglu/TheHive 4 | # Developed By Prime Security 5 | # Website primesecurity.net.tr ( cooming soon ) 6 | # Version: v2.1.0 Testing 7 | 8 | # external lib's 9 | import sys 10 | 11 | # importing hive toolkit 12 | from hivelibrary import console_tools 13 | from hivelibrary.banner import printBanner 14 | from hivelibrary.load_config import load_config_from_file 15 | from hivelibrary.consolePrint import p_error,p_info,p_warn 16 | printBanner() 17 | 18 | console_tools.InformationPrinter("importing TheHive library") 19 | from hivelibrary.env import * 20 | from hivelibrary import database_tools 21 | from hivelibrary import database_structure 22 | 23 | 24 | console_tools.InformationPrinter("Reading config file ...") 25 | 26 | ConfigData = load_config_from_file() 27 | 28 | if not ConfigData[0]: 29 | sys.exit(1) 30 | 31 | POSTGRESQL_CONFIG = ConfigData[1]["database_config"] 32 | 33 | 34 | console_tools.InformationPrinter("importing PyQt") 35 | # importing python packagets 36 | from PyQt5.QtWidgets import * 37 | 38 | console_tools.InformationPrinter("importing TheHive UI") 39 | # importing gui 40 | from guilib.login_controller import LoginScreen 41 | from guilib.new_account_controller import NewAccountScreen 42 | from guilib.main_controller import TheHive_mainPage 43 | 44 | 45 | os.makedirs(DEFAULT_TEMP_DIR,exist_ok=True) 46 | 47 | os.makedirs(DEFAULT_ROOT_DIR_NAME,exist_ok=True) 48 | 49 | # Start database connections 50 | DB_CNN , DB_CURSOR = database_tools.connection_function(POSTGRESQL_CONFIG) 51 | DBS_CONF = [DB_CNN, DB_CURSOR] 52 | 53 | 54 | 55 | 56 | 57 | 58 | console_tools.InformationPrinter("UI starting") 59 | if database_tools.check_db_init_status(*DBS_CONF) == False: 60 | console_tools.InformationPrinter(f"Database init started") 61 | console_tools.InformationPrinter("Inıting database schema") 62 | DB_CURSOR.execute(database_structure.POSTGRESQL_DATABASE_STRUCTURE) 63 | print(database_tools.insertData_systemTable(*DBS_CONF,sql_key=APPLICATION_VENDOR_KEY, key_value=APPLICATION_VENDOR_VALUE)) 64 | print(database_tools.insertData_systemTable(*DBS_CONF,sql_key=APPLICATION_NAME_KEY, key_value=APPLICATION_NAME_VALUE)) 65 | print(database_tools.insertData_systemTable(*DBS_CONF,sql_key=APPLICATION_VERSION_KEY, key_value=APPLICATION_VERSION_VALUE)) 66 | 67 | 68 | console_tools.InformationPrinter("Database alredy configurated") 69 | if database_tools.check_admin_is_generated(db_cursor=DB_CURSOR)["success"] == True: 70 | standartApp = QApplication([]) 71 | standartWindow = LoginScreen(sqlite_cnn=DB_CNN,sqlite_curosr=DB_CURSOR,targetWindow=TheHive_mainPage,MainConfig=ConfigData) 72 | standartWindow.show() 73 | standartApp.exec_() 74 | 75 | else: 76 | console_tools.InformationPrinter("admin account not be detect starting account manager") 77 | firstStartApp = QApplication([]) 78 | firstStartWindow = NewAccountScreen(db_connections=DB_CNN,db_cursor=DB_CURSOR,targetWindow=TheHive_mainPage,MainConfig=ConfigData) 79 | firstStartWindow.show() 80 | firstStartApp.exec_() 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /hivelibrary/hts_toolkit/format_detector.py: -------------------------------------------------------------------------------- 1 | from openpyxl import load_workbook 2 | 3 | 4 | 5 | 6 | 7 | 8 | class HtsToolkit(): 9 | supported_formats = ["BTK_BASIC_1","BTK_STANDARD_1"] 10 | not_support_returner = "UNSUPPORTED" 11 | def __init__(self): 12 | pass 13 | 14 | def detect_hts_record_formats(self,targetFilePath:str) -> str: 15 | # Check is excel file or other file[s] 16 | try: 17 | workbook = load_workbook(targetFilePath) 18 | workbook.close() 19 | except Exception as err: 20 | return self.not_support_returner 21 | 22 | workBook = load_workbook(targetFilePath) 23 | workSheet = workbook.active 24 | 25 | try: 26 | # Ckeck for BTK_BASIC_1 27 | id_is = str(workSheet.cell(53,1).value) 28 | tarih = workSheet.cell(53,2).value 29 | imei = str(workSheet.cell(53,3).value) 30 | numara = str(workSheet.cell(53,4).value) 31 | control_basamak = workSheet.cell(53,5).value 32 | imei_proccessed = imei.replace("-","") 33 | imei_proccessed = imei_proccessed.replace(" ","") 34 | workBook.close() 35 | if id_is != None and tarih != None and imei != None and numara != None and control_basamak == None: 36 | if id_is.isnumeric() and imei_proccessed.isnumeric() and len(imei_proccessed) == 15: 37 | return "BTK_BASIC_1" 38 | 39 | except Exception as err: 40 | pass 41 | 42 | 43 | try: 44 | # Check for BTK_STANDARD_1 45 | id_is = str(workSheet.cell(52,1).value) 46 | source_number = str(workSheet.cell(52,2).value) 47 | islem_tipi = str(workSheet.cell(52,3).value) 48 | karsi_numara = str(workSheet.cell(52,4).value) 49 | islem_tarihi = str(workSheet.cell(52,5).value) 50 | islem_süresi = str(workSheet.cell(52,6).value) 51 | hedef_numara_ad_soyad = str(workSheet.cell(52,7).value) 52 | hedef_numara_tc_numarası = str(workSheet.cell(52,8).value) 53 | source_imei = str(workSheet.cell(52,9).value) 54 | islemGerceklesenBaz = str(workSheet.cell(52,10).value) 55 | control_basamak = workSheet.cell(52,11).value 56 | 57 | imei_proccessed = source_imei.replace("-","") 58 | imei_proccessed = imei_proccessed.replace(" ","") 59 | workBook.close() 60 | 61 | 62 | if id_is != None and islem_tarihi != None and source_imei != None and source_number != None and control_basamak == None and islem_tipi != None and islem_süresi != None and karsi_numara != None: 63 | if id_is.isnumeric() and imei_proccessed.isnumeric() and len(imei_proccessed) == 15: 64 | return "BTK_STANDARD_1" 65 | 66 | except Exception as err: 67 | pass 68 | 69 | 70 | return self.not_support_returner 71 | 72 | if __name__ == "__main__": 73 | import sys 74 | targetFile = sys.argv[1] 75 | readerTool = HtsToolkit() 76 | print(readerTool.detect_hts_record_formats(targetFilePath=targetFile)) -------------------------------------------------------------------------------- /guilib/coomingSoonScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/coomingSoonScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_CoomingSoonScreen(object): 15 | def setupUi(self, CoomingSoonScreen): 16 | CoomingSoonScreen.setObjectName("CoomingSoonScreen") 17 | CoomingSoonScreen.resize(883, 421) 18 | icon = QtGui.QIcon() 19 | icon.addPixmap(QtGui.QPixmap(":/mainLogo/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 20 | CoomingSoonScreen.setWindowIcon(icon) 21 | self.gridLayout = QtWidgets.QGridLayout(CoomingSoonScreen) 22 | self.gridLayout.setObjectName("gridLayout") 23 | self.widget = QtWidgets.QWidget(CoomingSoonScreen) 24 | self.widget.setObjectName("widget") 25 | self.gridLayout_2 = QtWidgets.QGridLayout(self.widget) 26 | self.gridLayout_2.setObjectName("gridLayout_2") 27 | self.label_title = QtWidgets.QLabel(self.widget) 28 | self.label_title.setStyleSheet("font: 11pt \"Hack\";") 29 | self.label_title.setObjectName("label_title") 30 | self.gridLayout_2.addWidget(self.label_title, 0, 0, 1, 1) 31 | self.gridLayout.addWidget(self.widget, 0, 0, 1, 1) 32 | self.textBrowser_infotmationPage = QtWidgets.QTextBrowser(CoomingSoonScreen) 33 | self.textBrowser_infotmationPage.setStyleSheet("font: 11pt \"Hack\";") 34 | self.textBrowser_infotmationPage.setObjectName("textBrowser_infotmationPage") 35 | self.gridLayout.addWidget(self.textBrowser_infotmationPage, 1, 0, 1, 1) 36 | 37 | self.retranslateUi(CoomingSoonScreen) 38 | QtCore.QMetaObject.connectSlotsByName(CoomingSoonScreen) 39 | 40 | def retranslateUi(self, CoomingSoonScreen): 41 | _translate = QtCore.QCoreApplication.translate 42 | CoomingSoonScreen.setWindowTitle(_translate("CoomingSoonScreen", "Form")) 43 | self.label_title.setText(_translate("CoomingSoonScreen", "

This Future Not Available This Version

")) 44 | self.textBrowser_infotmationPage.setHtml(_translate("CoomingSoonScreen", "\n" 45 | "\n" 48 | "


")) 49 | import main_icon_files_rc 50 | 51 | 52 | if __name__ == "__main__": 53 | import sys 54 | app = QtWidgets.QApplication(sys.argv) 55 | CoomingSoonScreen = QtWidgets.QWidget() 56 | ui = Ui_CoomingSoonScreen() 57 | ui.setupUi(CoomingSoonScreen) 58 | CoomingSoonScreen.show() 59 | sys.exit(app.exec_()) 60 | -------------------------------------------------------------------------------- /guilib/HtsAnalaysis_controller.py: -------------------------------------------------------------------------------- 1 | from hivelibrary.env import DEFAULT_TEMP_DIR 2 | from guilib.HtsAnalaysisScreen import Ui_HTSanalaysis 3 | 4 | from PyQt5.QtWidgets import * 5 | from PyQt5.QtCore import QUrl, QThread,pyqtSignal 6 | 7 | 8 | import folium 9 | import os 10 | import io 11 | import time 12 | import datetime 13 | 14 | from guilib.html_text_generator.html_draft import gen_error_text,gen_info_text 15 | from hivelibrary.file_operations.file_information import sizeMB 16 | from hivelibrary.hash_tools import file_hash_sha1 17 | from hivelibrary.hts_toolkit.format_detector import HtsToolkit 18 | 19 | 20 | class HTS_analaysisWidget(QWidget): 21 | def __init__(self): 22 | super().__init__() 23 | 24 | self.HTS_analaysis = Ui_HTSanalaysis() 25 | self.HTS_analaysis.setupUi(self) 26 | self.setWindowTitle("HTS Analiz Ekranı") 27 | 28 | 29 | self.HTS_analaysis.pushButton_selectFile.clicked.connect(self.selectAnyFile) 30 | self.HTS_analaysis.pushButton_clearAll.clicked.connect(self.clearAllOutputs) 31 | 32 | self.selectedTargetFilePath = None 33 | self.isSupportedFormat = None 34 | self.HTStool = HtsToolkit() 35 | self.BackendAnalaysThread = QThread() 36 | 37 | 38 | def checkFormat(self) -> None: 39 | pass 40 | 41 | def startAnalays(self) -> None: 42 | pass 43 | 44 | def stopAnalays(self) -> None: 45 | pass 46 | 47 | def threadSignalHandler(self) -> None: 48 | pass 49 | 50 | 51 | def clearAllOutputs(self) -> None: 52 | self.selectedTargetFilePath = None 53 | self.isSupportedFormat = None 54 | 55 | self.HTS_analaysis.textBrowser_targetFileSize.clear() 56 | self.HTS_analaysis.textBrowser_logConsole_tab1.setText("LOG CONSOLE:") 57 | self.HTS_analaysis.textBrowser_targetFileFormatStatus.clear() 58 | self.HTS_analaysis.textBrowser_targetFilePathShow.clear() 59 | self.HTS_analaysis.textBrowser_targetFileSha1Hash.clear() 60 | 61 | 62 | def selectAnyFile(self) -> None: 63 | fileSelector = QFileDialog() 64 | fileSelector.setNameFilter("File (*.*)") 65 | 66 | if fileSelector.exec_(): 67 | self.selectedTargetFilePath = fileSelector.selectedFiles()[0] 68 | 69 | if self.selectedTargetFilePath == None or not os.path.exists(str(self.selectedTargetFilePath)): 70 | self.HTS_analaysis.textBrowser_targetFilePathShow.setText(gen_error_text("Ivalid file selections, proccess stopped")) 71 | self.selectedTargetFilePath = None 72 | return 73 | 74 | self.HTS_analaysis.textBrowser_targetFilePathShow.setText(str(self.selectedTargetFilePath)) 75 | self.HTS_analaysis.textBrowser_targetFileSha1Hash.setText(file_hash_sha1(self.selectedTargetFilePath)) 76 | self.HTS_analaysis.textBrowser_targetFileSize.setText(f"{sizeMB(self.selectedTargetFilePath)}") 77 | 78 | detectedFormat = self.HTStool.detect_hts_record_formats(targetFilePath=self.selectedTargetFilePath) 79 | 80 | if detectedFormat == "UNSUPPORTED": 81 | self.HTS_analaysis.textBrowser_targetFileFormatStatus.setText("Desteklenmeyen dosya formatı.") 82 | return 83 | 84 | self.HTS_analaysis.textBrowser_targetFileFormatStatus.setText(detectedFormat) 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /raw_ui_files/RsaToolkitScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 944 10 | 631 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 0 24 | 25 | 26 | 27 | Encrypte And Decrypte 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 230 39 | 0 40 | 301 41 | 31 42 | 43 | 44 | 45 | 46 | 47 | 48 | 20 49 | 10 50 | 161 51 | 21 52 | 53 | 54 | 55 | Selected Keys 56 | 57 | 58 | 59 | 60 | 61 | 410 62 | 210 63 | 201 64 | 31 65 | 66 | 67 | 68 | start 69 | 70 | 71 | 72 | 73 | 74 | 230 75 | 40 76 | 231 77 | 31 78 | 79 | 80 | 81 | 82 | Encrypte 83 | 84 | 85 | 86 | 87 | Decrypte 88 | 89 | 90 | 91 | 92 | 93 | 94 | 20 95 | 50 96 | 131 97 | 16 98 | 99 | 100 | 101 | Proccess 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | Key Management 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /guilib/IPtracerBasicScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/StaticIPtracerScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_IPTracerWidget_ipinfoio(object): 15 | def setupUi(self, IPTracerWidget_ipinfoio): 16 | IPTracerWidget_ipinfoio.setObjectName("IPTracerWidget_ipinfoio") 17 | IPTracerWidget_ipinfoio.resize(866, 514) 18 | self.gridLayout_2 = QtWidgets.QGridLayout(IPTracerWidget_ipinfoio) 19 | self.gridLayout_2.setObjectName("gridLayout_2") 20 | self.widget = QtWidgets.QWidget(IPTracerWidget_ipinfoio) 21 | self.widget.setMinimumSize(QtCore.QSize(391, 0)) 22 | self.widget.setObjectName("widget") 23 | self.gridLayout = QtWidgets.QGridLayout(self.widget) 24 | self.gridLayout.setObjectName("gridLayout") 25 | self.label = QtWidgets.QLabel(self.widget) 26 | self.label.setObjectName("label") 27 | self.gridLayout.addWidget(self.label, 0, 0, 1, 2) 28 | self.label_2 = QtWidgets.QLabel(self.widget) 29 | self.label_2.setObjectName("label_2") 30 | self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) 31 | self.lineEdit_ipInput = QtWidgets.QLineEdit(self.widget) 32 | self.lineEdit_ipInput.setObjectName("lineEdit_ipInput") 33 | self.gridLayout.addWidget(self.lineEdit_ipInput, 2, 0, 1, 2) 34 | self.pushButton_startQuery = QtWidgets.QPushButton(self.widget) 35 | self.pushButton_startQuery.setObjectName("pushButton_startQuery") 36 | self.gridLayout.addWidget(self.pushButton_startQuery, 3, 0, 1, 1) 37 | self.pushButton_clearResults = QtWidgets.QPushButton(self.widget) 38 | self.pushButton_clearResults.setObjectName("pushButton_clearResults") 39 | self.gridLayout.addWidget(self.pushButton_clearResults, 3, 1, 1, 1) 40 | self.gridLayout_2.addWidget(self.widget, 0, 1, 1, 1) 41 | self.textBrowser_logConsole = QtWidgets.QTextBrowser(IPTracerWidget_ipinfoio) 42 | self.textBrowser_logConsole.setObjectName("textBrowser_logConsole") 43 | self.gridLayout_2.addWidget(self.textBrowser_logConsole, 1, 1, 1, 1) 44 | self.webView_mapView = QtWebEngineWidgets.QWebEngineView(IPTracerWidget_ipinfoio) 45 | self.webView_mapView.setMinimumSize(QtCore.QSize(400, 0)) 46 | self.webView_mapView.setUrl(QtCore.QUrl("about:blank")) 47 | self.webView_mapView.setObjectName("webView_mapView") 48 | self.gridLayout_2.addWidget(self.webView_mapView, 0, 0, 2, 1) 49 | 50 | self.retranslateUi(IPTracerWidget_ipinfoio) 51 | QtCore.QMetaObject.connectSlotsByName(IPTracerWidget_ipinfoio) 52 | 53 | def retranslateUi(self, IPTracerWidget_ipinfoio): 54 | _translate = QtCore.QCoreApplication.translate 55 | IPTracerWidget_ipinfoio.setWindowTitle(_translate("IPTracerWidget_ipinfoio", "Form")) 56 | self.label.setText(_translate("IPTracerWidget_ipinfoio", "

IP Tracer | ipinfo.io

")) 57 | self.label_2.setText(_translate("IPTracerWidget_ipinfoio", "Target IP:")) 58 | self.pushButton_startQuery.setText(_translate("IPTracerWidget_ipinfoio", "Start")) 59 | self.pushButton_clearResults.setText(_translate("IPTracerWidget_ipinfoio", "Clear")) 60 | from PyQt5 import QtWebEngineWidgets 61 | 62 | 63 | if __name__ == "__main__": 64 | import sys 65 | app = QtWidgets.QApplication(sys.argv) 66 | IPTracerWidget_ipinfoio = QtWidgets.QWidget() 67 | ui = Ui_IPTracerWidget_ipinfoio() 68 | ui.setupUi(IPTracerWidget_ipinfoio) 69 | IPTracerWidget_ipinfoio.show() 70 | sys.exit(app.exec_()) 71 | -------------------------------------------------------------------------------- /raw_ui_files/TcNumberValidationCheckerScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | TcValidatorScreen 4 | 5 | 6 | 7 | 0 8 | 0 9 | 957 10 | 648 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | :/mainLogo/logo.png:/mainLogo/logo.png 19 | 20 | 21 | 22 | 23 | 24 | font: 11pt "Hack"; 25 | 26 | 27 | Enter Tc Number: 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 131 36 | 31 37 | 38 | 39 | 40 | 41 | 131 42 | 31 43 | 44 | 45 | 46 | font: 11pt "Hack"; 47 | 48 | 49 | Check 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 591 58 | 31 59 | 60 | 61 | 62 | 63 | 591 64 | 31 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 73 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 74 | p, li { white-space: pre-wrap; } 75 | </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> 76 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">LOG AND RESULTS:</span></p></body></html> 77 | 78 | 79 | 80 | 81 | 82 | 83 | font: 11pt "Hack"; 84 | 85 | 86 | <html><head/><body><p align="center">TC Validator</p></body></html> 87 | 88 | 89 | 90 | 91 | 92 | 93 | Qt::Vertical 94 | 95 | 96 | 97 | 20 98 | 40 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /guilib/changePassword_controller.py: -------------------------------------------------------------------------------- 1 | from guilib.changePassworScreen import Ui_changePassword 2 | from hivelibrary import database_tools 3 | from PyQt5.QtWidgets import * 4 | 5 | class PasswordChangePage(QWidget): 6 | def __init__(self, db_connections, db_cursor): 7 | super().__init__() 8 | 9 | # temel sistemin kurulması 10 | self.passwordChangeWidget = Ui_changePassword() 11 | self.passwordChangeWidget.setupUi(self) 12 | self.setWindowTitle(f"Password Change") 13 | 14 | 15 | # Veritabanı objelerinin atanması 16 | self.db_connections = db_connections 17 | self.db_cursor = db_cursor 18 | 19 | 20 | # buton sinyallerinin slotlara bağlanması 21 | self.passwordChangeWidget.pushButton_cancelChangeProccess.clicked.connect(self.cancelProcess) 22 | self.passwordChangeWidget.pushButton_runChange.clicked.connect(self.changePassword) 23 | 24 | 25 | def changePassword(self): 26 | 27 | # Veri girişlerinin alınması 28 | old_password_input = self.passwordChangeWidget.lineEdit_oldPassword_input.text() 29 | new_password_input = self.passwordChangeWidget.lineEdit_newPassword_input.text() 30 | new_password_confirm_input = self.passwordChangeWidget.lineEdit_newPasswordConfirm_input.text() 31 | user_username = self.passwordChangeWidget.lineEdit_username_input.text() 32 | 33 | 34 | # girdilerin kontrol edilmesi uzunluk vs. 35 | if len(old_password_input) < 1 or len(new_password_input) < 1 or len(new_password_confirm_input) <1 or len(user_username) <1: 36 | err_text = f"Status: Failed, no password or username input" 37 | self.passwordChangeWidget.label_changeStatusBar.setText(err_text) 38 | self.clearAll_input() 39 | return 40 | 41 | # girilen parola gerçekten kullanıcıya aitmi kontrol edilir 42 | check_is_authenticated = database_tools.is_authenticated(username=user_username,password=old_password_input,db_cursor=self.db_cursor) 43 | 44 | 45 | # Yetki kontrol isteğinin sonucu kontrol edilir 46 | if check_is_authenticated["success"] != True: 47 | err_text = f"Status: Invalid old password or username" 48 | self.passwordChangeWidget.label_changeStatusBar.setText(err_text) 49 | self.clearAll_input() 50 | return 51 | 52 | # Yeni parola ve doğrulama parolası eşleşiyormu kontrol edilir 53 | if new_password_input != new_password_confirm_input: 54 | err_text = f"Status: New passwords do not match!" 55 | self.passwordChangeWidget.label_changeStatusBar.setText(err_text) 56 | self.clearAll_input() 57 | return 58 | 59 | # gereksinimler tammalandıysa sistem api sine değişim isteği gönderilir 60 | results = database_tools.change_admin_password(username=user_username,new_password=new_password_input,db=self.db_connections,db_cursor=self.db_cursor) 61 | 62 | 63 | # api den gelen sonuç başarılımı kontrol edilir 64 | if results["success"] != True: 65 | err_text = f"Status: database error, try after!" 66 | self.passwordChangeWidget.label_changeStatusBar.setText(err_text) 67 | self.clearAll_input() 68 | return 69 | 70 | # işlem başarılı ise geri dönüş yapılır kullanıcıya 71 | err_text = f"Status: password successfuly changed!" 72 | self.passwordChangeWidget.label_changeStatusBar.setText(err_text) 73 | self.clearAll_input() 74 | 75 | 76 | 77 | def clearAll_input(self): 78 | 79 | # Bütün verilerin temizlenmesi 80 | self.passwordChangeWidget.lineEdit_oldPassword_input.clear() 81 | self.passwordChangeWidget.lineEdit_newPassword_input.clear() 82 | self.passwordChangeWidget.lineEdit_newPasswordConfirm_input.clear() 83 | return 84 | 85 | 86 | def cancelProcess(self): 87 | 88 | # işlem iptal etmek istenirse 89 | self.hide() -------------------------------------------------------------------------------- /raw_ui_files/ApiKeyConfigurationOnlyKeyScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ApiKeyConfScreen 4 | 5 | 6 | 7 | 0 8 | 0 9 | 534 10 | 142 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | font: 11pt "Hack"; 21 | 22 | 23 | Api Key: 24 | 25 | 26 | 27 | 28 | 29 | 30 | font: 11pt "Hack"; 31 | 32 | 33 | Start Configuration 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 330 42 | 31 43 | 44 | 45 | 46 | font: 11pt "Hack"; 47 | 48 | 49 | 50 | 51 | 52 | 53 | font: 11pt "Hack"; 54 | 55 | 56 | Exit 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 0 65 | 0 66 | 67 | 68 | 69 | 70 | 0 71 | 0 72 | 73 | 74 | 75 | font: 12pt "Hack"; 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 0 87 | 0 88 | 89 | 90 | 91 | font: 11pt "Hack"; 92 | 93 | 94 | Status: 95 | 96 | 97 | 98 | 99 | 100 | 101 | font: 11pt "Hack"; 102 | 103 | 104 | <html><head/><body><p align="center"><span style=" font-weight:600;">Configure Api Key</span></p></body></html> 105 | 106 | 107 | 108 | 109 | 110 | 111 | Qt::Vertical 112 | 113 | 114 | 115 | 20 116 | 40 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /guilib/TcNumberValidationCheckerScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/TcNumberValidationCheckerScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_TcValidatorScreen(object): 15 | def setupUi(self, TcValidatorScreen): 16 | TcValidatorScreen.setObjectName("TcValidatorScreen") 17 | TcValidatorScreen.resize(957, 648) 18 | icon = QtGui.QIcon() 19 | icon.addPixmap(QtGui.QPixmap(":/mainLogo/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 20 | TcValidatorScreen.setWindowIcon(icon) 21 | self.gridLayout = QtWidgets.QGridLayout(TcValidatorScreen) 22 | self.gridLayout.setObjectName("gridLayout") 23 | self.label_2 = QtWidgets.QLabel(TcValidatorScreen) 24 | self.label_2.setStyleSheet("font: 11pt \"Hack\";") 25 | self.label_2.setObjectName("label_2") 26 | self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) 27 | self.pushButton_runValidationChecker = QtWidgets.QPushButton(TcValidatorScreen) 28 | self.pushButton_runValidationChecker.setMinimumSize(QtCore.QSize(131, 31)) 29 | self.pushButton_runValidationChecker.setMaximumSize(QtCore.QSize(131, 31)) 30 | self.pushButton_runValidationChecker.setStyleSheet("font: 11pt \"Hack\";") 31 | self.pushButton_runValidationChecker.setObjectName("pushButton_runValidationChecker") 32 | self.gridLayout.addWidget(self.pushButton_runValidationChecker, 1, 2, 1, 1) 33 | self.lineEdit_tcInput = QtWidgets.QLineEdit(TcValidatorScreen) 34 | self.lineEdit_tcInput.setMinimumSize(QtCore.QSize(591, 31)) 35 | self.lineEdit_tcInput.setMaximumSize(QtCore.QSize(591, 31)) 36 | self.lineEdit_tcInput.setObjectName("lineEdit_tcInput") 37 | self.gridLayout.addWidget(self.lineEdit_tcInput, 1, 1, 1, 1) 38 | self.textBrowser_logConsole = QtWidgets.QTextBrowser(TcValidatorScreen) 39 | self.textBrowser_logConsole.setObjectName("textBrowser_logConsole") 40 | self.gridLayout.addWidget(self.textBrowser_logConsole, 3, 0, 1, 3) 41 | self.label = QtWidgets.QLabel(TcValidatorScreen) 42 | self.label.setStyleSheet("font: 11pt \"Hack\";") 43 | self.label.setObjectName("label") 44 | self.gridLayout.addWidget(self.label, 0, 0, 1, 3) 45 | spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 46 | self.gridLayout.addItem(spacerItem, 2, 0, 1, 1) 47 | 48 | self.retranslateUi(TcValidatorScreen) 49 | QtCore.QMetaObject.connectSlotsByName(TcValidatorScreen) 50 | 51 | def retranslateUi(self, TcValidatorScreen): 52 | _translate = QtCore.QCoreApplication.translate 53 | TcValidatorScreen.setWindowTitle(_translate("TcValidatorScreen", "Form")) 54 | self.label_2.setText(_translate("TcValidatorScreen", "Enter Tc Number:")) 55 | self.pushButton_runValidationChecker.setText(_translate("TcValidatorScreen", "Check")) 56 | self.textBrowser_logConsole.setHtml(_translate("TcValidatorScreen", "\n" 57 | "\n" 60 | "

LOG AND RESULTS:

")) 61 | self.label.setText(_translate("TcValidatorScreen", "

TC Validator

")) 62 | import main_icon_files_rc 63 | 64 | 65 | if __name__ == "__main__": 66 | import sys 67 | app = QtWidgets.QApplication(sys.argv) 68 | TcValidatorScreen = QtWidgets.QWidget() 69 | ui = Ui_TcValidatorScreen() 70 | ui.setupUi(TcValidatorScreen) 71 | TcValidatorScreen.show() 72 | sys.exit(app.exec_()) 73 | -------------------------------------------------------------------------------- /guilib/external_thread_modules/FaceRecognitionManuelDatabaseSearch.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtCore import QThread, pyqtSignal 2 | from guilib.html_text_generator.html_draft import gen_error_text,gen_info_text 3 | from hivelibrary.env import DB_FACE_RECOGNITION_TABLE 4 | 5 | class manuelDatabaseSearcherThread(QThread): 6 | threadSignal = pyqtSignal(dict) 7 | 8 | 9 | def __init__(self, db_cnn, db_curosr,search_keywords:str, selected_search:int): 10 | super().__init__() 11 | 12 | 13 | self.databaseConnections = db_cnn 14 | self.databaseCursor = db_curosr 15 | self.searchKeyword = search_keywords 16 | self.searchType = selected_search 17 | 18 | 19 | def __status(self,text): 20 | data_dict = { "success":None, "end":False, "text":text, "data":None } 21 | self.threadSignal.emit(data_dict) 22 | 23 | 24 | 25 | def __finaly(self, success_status:bool, data, text:str): 26 | data_dict = {"success":success_status, "end":True, "data":data, "text":text} 27 | self.threadSignal.emit(data_dict) 28 | 29 | 30 | 31 | def run(self): 32 | self.__status(text=gen_info_text("Arama işlemi başladıldı.")) 33 | if self.searchType == 0: 34 | STATIC_SQL_COMMAND = f"SELECT * FROM {DB_FACE_RECOGNITION_TABLE} WHERE face_name LIKE %s" 35 | searchString = "%"+str(self.searchKeyword)+"%" 36 | STATIC_DATA_TUPLE = (searchString, ) 37 | 38 | try: 39 | self.databaseCursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE) 40 | resutls = self.databaseCursor.fetchall() 41 | if len(resutls) < 1: 42 | self.__finaly(success_status=False,data=None,text=gen_error_text("ilgili terim için veritabanında sonuç bulunamadı")) 43 | return 44 | 45 | self.__finaly(success_status=True,data=resutls,text=gen_info_text(f"İşlem başarıyla tamamlandı, toplam {len(resutls)} sonuç var.")) 46 | return 47 | except Exception as err: 48 | self.__finaly(success_status=False, data=None,text=gen_error_text(f"İşlem sistemsel hata nedeniyle başarısız oldu, sebep {err}")) 49 | return 50 | 51 | 52 | # resim sha1 ile arama 53 | if self.searchType == 1: 54 | STATIC_SQL_COMMAND = f"SELECT * FROM {DB_FACE_RECOGNITION_TABLE} WHERE picture_sha1_hash LIKE %s" 55 | searchString = "%"+str(self.searchKeyword)+"%" 56 | STATIC_DATA_TUPLE = (searchString, ) 57 | 58 | try: 59 | self.databaseCursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE) 60 | resutls = self.databaseCursor.fetchall() 61 | if len(resutls) < 1: 62 | self.__finaly(success_status=False,data=None,text=gen_error_text("ilgili terim için veritabanında sonuç bulunamadı")) 63 | return 64 | 65 | self.__finaly(success_status=True,data=resutls,text=gen_info_text(f"İşlem başarıyla tamamlandı, toplam {len(resutls)} sonuç var.")) 66 | return 67 | except Exception as err: 68 | self.__finaly(success_status=False, data=None,text=gen_error_text(f"İşlem sistemsel hata nedeniyle başarısız oldu, sebep {err}")) 69 | return 70 | 71 | # tüm kayıtları getirme 72 | if self.searchType == 2: 73 | STATIC_SQL_COMMAND = f"SELECT * FROM {DB_FACE_RECOGNITION_TABLE}" 74 | try: 75 | self.databaseCursor.execute(STATIC_SQL_COMMAND) 76 | resutls = self.databaseCursor.fetchall() 77 | if len(resutls) < 1: 78 | self.__finaly(success_status=False,data=None,text=gen_error_text("ilgili terim için veritabanında sonuç bulunamadı")) 79 | return 80 | 81 | self.__finaly(success_status=True,data=resutls,text=gen_info_text(f"İşlem başarıyla tamamlandı, toplam {len(resutls)} sonuç var.")) 82 | return 83 | except Exception as err: 84 | self.__finaly(success_status=False, data=None,text=gen_error_text(f"İşlem sistemsel hata nedeniyle başarısız oldu, sebep {err}")) 85 | return 86 | -------------------------------------------------------------------------------- /guilib/ShodanApiKeyConfigurationScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/ApiKeyConfigurationOnlyKeyScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_ApiKeyConfScreen(object): 15 | def setupUi(self, ApiKeyConfScreen): 16 | ApiKeyConfScreen.setObjectName("ApiKeyConfScreen") 17 | ApiKeyConfScreen.resize(534, 142) 18 | self.gridLayout = QtWidgets.QGridLayout(ApiKeyConfScreen) 19 | self.gridLayout.setObjectName("gridLayout") 20 | self.label_2 = QtWidgets.QLabel(ApiKeyConfScreen) 21 | self.label_2.setStyleSheet("font: 11pt \"Hack\";") 22 | self.label_2.setObjectName("label_2") 23 | self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1) 24 | self.pushButton_startConfiguration = QtWidgets.QPushButton(ApiKeyConfScreen) 25 | self.pushButton_startConfiguration.setStyleSheet("font: 11pt \"Hack\";") 26 | self.pushButton_startConfiguration.setObjectName("pushButton_startConfiguration") 27 | self.gridLayout.addWidget(self.pushButton_startConfiguration, 4, 0, 1, 1) 28 | self.lineEdit_apiKeyInput = QtWidgets.QLineEdit(ApiKeyConfScreen) 29 | self.lineEdit_apiKeyInput.setMinimumSize(QtCore.QSize(330, 31)) 30 | self.lineEdit_apiKeyInput.setStyleSheet("font: 11pt \"Hack\";") 31 | self.lineEdit_apiKeyInput.setObjectName("lineEdit_apiKeyInput") 32 | self.gridLayout.addWidget(self.lineEdit_apiKeyInput, 2, 1, 1, 3) 33 | self.pushButton_exitScreen = QtWidgets.QPushButton(ApiKeyConfScreen) 34 | self.pushButton_exitScreen.setStyleSheet("font: 11pt \"Hack\";") 35 | self.pushButton_exitScreen.setObjectName("pushButton_exitScreen") 36 | self.gridLayout.addWidget(self.pushButton_exitScreen, 4, 1, 1, 1) 37 | self.label_apiServiceInfoMessage = QtWidgets.QLabel(ApiKeyConfScreen) 38 | self.label_apiServiceInfoMessage.setMinimumSize(QtCore.QSize(0, 0)) 39 | self.label_apiServiceInfoMessage.setMaximumSize(QtCore.QSize(0, 0)) 40 | self.label_apiServiceInfoMessage.setStyleSheet("font: 12pt \"Hack\";") 41 | self.label_apiServiceInfoMessage.setText("") 42 | self.label_apiServiceInfoMessage.setObjectName("label_apiServiceInfoMessage") 43 | self.gridLayout.addWidget(self.label_apiServiceInfoMessage, 1, 0, 1, 4) 44 | self.label_3 = QtWidgets.QLabel(ApiKeyConfScreen) 45 | self.label_3.setMinimumSize(QtCore.QSize(0, 0)) 46 | self.label_3.setStyleSheet("font: 11pt \"Hack\";") 47 | self.label_3.setObjectName("label_3") 48 | self.gridLayout.addWidget(self.label_3, 3, 0, 1, 2) 49 | self.label = QtWidgets.QLabel(ApiKeyConfScreen) 50 | self.label.setStyleSheet("font: 11pt \"Hack\";") 51 | self.label.setObjectName("label") 52 | self.gridLayout.addWidget(self.label, 0, 0, 1, 4) 53 | spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 54 | self.gridLayout.addItem(spacerItem, 5, 1, 1, 1) 55 | 56 | self.retranslateUi(ApiKeyConfScreen) 57 | QtCore.QMetaObject.connectSlotsByName(ApiKeyConfScreen) 58 | 59 | def retranslateUi(self, ApiKeyConfScreen): 60 | _translate = QtCore.QCoreApplication.translate 61 | ApiKeyConfScreen.setWindowTitle(_translate("ApiKeyConfScreen", "Form")) 62 | self.label_2.setText(_translate("ApiKeyConfScreen", "Api Key:")) 63 | self.pushButton_startConfiguration.setText(_translate("ApiKeyConfScreen", "Start Configuration")) 64 | self.pushButton_exitScreen.setText(_translate("ApiKeyConfScreen", "Exit")) 65 | self.label_3.setText(_translate("ApiKeyConfScreen", "Status:")) 66 | self.label.setText(_translate("ApiKeyConfScreen", "

Configure Api Key

")) 67 | 68 | 69 | if __name__ == "__main__": 70 | import sys 71 | app = QtWidgets.QApplication(sys.argv) 72 | ApiKeyConfScreen = QtWidgets.QWidget() 73 | ui = Ui_ApiKeyConfScreen() 74 | ui.setupUi(ApiKeyConfScreen) 75 | ApiKeyConfScreen.show() 76 | sys.exit(app.exec_()) 77 | -------------------------------------------------------------------------------- /guilib/VirusTotalApiKeyConfigurationScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/ApiKeyConfigurationOnlyKeyScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_ApiKeyConfScreen(object): 15 | def setupUi(self, ApiKeyConfScreen): 16 | ApiKeyConfScreen.setObjectName("ApiKeyConfScreen") 17 | ApiKeyConfScreen.resize(534, 142) 18 | self.gridLayout = QtWidgets.QGridLayout(ApiKeyConfScreen) 19 | self.gridLayout.setObjectName("gridLayout") 20 | self.label_2 = QtWidgets.QLabel(ApiKeyConfScreen) 21 | self.label_2.setStyleSheet("font: 11pt \"Hack\";") 22 | self.label_2.setObjectName("label_2") 23 | self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1) 24 | self.pushButton_startConfiguration = QtWidgets.QPushButton(ApiKeyConfScreen) 25 | self.pushButton_startConfiguration.setStyleSheet("font: 11pt \"Hack\";") 26 | self.pushButton_startConfiguration.setObjectName("pushButton_startConfiguration") 27 | self.gridLayout.addWidget(self.pushButton_startConfiguration, 4, 0, 1, 1) 28 | self.lineEdit_apiKeyInput = QtWidgets.QLineEdit(ApiKeyConfScreen) 29 | self.lineEdit_apiKeyInput.setMinimumSize(QtCore.QSize(330, 31)) 30 | self.lineEdit_apiKeyInput.setStyleSheet("font: 11pt \"Hack\";") 31 | self.lineEdit_apiKeyInput.setObjectName("lineEdit_apiKeyInput") 32 | self.gridLayout.addWidget(self.lineEdit_apiKeyInput, 2, 1, 1, 3) 33 | self.pushButton_exitScreen = QtWidgets.QPushButton(ApiKeyConfScreen) 34 | self.pushButton_exitScreen.setStyleSheet("font: 11pt \"Hack\";") 35 | self.pushButton_exitScreen.setObjectName("pushButton_exitScreen") 36 | self.gridLayout.addWidget(self.pushButton_exitScreen, 4, 1, 1, 1) 37 | self.label_apiServiceInfoMessage = QtWidgets.QLabel(ApiKeyConfScreen) 38 | self.label_apiServiceInfoMessage.setMinimumSize(QtCore.QSize(0, 0)) 39 | self.label_apiServiceInfoMessage.setMaximumSize(QtCore.QSize(0, 0)) 40 | self.label_apiServiceInfoMessage.setStyleSheet("font: 12pt \"Hack\";") 41 | self.label_apiServiceInfoMessage.setText("") 42 | self.label_apiServiceInfoMessage.setObjectName("label_apiServiceInfoMessage") 43 | self.gridLayout.addWidget(self.label_apiServiceInfoMessage, 1, 0, 1, 4) 44 | self.label_3 = QtWidgets.QLabel(ApiKeyConfScreen) 45 | self.label_3.setMinimumSize(QtCore.QSize(0, 0)) 46 | self.label_3.setStyleSheet("font: 11pt \"Hack\";") 47 | self.label_3.setObjectName("label_3") 48 | self.gridLayout.addWidget(self.label_3, 3, 0, 1, 2) 49 | self.label = QtWidgets.QLabel(ApiKeyConfScreen) 50 | self.label.setStyleSheet("font: 11pt \"Hack\";") 51 | self.label.setObjectName("label") 52 | self.gridLayout.addWidget(self.label, 0, 0, 1, 4) 53 | spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 54 | self.gridLayout.addItem(spacerItem, 5, 1, 1, 1) 55 | 56 | self.retranslateUi(ApiKeyConfScreen) 57 | QtCore.QMetaObject.connectSlotsByName(ApiKeyConfScreen) 58 | 59 | def retranslateUi(self, ApiKeyConfScreen): 60 | _translate = QtCore.QCoreApplication.translate 61 | ApiKeyConfScreen.setWindowTitle(_translate("ApiKeyConfScreen", "Form")) 62 | self.label_2.setText(_translate("ApiKeyConfScreen", "Api Key:")) 63 | self.pushButton_startConfiguration.setText(_translate("ApiKeyConfScreen", "Start Configuration")) 64 | self.pushButton_exitScreen.setText(_translate("ApiKeyConfScreen", "Exit")) 65 | self.label_3.setText(_translate("ApiKeyConfScreen", "Status:")) 66 | self.label.setText(_translate("ApiKeyConfScreen", "

Configure Api Key

")) 67 | 68 | 69 | if __name__ == "__main__": 70 | import sys 71 | app = QtWidgets.QApplication(sys.argv) 72 | ApiKeyConfScreen = QtWidgets.QWidget() 73 | ui = Ui_ApiKeyConfScreen() 74 | ui.setupUi(ApiKeyConfScreen) 75 | ApiKeyConfScreen.show() 76 | sys.exit(app.exec_()) 77 | -------------------------------------------------------------------------------- /guilib/PhoneNumberParserScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/phoneNumberParserScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_phoneNumberParser(object): 15 | def setupUi(self, phoneNumberParser): 16 | phoneNumberParser.setObjectName("phoneNumberParser") 17 | phoneNumberParser.resize(1009, 589) 18 | icon = QtGui.QIcon() 19 | icon.addPixmap(QtGui.QPixmap(":/mainLogo/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 20 | phoneNumberParser.setWindowIcon(icon) 21 | self.gridLayout = QtWidgets.QGridLayout(phoneNumberParser) 22 | self.gridLayout.setObjectName("gridLayout") 23 | self.widget_2 = QtWidgets.QWidget(phoneNumberParser) 24 | self.widget_2.setMaximumSize(QtCore.QSize(16777215, 141)) 25 | self.widget_2.setObjectName("widget_2") 26 | self.label = QtWidgets.QLabel(self.widget_2) 27 | self.label.setGeometry(QtCore.QRect(70, 30, 151, 31)) 28 | self.label.setStyleSheet("font: 11pt \"Hack\";") 29 | self.label.setObjectName("label") 30 | self.lineEdit_phoneInput = QtWidgets.QLineEdit(self.widget_2) 31 | self.lineEdit_phoneInput.setGeometry(QtCore.QRect(240, 30, 451, 31)) 32 | self.lineEdit_phoneInput.setStyleSheet("font: 11pt \"Hack\";") 33 | self.lineEdit_phoneInput.setInputMethodHints(QtCore.Qt.ImhNone) 34 | self.lineEdit_phoneInput.setObjectName("lineEdit_phoneInput") 35 | self.pushButton_startProccess = QtWidgets.QPushButton(self.widget_2) 36 | self.pushButton_startProccess.setGeometry(QtCore.QRect(70, 90, 171, 31)) 37 | self.pushButton_startProccess.setStyleSheet("font: 11pt \"Hack\";") 38 | self.pushButton_startProccess.setObjectName("pushButton_startProccess") 39 | self.pushButton_saveResults = QtWidgets.QPushButton(self.widget_2) 40 | self.pushButton_saveResults.setGeometry(QtCore.QRect(270, 90, 171, 31)) 41 | self.pushButton_saveResults.setStyleSheet("font: 11pt \"Hack\";") 42 | self.pushButton_saveResults.setObjectName("pushButton_saveResults") 43 | self.gridLayout.addWidget(self.widget_2, 0, 0, 1, 1) 44 | self.widget = QtWidgets.QWidget(phoneNumberParser) 45 | self.widget.setObjectName("widget") 46 | self.textBrowser_logConsole = QtWidgets.QTextBrowser(self.widget) 47 | self.textBrowser_logConsole.setGeometry(QtCore.QRect(20, 10, 971, 401)) 48 | self.textBrowser_logConsole.setStyleSheet("font: 11pt \"Hack\";") 49 | self.textBrowser_logConsole.setObjectName("textBrowser_logConsole") 50 | self.gridLayout.addWidget(self.widget, 1, 0, 1, 1) 51 | 52 | self.retranslateUi(phoneNumberParser) 53 | QtCore.QMetaObject.connectSlotsByName(phoneNumberParser) 54 | 55 | def retranslateUi(self, phoneNumberParser): 56 | _translate = QtCore.QCoreApplication.translate 57 | phoneNumberParser.setWindowTitle(_translate("phoneNumberParser", "Form")) 58 | self.label.setText(_translate("phoneNumberParser", "Enter number:")) 59 | self.pushButton_startProccess.setText(_translate("phoneNumberParser", "Start")) 60 | self.pushButton_saveResults.setText(_translate("phoneNumberParser", "Save Results")) 61 | self.textBrowser_logConsole.setHtml(_translate("phoneNumberParser", "\n" 62 | "\n" 65 | "

LOG AND RESULTS:

")) 66 | import main_icon_files_rc 67 | 68 | 69 | if __name__ == "__main__": 70 | import sys 71 | app = QtWidgets.QApplication(sys.argv) 72 | phoneNumberParser = QtWidgets.QWidget() 73 | ui = Ui_phoneNumberParser() 74 | ui.setupUi(phoneNumberParser) 75 | phoneNumberParser.show() 76 | sys.exit(app.exec_()) 77 | -------------------------------------------------------------------------------- /raw_ui_files/phoneNumberParserScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | phoneNumberParser 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1009 10 | 589 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | :/mainLogo/logo.png:/mainLogo/logo.png 19 | 20 | 21 | 22 | 23 | 24 | 25 | 16777215 26 | 141 27 | 28 | 29 | 30 | 31 | 32 | 70 33 | 30 34 | 151 35 | 31 36 | 37 | 38 | 39 | font: 11pt "Hack"; 40 | 41 | 42 | Enter number: 43 | 44 | 45 | 46 | 47 | 48 | 240 49 | 30 50 | 451 51 | 31 52 | 53 | 54 | 55 | font: 11pt "Hack"; 56 | 57 | 58 | Qt::ImhNone 59 | 60 | 61 | 62 | 63 | 64 | 70 65 | 90 66 | 171 67 | 31 68 | 69 | 70 | 71 | font: 11pt "Hack"; 72 | 73 | 74 | Start 75 | 76 | 77 | 78 | 79 | 80 | 270 81 | 90 82 | 171 83 | 31 84 | 85 | 86 | 87 | font: 11pt "Hack"; 88 | 89 | 90 | Save Results 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 20 101 | 10 102 | 971 103 | 401 104 | 105 | 106 | 107 | font: 11pt "Hack"; 108 | 109 | 110 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 111 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 112 | p, li { white-space: pre-wrap; } 113 | </style></head><body style=" font-family:'Hack'; font-size:11pt; font-weight:400; font-style:normal;"> 114 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">LOG AND RESULTS:</span></p></body></html> 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /guilib/soundConverter_controller.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtWidgets import * 2 | 3 | from guilib.soundConverterScreen import Ui_SounConverter_widget 4 | from hivelibrary.sound_converter import * 5 | 6 | import shutil 7 | import os 8 | 9 | class soundConverterPage(QWidget): 10 | def __init__(self, output_dir:str, temp_dir:str): 11 | super().__init__() 12 | 13 | if not str(os.sep) in temp_dir: 14 | temp_dir += str(os.sep) 15 | 16 | if not str(os.sep) in output_dir: 17 | output_dir+= str(os.sep) 18 | 19 | self.soundConverterWidget = Ui_SounConverter_widget() 20 | self.soundConverterWidget.setupUi(self) 21 | 22 | self.OUTPUT_DIRECTORY = output_dir 23 | self.TEMP_DIRECTORY = temp_dir 24 | self.soundConverterSelectedFile = None 25 | 26 | self.setWindowTitle("Sound Converter") 27 | 28 | self.soundConverterWidget.pushButton_soundConverter_selectSoundFile.clicked.connect(self.soundConverterSelectTargetFile) 29 | self.soundConverterWidget.pushButton_soundConverter_runConvert.clicked.connect(self.soundConverterRunConvert) 30 | 31 | 32 | def clearSoundConverterLogConsole(self): 33 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.clear() 34 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.setText(f"Log Console:
") 35 | 36 | 37 | def soundConverterRunConvert(self): 38 | self.clearSoundConverterLogConsole() 39 | if self.soundConverterSelectedFile == None or not os.path.exists(self.soundConverterSelectedFile) or not os.path.isfile(self.soundConverterSelectedFile): 40 | err_msg = "Error: Invalid file selections" 41 | self.soundConverterWidget.textBrowser_soundConverter_sourceFile_print.setText(err_msg) 42 | return 43 | 44 | output_name = self.soundConverterWidget.lineEdit_soundConverter_outputName_input.text() 45 | target_format = self.soundConverterWidget.comboBox_soundConverter_selectTargetFormat.currentText() 46 | 47 | if output_name.split(".")[-1].upper() in SUPPORTED_SOUND_FORMATS: 48 | err_msg = "[ - ] Error: Not add extensions in output name!" 49 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.append(err_msg) 50 | return 51 | 52 | if self.soundConverterSelectedFile.split(".")[-1].upper() == target_format.upper(): 53 | err_msg = "[ - ] Error: Input format == output format proccess stopped!" 54 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.append(err_msg) 55 | return 56 | 57 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.append("[ + ] Starting convert") 58 | 59 | 60 | convert_status = GenericAudioConverter(target_file_path=self.soundConverterSelectedFile, temp_dir_path=self.TEMP_DIRECTORY,TARGET_FILE_FORMAT=target_format) 61 | if convert_status["success"] != "true": 62 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.append(f"[ - ] Converting failed: {convert_status['code']}") 63 | return 64 | 65 | raw_path_output = convert_status["path"] 66 | finally_output_name = output_name + "." + target_format 67 | finally_output_name = self.OUTPUT_DIRECTORY + finally_output_name 68 | shutil.copyfile(src=raw_path_output, dst=finally_output_name) 69 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.append(f"[ + ] Removing temp files") 70 | os.remove(raw_path_output) 71 | the_final_message = f"[ + ] Proccess successfuly complated.
[ + ] Your file: {finally_output_name}
" 72 | self.soundConverterWidget.textBrowser_soundConverter_logConsole.append(the_final_message) 73 | 74 | 75 | def soundConverterSelectTargetFile(self): 76 | file_dialog = QFileDialog() 77 | file_dialog.setNameFilter("Sound Files (*.mp3 *.vaw *.flac *.opus *.ogg *.aac *.wma)") 78 | 79 | if file_dialog.exec_(): 80 | self.soundConverterSelectedFile = file_dialog.selectedFiles()[0] 81 | 82 | if self.soundConverterSelectedFile == None or not os.path.exists(self.soundConverterSelectedFile) or not os.path.isfile(self.soundConverterSelectedFile): 83 | err_msg = "Error: Invalid file selections" 84 | self.soundConverterWidget.textBrowser_soundConverter_sourceFile_print.setText(err_msg) 85 | return 86 | 87 | self.soundConverterWidget.textBrowser_soundConverter_sourceFile_print.setText(self.soundConverterSelectedFile) -------------------------------------------------------------------------------- /hivelibrary/face_recognition_database_tools_sqlite.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | import hashlib 3 | from hivelibrary.env import DB_FACE_RECOGNITION_TABLE 4 | 5 | 6 | 7 | def get_image_from_id(db_cursor:sqlite3.Connection,db_id:int) -> dict: 8 | try: 9 | 10 | STATIC_SQL_COMMAND = f"SELECT * FROM {DB_FACE_RECOGNITION_TABLE} WHERE id=?" 11 | STATIC_DATA_TUPLE = (db_id,) 12 | 13 | results = db_cursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE).fetchall() 14 | 15 | if len(results) < 1: 16 | return { "success":False , "data":"No results" } 17 | 18 | return { "success":True, "data":results[0][1] } 19 | 20 | 21 | except Exception as err: 22 | return { "success":False, "data":f"Failed to get data, {err}" } 23 | 24 | 25 | class recognitionDbTools(): 26 | 27 | def __init__(self, db_curosr:sqlite3.Cursor, db_cnn:sqlite3.Connection) -> None: 28 | 29 | self.databaseConnections = db_cnn 30 | self.databaseCursor = db_curosr 31 | 32 | 33 | def calculateImageHashFromCv2Data(self, cv2_image_data): 34 | image_hash = hashlib.sha1(cv2_image_data.tobytes()) 35 | image_hash = image_hash.hexdigest() 36 | return image_hash 37 | 38 | def check_hash_is_exists(self, image_hash)-> bool: 39 | STATIC_SQL_COMMAND = f"SELECT id,picture_sha1_hash FROM {DB_FACE_RECOGNITION_TABLE} WHERE picture_sha1_hash=?" 40 | STATIC_DATA_TUPLE = (str(image_hash),) 41 | 42 | results = self.databaseCursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE).fetchall() 43 | 44 | if len(results) != 0: 45 | return True 46 | 47 | return False 48 | 49 | def check_name_is_exists(self, face_name) -> bool: 50 | STATIC_SQL_COMMAND = f"SELECT id,face_name FROM {DB_FACE_RECOGNITION_TABLE} WHERE face_name=?" 51 | STATIC_DATA_TUPLE = (str(face_name),) 52 | 53 | results = self.databaseCursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE).fetchall() 54 | 55 | if len(results) != 0: 56 | return True 57 | 58 | return False 59 | 60 | 61 | 62 | 63 | def insertImageFromDB(self,cv2_image_data, image_binary_data, face_name:str, insightface_face_analyser_ojb:object): 64 | try: 65 | cv2_image_hash = self.calculateImageHashFromCv2Data(cv2_image_data=cv2_image_data) 66 | 67 | if self.check_hash_is_exists(cv2_image_hash) == True: 68 | return {"success":False, "data":"İlgili resim zaten veritabanı içerisinde mevcuttur bu nedenle ekleme iptal edildi."} 69 | 70 | face_name = face_name 71 | 72 | if self.check_name_is_exists(face_name=face_name) == True: 73 | return {"success":False, "data":"İlgili isim veritabanında zaten mevcut tekrar kullanılamaz, işlem iptal edildi"} 74 | 75 | 76 | blobl_image_data = image_binary_data 77 | 78 | 79 | analysedSourceImage = insightface_face_analyser_ojb.get(cv2_image_data) 80 | 81 | if len(analysedSourceImage) > 1: 82 | return { "success":False, "data":"Kaynak resimde 1 den fazla yüz kabul edilemez, işlem iptal edili" } 83 | 84 | if len(analysedSourceImage) == 0: 85 | return {"success":False, "data":"Kaynak resimde herhangi bir yüz bulunamadı, işlem iptal edildi."} 86 | 87 | face_embedding_sourceFile = analysedSourceImage[0]["embedding"] 88 | landmark_2d = analysedSourceImage[0]["landmark_2d_106"] 89 | face_box = analysedSourceImage[0]["bbox"] 90 | 91 | 92 | 93 | STATIC_SQL_COMMAND = f"""INSERT INTO {DB_FACE_RECOGNITION_TABLE} ( 94 | face_picture_blob, picture_sha1_hash, face_embedding_data, landmarks_2d, face_box, face_name) 95 | VALUES (?, ?, ?, ?, ?,? )""" 96 | STATIC_DATA_TUPLE = (blobl_image_data, str(cv2_image_hash), sqlite3.Binary(face_embedding_sourceFile), sqlite3.Binary(landmark_2d),sqlite3.Binary(face_box) ,str(face_name)) 97 | 98 | self.databaseCursor.execute(STATIC_SQL_COMMAND, STATIC_DATA_TUPLE) 99 | self.databaseConnections.commit() 100 | return { "success":True, "data":"Resim başarıyla veritabanına eklendi." } 101 | 102 | 103 | except Exception as err: 104 | return { "success":False, "data":f"Yüz ekleme işlemi esnasında hata gerçekleşti işlem iptal edildi, {err}" } 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /hivelibrary/face_recognition_database_tools.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | from hivelibrary.env import DB_FACE_RECOGNITION_TABLE 3 | import psycopg2 4 | 5 | 6 | 7 | # for postgresql 8 | 9 | 10 | def get_image_from_id(db_cursor,db_id:int) -> dict: 11 | try: 12 | 13 | STATIC_SQL_COMMAND = f"SELECT * FROM {DB_FACE_RECOGNITION_TABLE} WHERE id=%s" 14 | STATIC_DATA_TUPLE = (db_id,) 15 | 16 | db_cursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE) 17 | results = db_cursor.fetchall() 18 | 19 | if len(results) < 1: 20 | return { "success":False , "data":"No results" } 21 | 22 | return { "success":True, "data":results[0][1] } 23 | 24 | 25 | except Exception as err: 26 | return { "success":False, "data":f"Failed to get data, {err}" } 27 | 28 | 29 | class recognitionDbTools(): 30 | 31 | def __init__(self, db_curosr, db_cnn) -> None: 32 | 33 | self.databaseConnections = db_cnn 34 | self.databaseCursor = db_curosr 35 | 36 | 37 | def calculateImageHashFromCv2Data(self, cv2_image_data): 38 | image_hash = hashlib.sha1(cv2_image_data.tobytes()) 39 | image_hash = image_hash.hexdigest() 40 | return image_hash 41 | 42 | 43 | def check_hash_is_exists(self, image_hash)-> bool: 44 | 45 | STATIC_SQL_COMMAND = f"SELECT EXISTS(SELECT 1 FROM {DB_FACE_RECOGNITION_TABLE} WHERE picture_sha1_hash=%s);" 46 | STATIC_DATA_TUPLE = (str(image_hash),) 47 | 48 | self.databaseCursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE) 49 | results = self.databaseCursor.fetchall()[0][0] 50 | 51 | if results == False: 52 | return False 53 | 54 | return True 55 | 56 | 57 | def check_name_is_exists(self, face_name) -> bool: 58 | STATIC_SQL_COMMAND = f"SELECT EXISTS(SELECT 1 FROM {DB_FACE_RECOGNITION_TABLE} WHERE face_name=%s);" 59 | STATIC_DATA_TUPLE = (str(face_name),) 60 | 61 | self.databaseCursor.execute(STATIC_SQL_COMMAND,STATIC_DATA_TUPLE) 62 | results = self.databaseCursor.fetchall()[0][0] 63 | 64 | if results == False: 65 | return False 66 | 67 | return True 68 | 69 | 70 | 71 | 72 | 73 | 74 | def insertImageFromDB(self,cv2_image_data, image_binary_data, face_name:str, insightface_face_analyser_ojb:object): 75 | try: 76 | cv2_image_hash = self.calculateImageHashFromCv2Data(cv2_image_data=cv2_image_data) 77 | 78 | if self.check_hash_is_exists(cv2_image_hash) == True: 79 | return {"success":False, "data":"İlgili resim zaten veritabanı içerisinde mevcuttur bu nedenle ekleme iptal edildi."} 80 | 81 | face_name = face_name 82 | 83 | if self.check_name_is_exists(face_name=face_name) == True: 84 | return {"success":False, "data":"İlgili isim veritabanında zaten mevcut tekrar kullanılamaz, işlem iptal edildi"} 85 | 86 | 87 | blobl_image_data = image_binary_data 88 | 89 | 90 | analysedSourceImage = insightface_face_analyser_ojb.get(cv2_image_data) 91 | 92 | if len(analysedSourceImage) > 1: 93 | return { "success":False, "data":"Kaynak resimde 1 den fazla yüz kabul edilemez, işlem iptal edili" } 94 | 95 | if len(analysedSourceImage) == 0: 96 | return {"success":False, "data":"Kaynak resimde herhangi bir yüz bulunamadı, işlem iptal edildi."} 97 | 98 | face_embedding_sourceFile = analysedSourceImage[0]["embedding"] 99 | landmark_2d = analysedSourceImage[0]["landmark_2d_106"] 100 | face_box = analysedSourceImage[0]["bbox"] 101 | 102 | 103 | 104 | STATIC_SQL_COMMAND = f"""INSERT INTO {DB_FACE_RECOGNITION_TABLE} ( 105 | face_picture_blob, picture_sha1_hash, face_embedding_data, landmarks_2d, face_box, face_name) 106 | VALUES (%s, %s, %s, %s, %s,%s )""" 107 | STATIC_DATA_TUPLE = (blobl_image_data, str(cv2_image_hash), psycopg2.Binary(face_embedding_sourceFile), psycopg2.Binary(landmark_2d),psycopg2.Binary(face_box) ,str(face_name)) 108 | 109 | self.databaseCursor.execute(STATIC_SQL_COMMAND, STATIC_DATA_TUPLE) 110 | self.databaseConnections.commit() 111 | return { "success":True, "data":"Resim başarıyla veritabanına eklendi." } 112 | 113 | 114 | except Exception as err: 115 | return { "success":False, "data":f"Yüz ekleme işlemi esnasında hata gerçekleşti işlem iptal edildi, {err}" } 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /raw_ui_files/AndroidAnlysisScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndroidAnlysisWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1529 10 | 834 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 0 21 | 22 | 23 | 24 | Anlysis Page 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | Send to VirusTotal 34 | 35 | 36 | 37 | 38 | 39 | 40 | Save Report 41 | 42 | 43 | 44 | 45 | 46 | 47 | Start Anlysis 48 | 49 | 50 | 51 | 52 | 53 | 54 | Select File 55 | 56 | 57 | 58 | 59 | 60 | 61 | font: 12pt "Hack"; 62 | 63 | 64 | 65 | 66 | 67 | 68 | Qt::Horizontal 69 | 70 | 71 | 72 | 73 | 74 | 75 | Result & Log Console: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | Stop Anlysis 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | Target File: 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 16777215 111 | 21 112 | 113 | 114 | 115 | <html><head/><body><p align="center">Android Anlysis Toolkit</p></body></html> 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | Tech Information 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /raw_ui_files/RSAoperationsScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1001 10 | 553 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 0 21 | 22 | 23 | 24 | Encrypte and Decrypte 25 | 26 | 27 | 28 | 29 | Managa Keys 30 | 31 | 32 | 33 | 34 | Information 35 | 36 | 37 | 38 | 39 | 40 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 41 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 42 | p, li { white-space: pre-wrap; } 43 | </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> 44 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; text-decoration: underline;">RSA-4096 File Encypter</span></p> 45 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"><br /></p> 46 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"><br /></p> 47 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">[ ENGLISH ]:</p> 48 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 49 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RSA is a popular public-key encryption algorithm used for encryption and digital signatures. RSA 4096 utilizes a key length of 4096 bits, providing a high level of security. This ensures strong encryption and is compatible with modern cryptographic standards. RSA 4096 is commonly used for securely transmitting and storing sensitive data.</p> 50 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 51 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 52 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">[ TURKISH ]:</p> 53 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 54 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RSA, şifreleme ve dijital imza için kullanılan popüler bir açık anahtarlı şifreleme algoritmasıdır. RSA 4096, güvenlik seviyesi yüksek olan 4096 bitlik bir anahtar uzunluğu kullanır. Bu, çok güçlü bir şifreleme sağlar ve modern kriptografik standartlarla uyumludur. RSA 4096, hassas verilerin güvenli bir şekilde iletilmesi ve saklanması için yaygın olarak kullanılır.</p> 55 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 56 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"><br /></p> 57 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"><br /></p></body></html> 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /guilib/external_thread_modules/FaceRecognitionDirectoryTransfer_old.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtCore import QThread, pyqtSignal 2 | import os 3 | 4 | from guilib.html_text_generator.html_draft import * 5 | from hivelibrary.face_recognition_database_tools import recognitionDbTools 6 | 7 | 8 | class directoryAdderThread(QThread): 9 | 10 | statusSignal = pyqtSignal(dict) 11 | 12 | 13 | def __init__(self, faceAnalayserUI:object ,targetDirectory:str, databaseConnections, databaseCursor): 14 | super().__init__() 15 | 16 | self.targetDirectory = targetDirectory 17 | self.databaseConnections = databaseConnections 18 | self.databaseCursor = databaseCursor 19 | self.faceAnalayserUI = faceAnalayserUI 20 | self.threadKillStatus = False 21 | self.supportedFromats = [".jpg", ".jpeg", ".png", ".webm" ] 22 | 23 | if os.name == "nt": 24 | check_digit = str(self.targetDirectory[-2:]) 25 | if not str(os.path.sep) in check_digit: 26 | self.targetDirectory = str(self.targetDirectory) + str(os.path.sep) 27 | else: 28 | check_digit = str(self.targetDirectory[-1]) 29 | if not str(os.path.sep) in check_digit: 30 | self.targetDirectory = str(self.targetDirectory) + str(os.path.sep) 31 | 32 | 33 | 34 | 35 | 36 | def run(self): 37 | import cv2 38 | from hivelibrary.file_operations.generic_tools import binaryData 39 | 40 | totalAddedCount = 0 41 | totalIslenen = 0 42 | 43 | totalFile = len(os.listdir(self.targetDirectory)) 44 | 45 | databaseTools = recognitionDbTools(db_cnn=self.databaseConnections,db_curosr=self.databaseCursor) 46 | 47 | self.__runningStatus(text="Ekleme sistemi başlatıldı") 48 | 49 | for singleFile in os.listdir(self.targetDirectory): 50 | if self.threadKillStatus == True: 51 | return_text = f"""İşlem İptal edildi son durum
52 | Toplam klasör içeriği: {totalFile}
53 | Toplam eklenen resim: {totalAddedCount}
54 | Toplam işlemden geçirilen resim: {totalIslenen}
55 | Eklenemeyen, atlanan resim: {str(totalIslenen - totalAddedCount)}
56 | {"-"*20}
""" 57 | self.__runningStatus(text=return_text) 58 | self.__finalyStatus(text=gen_info_text("Thread killed by user"),success_status=False) 59 | return 60 | try: 61 | fullImagePath = str(self.targetDirectory + singleFile) 62 | 63 | if not os.path.isfile(fullImagePath): 64 | self.__runningStatus(text=gen_info_text(f"Dosya bir dizin bu nedenle atlandı: {singleFile}")) 65 | continue 66 | 67 | file_name, currentExtensions = os.path.splitext(fullImagePath) 68 | file_name = file_name.split(str(os.path.sep))[-1] 69 | if not currentExtensions.endswith(".png") and not currentExtensions.endswith(".jpg") and not currentExtensions.endswith(".jpeg") and not currentExtensions.endswith(".webm"): 70 | self.__runningStatus(text=gen_info_text(f"Desteklenmeyen dosya uzantısı atlandı : {singleFile}")) 71 | continue 72 | 73 | cv2_data = cv2.imread(fullImagePath) 74 | binary_data = binaryData(fullImagePath) 75 | 76 | results = databaseTools.insertImageFromDB(cv2_image_data=cv2_data,image_binary_data=binary_data 77 | ,face_name=file_name,insightface_face_analyser_ojb=self.faceAnalayserUI) 78 | 79 | if results["success"] == True: 80 | totalAddedCount += 1 81 | else: 82 | 83 | self.__runningStatus(text=gen_error_text(f"{results['data']}, {singleFile} ")) 84 | 85 | totalIslenen +=1 86 | if totalIslenen % 10 == 0: 87 | self.__runningStatus(text=gen_info_text(f"Durum: {totalFile}/{totalIslenen}")) 88 | 89 | 90 | except Exception as err: 91 | self.__runningStatus(text=gen_error_text(f"Hata nedeniyle dosya atlandı, {err}")) 92 | continue 93 | 94 | 95 | self.__runningStatus(text=gen_info_text(f"Durum: {totalFile}/{totalAddedCount}")) 96 | return_text = f"""İşlem Başarıyla Tamamlandı
97 | Toplam klasör içeriği: {totalFile}
98 | Toplam eklenen resim: {totalAddedCount}
99 | Toplam işlemden geçirilen resim: {totalIslenen}
100 | Eklenemeyen, atlanan resim: {str(totalIslenen - totalAddedCount)}
101 | {"-"*20}
""" 102 | self.__finalyStatus(success_status=True,text=return_text) 103 | 104 | 105 | def stop(self): 106 | self.threadKillStatus = True 107 | 108 | def __runningStatus(self, text:str): 109 | data_dict = { "success":None, "end":False, "text":text} 110 | self.statusSignal.emit(data_dict) 111 | 112 | def __finalyStatus(self, text:str, success_status:bool): 113 | data_dict = {"success":success_status, "end":True, "text":text } 114 | self.statusSignal.emit(data_dict) -------------------------------------------------------------------------------- /raw_ui_files/ibanParserScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | iban_parser_form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 876 10 | 614 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | :/mainLogo/logo.png:/mainLogo/logo.png 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | font: 11pt "Hack"; 28 | 29 | 30 | <html><head/><body><p align="center">iban parser </p></body></html> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | font: 11pt "Hack"; 41 | 42 | 43 | 44 | 45 | 46 | font: 11pt "Hack"; 47 | 48 | 49 | Enter iban: 50 | 51 | 52 | 53 | 54 | 55 | 56 | font: 11pt "Hack"; 57 | 58 | 59 | 60 | 61 | 62 | 63 | font: 11pt "Hack"; 64 | 65 | 66 | 67 | for human *.txt 68 | 69 | 70 | 71 | 72 | for machine *.json 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | font: 11pt "Hack"; 81 | 82 | 83 | parse 84 | 85 | 86 | 87 | 88 | 89 | 90 | font: 11pt "Hack"; 91 | 92 | 93 | clear 94 | 95 | 96 | 97 | 98 | 99 | 100 | font: 11pt "Hack"; 101 | 102 | 103 | save 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | font: 11pt "Hack"; 117 | 118 | 119 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 120 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 121 | p, li { white-space: pre-wrap; } 122 | </style></head><body style=" font-family:'Hack'; font-size:11pt; font-weight:400; font-style:normal;"> 123 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Cantarell'; font-weight:600;">RESULT:</span></p></body></html> 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

TheHive Remastred

2 | 3 |
4 | 5 | 6 |
7 | 8 |

Gelişmiş ve Profesyonel OSINT TheHive Remastred ile Sizin Elinizde!


9 | 10 | 11 | 12 | 13 | - TheHive Remastred: 14 | - Gelişmiş ve basit grafiksel arayüz 15 | - Yerel kimlik doğrulaması ile karıştırmaya karşı koruma 16 | - Açık kaynak ve ücretsiz 17 | - Gelişmiş Özellikleri 18 | - Yüz tanıma 19 | - Yüz tespit 20 | - Yüz karşılaştırma ( Aktif ) 21 | - Tersine IP Taraması ( Aktif ) 22 | - BIN Numarası Arama ( Aktif ) 23 | - Statik Android APK Analizi ( Aktif ) 24 | - Clone voice detections ( çok yakında ) 25 | - Iban Çözümleyici ( Aktif) 26 | - Video kare ayrıştırıcı ( Aktif) 27 | - Telefon Numarası analiz edici ( Aktif ) 28 | - Google Drok oluşturucu ( çok yakında ) 29 | - Hash Tipi Tespit edici ( çok yakında ) 30 | - Harici Modül Desteği ( çok yakında ) 31 | 32 | - Bölge Tabanlı Sistemler 33 | - Tc Verificator ( Aktif ) 34 | - Tc Calculator ( Aktif ) 35 | 36 | 37 |
38 | 39 |

İndirme ve ilk kurulum

40 | 41 | 42 | 43 |

Linux Üzerinde TheHive Kurulumu

44 |

Windows Üzerinde TheHive Kurulumu

45 | 46 | 47 |
48 |

Arayüzden Görüntüler

49 | 50 |
51 | 52 | ## Karşılama Ekranı 53 | 54 |
55 | 56 | 57 |
58 |

TheHive ilk girişte basit bir arayüz ile sizi karşılar, temel sistem bilgisi ve iletişim 59 | bilgileri içeren bu sayfa üzerinden diğer modullere erişim sağlanır.

60 | 61 |
62 | 63 | 64 | ## Ses Tanıma 65 | 66 |
67 | 68 | 69 | 70 |
71 | 72 |

python Resamblyzer kütüphanesini temel alan bir ses doğrulama & tanıma sistem TheHive içerisinde mevcuttur. Kütüphanenin güncellenmesi nedeniyle tekrar entegre edilmesi için şuan bakım moduna alınmıştır.

73 |
74 | 75 | 76 | ## Yüz Tanıma 77 | 78 |
79 | 80 | ### Veritabanı içerisinde mevcut bir yüzün/kişinin aranması 81 | 82 | 83 | 84 | ### Veritabanı içerisinde bulunmayan bir yüzün/kişinin aranması 85 | 86 |
87 | 88 | 89 |

Görüntünün saf ikili verileri, tekrarlanan görüntülere karşı koruma sağlamak için sha1 karması, hızlı karşılaştırma için referans noktaları, yüzün genel noktaları, yüz çerçevesi, sisteme eklenme adı, UTC'ye eklenme tarihi veritabanında saklanır, böylece yüksek hızlı arama. 1500 rastgele görüntü ile yapılan deneylerde Yanlış pozitif (sistemin doğru olduğunu düşündüğü ancak yanlış olduğu) bir duruma rastlamadık. Benzerlik hesaplamasında yüz modelleri yerine kosinüs benzerliği kullanıldığı için aynı kişinin farklı görüntülerinde oran %100 olmayacak ancak diğerleriyle karşılaştırıldığında ciddi bir fark yaratacaktır. Bu sayede sistem verimli çalışır. 90 | 91 | 92 | 35.000 rastgele görüntü üzerinde yapılan deney sonucunda benzerlik alt sınırı %35'e düşürülerek hatalı sonuçların geri dönmesinin önüne geçildi. 93 |
94 | 95 | 96 | 97 | ## Yüz Doğrulama 98 | 99 |
100 | 101 | ### Aynı kişiye ait yüzlerin verdiği sonuç 102 | 103 | 104 | 105 | ### Farklı insanların yüzlerindeki sonuçlar 106 | 107 |
108 | 109 |

Farklı kişilerin tespiti ile aynı kişilerin tespiti arasında yüksek oranda fark bulunmaktadır. InsightFace'in buffalo_l modeli yüz noktalarını tespit etmek için kullanılır, daha sonra numpy aracılığıyla kosinüs benzerlik formülü kullanılarak benzerliğin hesaplanması sağlanır, bu nedenle aynı kişilerin farklı fotoğraflarında %100 vermez. 110 |
111 | 112 | ## Yüz Tespiti 113 | 114 |
115 | 116 | 117 | 118 | 119 |

Analiz hakkında tüm detayları almak için tüm analiz sonuçları diğer sekmede yazdırılır.

120 | 121 |
122 | 123 | 124 | ## Video Kare Ayrıştırıcı 125 | 126 |
127 | 128 | 129 |
130 |

Videoların daha kolay ve detaylı incelenebilmesi için opencv tabanlı video kare ayrıştırma özelliği, çoklu iş parçacığı özelliği sayesinde videoları karelere ayırarak uygulama donmadan tüm durumu ekrana verir

131 |
132 | 133 | 134 | ## Iban Çözümleyici 135 | 136 |
137 | 138 |
139 |

Ödeme işlemlerinde sıklıkla kullanılan IBAN, belirli bilgileri içerir. Bazı açık kaynak bilgilerine analiz ederek erişebilirsiniz. Bu modül bunu otomatik olarak yapar. Şu anda sadece Türkiye'ye ait IBAN'lara tam destek verilmektedir. Diğer IBAN'lar için eksik bilgi vermesi mümkündür.

140 |
141 | 142 | 143 | 144 | ## Basit IP Takibi 145 | 146 |
147 | 148 |
149 | 150 | 151 | ## Basit BIN Numrası Takibi 152 | 153 |
154 | 155 |
156 | 157 | 158 | 159 | ## Statik Android APK Analizi: 160 | 161 |
162 | 163 |
164 | 165 | 166 | 167 | 168 | ## Ses Dönüştürücü 169 | 170 |
171 | 172 | 173 | 174 |
175 |

Bu araçta pek gerekli olmasa da öğrenme aşamasında yazdığım ses dönüştürücüyü eklemek istedim:)

176 | 177 |
178 | 179 | 180 | # Credit[s] 181 | 182 |

183 | Logo Tasarımcısı Ömer Şayak 184 | 185 |

-------------------------------------------------------------------------------- /raw_ui_files/TcNumberCalculatorScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | TcNumberCalculator 4 | 5 | 6 | 7 | 0 8 | 0 9 | 957 10 | 648 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | font: 11pt "Hack"; 21 | 22 | 23 | Hesaplama adeti: 24 | 25 | 26 | 27 | 28 | 29 | 30 | Qt::Vertical 31 | 32 | 33 | 34 | 20 35 | 40 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 131 45 | 31 46 | 47 | 48 | 49 | 50 | 131 51 | 31 52 | 53 | 54 | 55 | font: 11pt "Hack"; 56 | 57 | 58 | Calculate 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 16777215 67 | 71 68 | 69 | 70 | 71 | font: 11pt "Hack"; 72 | 73 | 74 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 75 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 76 | p, li { white-space: pre-wrap; } 77 | </style></head><body style=" font-family:'Hack'; font-size:11pt; font-weight:400; font-style:normal;"> 78 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Cantarell';">Bir kişinin TC numarası rastgele atanmaz, anne ve babasının tc numarasına göre matematiksel olarak atanır bu sistemde bunu kullanarak geçmiş ve gelecekte atanmış / atanabilecek TC numaralarını hesaplamaya çalışır. Python matematik eğitimi içindir herhangi bir işlemden yasal olarak yazar sorumlu tutulamaz!</span></p></body></html> 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 591 87 | 31 88 | 89 | 90 | 91 | 92 | 591 93 | 31 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 102 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 103 | p, li { white-space: pre-wrap; } 104 | </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> 105 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">LOG AND RESULTS:</span></p></body></html> 106 | 107 | 108 | 109 | 110 | 111 | 112 | font: 11pt "Hack"; 113 | 114 | 115 | Enter Tc Number: 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 205 124 | 27 125 | 126 | 127 | 128 | 10 129 | 130 | 131 | 132 | 133 | 134 | 135 | font: 11pt "Hack"; 136 | 137 | 138 | <html><head/><body><p align="center">TC Calculator</p></body></html> 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /guilib/TcNumberCalculatorScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/TcNumberCalculatorScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_TcNumberCalculator(object): 15 | def setupUi(self, TcNumberCalculator): 16 | TcNumberCalculator.setObjectName("TcNumberCalculator") 17 | TcNumberCalculator.resize(957, 648) 18 | self.gridLayout = QtWidgets.QGridLayout(TcNumberCalculator) 19 | self.gridLayout.setObjectName("gridLayout") 20 | self.label_3 = QtWidgets.QLabel(TcNumberCalculator) 21 | self.label_3.setStyleSheet("font: 11pt \"Hack\";") 22 | self.label_3.setObjectName("label_3") 23 | self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1) 24 | spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) 25 | self.gridLayout.addItem(spacerItem, 4, 0, 1, 1) 26 | self.pushButton_startCalculator = QtWidgets.QPushButton(TcNumberCalculator) 27 | self.pushButton_startCalculator.setMinimumSize(QtCore.QSize(131, 31)) 28 | self.pushButton_startCalculator.setMaximumSize(QtCore.QSize(131, 31)) 29 | self.pushButton_startCalculator.setStyleSheet("font: 11pt \"Hack\";") 30 | self.pushButton_startCalculator.setObjectName("pushButton_startCalculator") 31 | self.gridLayout.addWidget(self.pushButton_startCalculator, 2, 2, 1, 1) 32 | self.textBrowser_yasalBilgi = QtWidgets.QTextBrowser(TcNumberCalculator) 33 | self.textBrowser_yasalBilgi.setMaximumSize(QtCore.QSize(16777215, 71)) 34 | self.textBrowser_yasalBilgi.setStyleSheet("font: 11pt \"Hack\";") 35 | self.textBrowser_yasalBilgi.setObjectName("textBrowser_yasalBilgi") 36 | self.gridLayout.addWidget(self.textBrowser_yasalBilgi, 6, 0, 1, 3) 37 | self.lineEdit_tcNumberInput = QtWidgets.QLineEdit(TcNumberCalculator) 38 | self.lineEdit_tcNumberInput.setMinimumSize(QtCore.QSize(591, 31)) 39 | self.lineEdit_tcNumberInput.setMaximumSize(QtCore.QSize(591, 31)) 40 | self.lineEdit_tcNumberInput.setObjectName("lineEdit_tcNumberInput") 41 | self.gridLayout.addWidget(self.lineEdit_tcNumberInput, 2, 1, 1, 1) 42 | self.textBrowser_logConsole = QtWidgets.QTextBrowser(TcNumberCalculator) 43 | self.textBrowser_logConsole.setObjectName("textBrowser_logConsole") 44 | self.gridLayout.addWidget(self.textBrowser_logConsole, 5, 0, 1, 3) 45 | self.label_2 = QtWidgets.QLabel(TcNumberCalculator) 46 | self.label_2.setStyleSheet("font: 11pt \"Hack\";") 47 | self.label_2.setObjectName("label_2") 48 | self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1) 49 | self.spinBox_numberOfCalculating = QtWidgets.QSpinBox(TcNumberCalculator) 50 | self.spinBox_numberOfCalculating.setMaximumSize(QtCore.QSize(205, 27)) 51 | self.spinBox_numberOfCalculating.setDisplayIntegerBase(10) 52 | self.spinBox_numberOfCalculating.setObjectName("spinBox_numberOfCalculating") 53 | self.gridLayout.addWidget(self.spinBox_numberOfCalculating, 3, 1, 1, 1) 54 | self.label = QtWidgets.QLabel(TcNumberCalculator) 55 | self.label.setStyleSheet("font: 11pt \"Hack\";") 56 | self.label.setObjectName("label") 57 | self.gridLayout.addWidget(self.label, 0, 0, 1, 3) 58 | 59 | self.retranslateUi(TcNumberCalculator) 60 | QtCore.QMetaObject.connectSlotsByName(TcNumberCalculator) 61 | 62 | def retranslateUi(self, TcNumberCalculator): 63 | _translate = QtCore.QCoreApplication.translate 64 | TcNumberCalculator.setWindowTitle(_translate("TcNumberCalculator", "Form")) 65 | self.label_3.setText(_translate("TcNumberCalculator", "Hesaplama adeti:")) 66 | self.pushButton_startCalculator.setText(_translate("TcNumberCalculator", "Calculate")) 67 | self.textBrowser_yasalBilgi.setHtml(_translate("TcNumberCalculator", "\n" 68 | "\n" 71 | "

Bir kişinin TC numarası rastgele atanmaz, anne ve babasının tc numarasına göre matematiksel olarak atanır bu sistemde bunu kullanarak geçmiş ve gelecekte atanmış / atanabilecek TC numaralarını hesaplamaya çalışır. Python matematik eğitimi içindir herhangi bir işlemden yasal olarak yazar sorumlu tutulamaz!

")) 72 | self.textBrowser_logConsole.setHtml(_translate("TcNumberCalculator", "\n" 73 | "\n" 76 | "

LOG AND RESULTS:

")) 77 | self.label_2.setText(_translate("TcNumberCalculator", "Enter Tc Number:")) 78 | self.label.setText(_translate("TcNumberCalculator", "

TC Calculator

")) 79 | 80 | 81 | if __name__ == "__main__": 82 | import sys 83 | app = QtWidgets.QApplication(sys.argv) 84 | TcNumberCalculator = QtWidgets.QWidget() 85 | ui = Ui_TcNumberCalculator() 86 | ui.setupUi(TcNumberCalculator) 87 | TcNumberCalculator.show() 88 | sys.exit(app.exec_()) 89 | -------------------------------------------------------------------------------- /guilib/ibanParser_controller.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtWidgets import * 2 | 3 | from guilib.ibanParserScreen import Ui_iban_parser_form 4 | 5 | from hivelibrary.osint import iban_parser 6 | 7 | import json 8 | 9 | class ibanParserPage(QWidget): 10 | def __init__(self): 11 | super().__init__() 12 | 13 | self.ibanParserWidget = Ui_iban_parser_form() 14 | self.ibanParserWidget.setupUi(self) 15 | self.setWindowTitle("iban parser") 16 | 17 | # define Global Varables 18 | self.lastParsedData = {} 19 | self.resultPrinted = False 20 | self.ayrac = "-"*30 21 | 22 | # button slot connections 23 | self.ibanParserWidget.pushButton_clearResult.clicked.connect(self.clearInputAndOutput) 24 | self.ibanParserWidget.pushButton_parse_iban.clicked.connect(self.parseTargetIban) 25 | self.ibanParserWidget.pushButton_save_result.clicked.connect(self.saveResultFromFile) 26 | 27 | def clearInputAndOutput(self): 28 | self.ibanParserWidget.textBrowser_resultConsole.setHtml("RESULT
") 29 | self.ibanParserWidget.lineEdit_iban_input.clear() 30 | self.resultPrinted = False 31 | 32 | def saveResultFromFile(self): 33 | # notes 34 | # index 0 == fro human txt 35 | # index 1 == fro machines json 36 | 37 | if self.ibanParserWidget.comboBox_saveType.currentIndex() == 0: 38 | saveFileName, _ = QFileDialog.getSaveFileName(self, "Save Result",filter="Text file (*.txt)") 39 | 40 | if not saveFileName: 41 | err_msg = f"[ - ] Save file not selected" 42 | self.ibanParserWidget.textBrowser_resultConsole.append(err_msg) 43 | return 44 | 45 | if self.resultPrinted != True: 46 | err_msg = f"[ - ] There are no results to save" 47 | self.ibanParserWidget.textBrowser_resultConsole.append(err_msg) 48 | return 49 | 50 | 51 | self.ibanParserWidget.textBrowser_resultConsole.append(self.ayrac) 52 | self.ibanParserWidget.textBrowser_resultConsole.append("[ + ] Saving operation started") 53 | 54 | with open(saveFileName, "w") as saveFile: 55 | saveFile.write(self.lastParsedData["text"]) 56 | 57 | self.ibanParserWidget.textBrowser_resultConsole.append("[ + ] File successfuly saved ") 58 | 59 | elif self.ibanParserWidget.comboBox_saveType.currentIndex() == 1: 60 | saveFileName, _ = QFileDialog.getSaveFileName(self, "Save Result",filter="Json file (*.json)") 61 | 62 | 63 | if not saveFileName: 64 | err_msg = f"[ - ] Save file not selected" 65 | self.ibanParserWidget.textBrowser_resultConsole.append(err_msg) 66 | return 67 | 68 | 69 | if self.resultPrinted != True: 70 | err_msg = f"[ - ] There are no results to save" 71 | self.ibanParserWidget.textBrowser_resultConsole.append(err_msg) 72 | return 73 | 74 | 75 | self.ibanParserWidget.textBrowser_resultConsole.append(self.ayrac) 76 | self.ibanParserWidget.textBrowser_resultConsole.append("[ + ] Saving operation started") 77 | 78 | with open(saveFileName, "w") as saveFile: 79 | json.dump(self.lastParsedData["json"],saveFile) 80 | 81 | self.ibanParserWidget.textBrowser_resultConsole.append("[ + ] File successfuly saved ") 82 | 83 | def parseTargetIban(self): 84 | input_iban = self.ibanParserWidget.lineEdit_iban_input.text() 85 | self.ibanParserWidget.textBrowser_resultConsole.append(f"[ + ] Proccess started, pls wait...") 86 | result = iban_parser.get_all_data_for_iban(input_iban) 87 | if result["success"] != True: 88 | err_msg = f"""Parse job failed.
Api response: {result["data"]}""" 89 | self.ibanParserWidget.textBrowser_resultConsole.append(err_msg) 90 | return 91 | 92 | result_is = result["data"] 93 | raw_iban = result_is["raw_iban"] 94 | country = result_is["country"] 95 | max_leng= result_is["max_leng"] 96 | account_control = result_is["account_control"] 97 | bank_brach = result_is["bank_brach"] 98 | country_number = result_is["country_number"] 99 | local_bank_code = result_is["local_bank_code"] 100 | reserve_code = result_is["reserve_code"] 101 | account_number = result_is["account_number"] 102 | account_number_raw = result_is["account_number_raw"] 103 | hesap_eki_kodu = result_is["hesap_eki_kodu"] 104 | bank_name = result_is["bank_name"] 105 | sube_kodu = result_is["sube_kodu"] 106 | sube_il = result_is["sube_il"] 107 | sube_ilce = result_is["sube_ilce"] 108 | output_text = f"""STATUS: iban successfuly parsed
109 | Input iban: {raw_iban}
110 | Country: {country}
111 | Country number: {country_number}
112 | Max leng: {max_leng}
113 | Account Control Support: {account_control}
114 | Bank branc: {bank_brach}
115 | Local bank code:: {local_bank_code}
116 | Reserve code: {reserve_code}
117 | Raw account number: {account_number_raw}
118 | Account number: {account_number}
119 | Bank name: {bank_name}
120 | Branch code: {sube_kodu}
121 | Branch city: {sube_il}
122 | Branch district: {sube_ilce}
123 | """ 124 | to_save = output_text.replace("","").replace("","").replace("
","") 125 | self.lastParsedData["text"] = to_save 126 | self.lastParsedData["json"] = result 127 | 128 | self.ibanParserWidget.textBrowser_resultConsole.setHtml(output_text) 129 | self.resultPrinted = True -------------------------------------------------------------------------------- /guilib/AndroidAnlysisScreen.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'raw_ui_files/AndroidAnlysisScreen.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.10 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_AndroidAnlysisWidget(object): 15 | def setupUi(self, AndroidAnlysisWidget): 16 | AndroidAnlysisWidget.setObjectName("AndroidAnlysisWidget") 17 | AndroidAnlysisWidget.resize(1529, 834) 18 | self.gridLayout = QtWidgets.QGridLayout(AndroidAnlysisWidget) 19 | self.gridLayout.setObjectName("gridLayout") 20 | self.tabWidget = QtWidgets.QTabWidget(AndroidAnlysisWidget) 21 | self.tabWidget.setObjectName("tabWidget") 22 | self.tab = QtWidgets.QWidget() 23 | self.tab.setObjectName("tab") 24 | self.gridLayout_2 = QtWidgets.QGridLayout(self.tab) 25 | self.gridLayout_2.setObjectName("gridLayout_2") 26 | self.widget_2 = QtWidgets.QWidget(self.tab) 27 | self.widget_2.setObjectName("widget_2") 28 | self.gridLayout_3 = QtWidgets.QGridLayout(self.widget_2) 29 | self.gridLayout_3.setObjectName("gridLayout_3") 30 | self.checkBox_sendVT = QtWidgets.QCheckBox(self.widget_2) 31 | self.checkBox_sendVT.setObjectName("checkBox_sendVT") 32 | self.gridLayout_3.addWidget(self.checkBox_sendVT, 2, 5, 1, 1) 33 | self.pushButton_saveReport = QtWidgets.QPushButton(self.widget_2) 34 | self.pushButton_saveReport.setObjectName("pushButton_saveReport") 35 | self.gridLayout_3.addWidget(self.pushButton_saveReport, 2, 2, 1, 1) 36 | self.pushButton_startAnlysis = QtWidgets.QPushButton(self.widget_2) 37 | self.pushButton_startAnlysis.setObjectName("pushButton_startAnlysis") 38 | self.gridLayout_3.addWidget(self.pushButton_startAnlysis, 2, 3, 1, 1) 39 | self.pushButton_selectFile = QtWidgets.QPushButton(self.widget_2) 40 | self.pushButton_selectFile.setObjectName("pushButton_selectFile") 41 | self.gridLayout_3.addWidget(self.pushButton_selectFile, 2, 1, 1, 1) 42 | self.textBrowser_logConsole = QtWidgets.QTextBrowser(self.widget_2) 43 | self.textBrowser_logConsole.setStyleSheet("font: 12pt \"Hack\";") 44 | self.textBrowser_logConsole.setObjectName("textBrowser_logConsole") 45 | self.gridLayout_3.addWidget(self.textBrowser_logConsole, 5, 0, 1, 7) 46 | self.line_2 = QtWidgets.QFrame(self.widget_2) 47 | self.line_2.setFrameShape(QtWidgets.QFrame.HLine) 48 | self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) 49 | self.line_2.setObjectName("line_2") 50 | self.gridLayout_3.addWidget(self.line_2, 3, 0, 1, 7) 51 | self.label_3 = QtWidgets.QLabel(self.widget_2) 52 | self.label_3.setObjectName("label_3") 53 | self.gridLayout_3.addWidget(self.label_3, 4, 0, 1, 1) 54 | self.lineEdit_showTargetPath = QtWidgets.QLineEdit(self.widget_2) 55 | self.lineEdit_showTargetPath.setObjectName("lineEdit_showTargetPath") 56 | self.gridLayout_3.addWidget(self.lineEdit_showTargetPath, 1, 1, 1, 5) 57 | self.pushButton_stopAnlysis = QtWidgets.QPushButton(self.widget_2) 58 | self.pushButton_stopAnlysis.setObjectName("pushButton_stopAnlysis") 59 | self.gridLayout_3.addWidget(self.pushButton_stopAnlysis, 2, 4, 1, 1) 60 | self.label_showApkTemplate = QtWidgets.QLabel(self.widget_2) 61 | self.label_showApkTemplate.setText("") 62 | self.label_showApkTemplate.setObjectName("label_showApkTemplate") 63 | self.gridLayout_3.addWidget(self.label_showApkTemplate, 0, 6, 3, 1) 64 | self.label_2 = QtWidgets.QLabel(self.widget_2) 65 | self.label_2.setObjectName("label_2") 66 | self.gridLayout_3.addWidget(self.label_2, 0, 1, 1, 2) 67 | self.gridLayout_2.addWidget(self.widget_2, 1, 0, 1, 1) 68 | self.label = QtWidgets.QLabel(self.tab) 69 | self.label.setMaximumSize(QtCore.QSize(16777215, 21)) 70 | self.label.setObjectName("label") 71 | self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) 72 | self.tabWidget.addTab(self.tab, "") 73 | self.tab_2 = QtWidgets.QWidget() 74 | self.tab_2.setObjectName("tab_2") 75 | self.tabWidget.addTab(self.tab_2, "") 76 | self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) 77 | 78 | self.retranslateUi(AndroidAnlysisWidget) 79 | self.tabWidget.setCurrentIndex(0) 80 | QtCore.QMetaObject.connectSlotsByName(AndroidAnlysisWidget) 81 | 82 | def retranslateUi(self, AndroidAnlysisWidget): 83 | _translate = QtCore.QCoreApplication.translate 84 | AndroidAnlysisWidget.setWindowTitle(_translate("AndroidAnlysisWidget", "Form")) 85 | self.checkBox_sendVT.setText(_translate("AndroidAnlysisWidget", "Send to VirusTotal")) 86 | self.pushButton_saveReport.setText(_translate("AndroidAnlysisWidget", "Save Report")) 87 | self.pushButton_startAnlysis.setText(_translate("AndroidAnlysisWidget", "Start Anlysis")) 88 | self.pushButton_selectFile.setText(_translate("AndroidAnlysisWidget", "Select File")) 89 | self.label_3.setText(_translate("AndroidAnlysisWidget", "Result & Log Console:")) 90 | self.pushButton_stopAnlysis.setText(_translate("AndroidAnlysisWidget", "Stop Anlysis")) 91 | self.label_2.setText(_translate("AndroidAnlysisWidget", "Target File:")) 92 | self.label.setText(_translate("AndroidAnlysisWidget", "

Android Anlysis Toolkit

")) 93 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("AndroidAnlysisWidget", "Anlysis Page")) 94 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("AndroidAnlysisWidget", "Tech Information")) 95 | 96 | 97 | if __name__ == "__main__": 98 | import sys 99 | app = QtWidgets.QApplication(sys.argv) 100 | AndroidAnlysisWidget = QtWidgets.QWidget() 101 | ui = Ui_AndroidAnlysisWidget() 102 | ui.setupUi(AndroidAnlysisWidget) 103 | AndroidAnlysisWidget.show() 104 | sys.exit(app.exec_()) 105 | --------------------------------------------------------------------------------