How hyldem0er/skirnir works
Project Type & Purpose
• Skirnir is an OSINT tool designed to perform both “surface crawl” (broad Google queries with various combinations of names and nicknames) and “deepcrawl” (more exhaustive searches using hundreds/thousands of generated nicknames).
• It supports scraping popular social networks (Instagram, Twitter, TikTok, etc.) and has both a graphical user interface (GUI) and a CLI for advanced users.
• Additional functionalities include proxy management, query generation, relevance sorting, and a comprehensive scraping framework.
Analyzing the File Structure
• Top-Level Files/Folders:
– Files like main.py and requirements.txt indicate Python-based execution.
– The data folder contains mapping files (CSV and XLSX) and probably images (for the UI logo) used across the tool.
– The launcher scripts for Linux and Windows simplify starting the application.
• Key Directories & Their Roles:
a. src/generator:
– Contains scripts generating various names, dates, and pseudonyms to support the “deepcrawl” functionality.
b. src/relevance:
– Holds logic for sorting results by relevance, an essential part of ranking the search outcomes.
c. src/request_helper:
– Manages proxies, user agents, and request handling which are core to web scraping. Contains configuration files (list of proxies) required for proxy rotation.
d. src/scrapers:
– Implements specific scraping functionality for different platforms (Instagram, TikTok, Twitter), each encapsulated in its own file.
e. src/surface_crawl:
– Deals with browsing simulation and URL/query creation to crawl search engines.
f. src/ui:
– Contains the interface components (windows, workers/threads, dialogs) for the Graphical User Interface.
g. src/utils:
– Offers helper utilities (formatting, export functions, login, similarity scoring, etc.) used across multiple modules.
• Other Elements:
– The .github folder shows CI/CD configuration for building and deployment (like building a Skirnir image on push).
– The LICENSE and README indicate this is an open-source project with community-focused development.
Elements
a. Main Components:
• User Interface (UI):
– Represented by the src/ui modules (MainWindow, WorkerThread, etc.)
• Scraping Engines:
– The src/scrapers directory for platform-specific scrapers.
• Surface Crawl Module:
– Encapsulated in src/surface_crawl (crawling browser emulation, URL creation).
• Data Generation:
– Managed by src/generator (name, date, nickname generators for deepcrawl).
• Request Handling:
– Offered by src/request_helper for managing requests, proxy support, and user agent rotation.
• Relevance Sorting:
– Implemented within src/relevance to rank and filter results.
• Utilities:
– Helper functions in src/utils that provide support across all components.
• Data Storage/Data Input:
– The data folder for storing mappings, logos, and potentially other configuration information.
b. Component Relationships & Interactions:
• The UI interacts with the underlying scraping engine.
• User requests (from the UI or CLI trigger) are passed to the Request Handling module (using proxies).
• Depending on the user settings, the application dispatches tasks either to surface crawl (search engine queries) or deepcrawl (using generators for varied nicknames).
• Results from scrapers are processed (possibly sorted in src/relevance) and then passed back to the UI for display.
c. Architectural Patterns & Design Principles:
• The project employs a modular design with separation of concerns (e.g., scraping, UI, request handling are in different modules).
• The use of threading in src/ui/WorkerThread suggests an asynchronous or multithreading pattern for non-blocking UI operations.
• The code reflects a clear division into layers such as presentation (UI), business logic (scraping, name generation, relevance sorting), and network connectivity (request handling, proxies).
d. Technologies & Frameworks:
• Python is the language, with third-party libraries likely listed in requirements.txt.
• OSINT-specific scraping logic (custom implementations rather than standard frameworks) is developed as part of the project.
• Integration with external search engines and social networks is abstracted in the scrapers.