🌍

Select Language / انتخاب زبان

👾

DarkSSH v4.0.0

Advanced SSH Authentication & Penetration Testing Tool

پیشرفته‌ترین ابزار تست نفوذ و احراز هویت SSH

Prerequisites & Installation

پیش‌نیازها و نصب

Debian / Ubuntu

Debian / Ubuntu

sudo apt update sudo apt install -y build-essential libssl-dev libssh-dev libzstd-dev

CentOS / RHEL

CentOS / RHEL

sudo dnf install -y gcc openssl-devel libssh-devel libzstd-devel

Compilation

دستور کامپایل

gcc -o darkssh ssh.c \ -O3 -march=x86-64 -mtune=generic \ -funroll-loops -flto -fomit-frame-pointer \ -pipe -Wall -Wextra -Wpedantic \ -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 \ -lssl -lcrypto -lssh -lzstd -pthread -lm -lrt -ldl

Usage Modes

حالت‌های استفاده

Mode 1

🕵️ Checker Mode

🕵️ حالت اسکن (Checker)

Scan IP lists to find active SSH servers.

اسکن سریع لیست IP ها برای پیدا کردن سرورهای فعال SSH.

./darkssh -c -i ip_list.txt -o valid.txt -t 50 -T 1.5 -v
Mode 2

💥 Cracker Mode

💥 حالت کرک (Cracker)

Brute-force SSH credentials on found servers.

تست لیست‌های یوزرنیم و پسورد روی سرورهای SSH یافت شده.

./darkssh -k -i targets.txt -u users.txt -P pass.txt -o goods.txt -H -s

Full Feature List

مستندات کامل قابلیت‌ها

بدون هیچ‌گونه خلاصه‌سازی و حذفیات.

1. Two Main Operational Modes

۱. دو حالت عملیاتی اصلی

۱.۱ Checker Mode (حالت اسکن سرورها)

  • اسکن سریع لیست IP:Port برای یافتن سرورهای SSH فعال
  • تشخیص سرورهای زنده از سرورهای مرده
  • شناسایی سرورهایی که واقعاً SSH هستند
  • ذخیره لیست سرورهای معتبر در فایل خروجی
  • فیلتر کردن سرورهای غیرفعال و تایم‌اوت شده

۱.۲ Cracker Mode (حالت شکستن رمز)

  • تست ترکیبات username و password روی سرورهای SSH
  • پشتیبانی از authentication با کلید SSH
  • ذخیره اطلاعات ورود موفق
  • تست همزمان چندین سرور با multi-threading
  • قابلیت resume کردن از جایی که قطع شده

1.1 Checker Mode

  • Fast IP:Port scanning to find active SSH servers (scans lists of targets in parallel and supports large input files).
  • Distinguish alive servers from dead ones using TCP-level and SSH-handshake probes.
  • Identify genuine SSH protocol servers by verifying SSH banner and protocol compliance.
  • Save a validated list of reachable and genuine SSH servers to an output file (append or replace modes available).
  • Filter out inactive, unreachable, or timed-out hosts via configurable thresholds.

1.2 Cracker Mode

  • Test username/password combinations against discovered SSH servers with configurable credential lists and permutations.
  • Support for SSH public-key authentication tests including loading private keys and testing key-based logins.
  • Save successful login credentials (username, password, key fingerprint, server details) to secure encrypted output files.
  • Perform multi-threaded credential testing across many targets simultaneously with per-target rate limits.
  • Resume capability that persists progress state periodically so interrupted jobs can continue from the last processed item without duplication.

2. Advanced Honeypot Detection

۲. سیستم تشخیص Honeypot پیشرفته

۲.۱ تحلیل Banner

  • بررسی امضاهای شناخته‌شده honeypot (Cowrie, Kippo, FakeSSH و...)
  • تشخیص ورژن‌های مشکوک OpenSSH
  • آنالیز طول و فرمت banner
  • شناسایی کاراکترهای غیرعادی در banner
  • چک کردن پروتکل SSH (SSH-2.0 یا SSH-1.99)

۲.۲ تحلیل زمان‌بندی (Timing Analysis)

  • اندازه‌گیری زمان پاسخ سرور
  • تشخیص پاسخ‌های خیلی سریع (< 10ms)
  • تشخیص پاسخ‌های خیلی کند (> 2s)
  • آنالیز زمان ایجاد کانال
  • بررسی زمان packet round-trip

۲.۳ تحلیل رفتاری (Behavioral Analysis)

  • بررسی متدهای authentication پشتیبانی‌شده
  • تشخیص سرورهایی که SSH_AUTH_METHOD_NONE را قبول می‌کنند
  • بررسی عدم پشتیبانی از public key authentication
  • تست اجرای دستورات سیستمی (whoami, uptime, uname و...)
  • شناسایی دسترسی root فوری

۲.۴ تحلیل الگوریتم‌های رمزنگاری

  • بررسی الگوریتم‌های Key Exchange (KEX)
  • تشخیص استفاده از الگوریتم‌های ضعیف (3DES, Blowfish, Arcfour)
  • آنالیز اندازه و نوع کلید سرور
  • چک کردن استفاده از diffie-hellman-group1 قدیمی

۲.۵ تحلیل سیستم عامل و محیط

  • بررسی اطلاعات CPU (/proc/cpuinfo)
  • تشخیص محیط‌های مجازی (QEMU, VMware, VirtualBox, KVM)
  • آنالیز تعداد کاربران سیستم (/etc/passwd)
  • بررسی uptime مشکوک (خیلی کم یا خیلی زیاد)
  • تشخیص ساختار filesystem غیرعادی

۲.۶ تحلیل شبکه پیشرفته

  • اندازه‌گیری jitter شبکه
  • بررسی bandwidth و تغییرات آن
  • تشخیص packet loss rate
  • آنالیز TCP retransmission rate
  • شناسایی anomaly در رفتار شبکه

۲.۷ سیستم امتیازدهی (Scoring System)

  • محاسبه امتیاز جامع بر اساس تمام فاکتورها
  • سطوح اطمینان: High (>0.7), Medium (>0.5), Low
  • Confidence score ترکیبی از نمرات مختلف
  • گزارش تفصیلی دلایل تشخیص honeypot

2.1 Banner Analysis

  • Check known honeypot signatures (Cowrie, Kippo, FakeSSH and other common honeypots) by matching banner fingerprints, default messages, and known constructs used by those projects.
  • Detect suspicious or outdated OpenSSH versions by parsing banner version strings and comparing against known safe/recent version ranges.
  • Analyze banner length and formatting: extremely short or unusually long banners are flagged, as are banners with misformatted version strings.
  • Identify unusual or non-printable characters in the banner that may indicate emulation or fake implementations.
  • Verify SSH protocol version indicators (e.g., SSH-2.0 or SSH-1.99) and flag mismatches or uncommon combinations used by honeypots.

2.2 Timing Analysis

  • Measure server response times at multiple handshake stages (TCP SYN/ACK, SSH banner, key exchange handshake steps).
  • Detect very fast responses (< 10ms) which often indicate emulated or scripted honeypots returning canned replies.
  • Detect very slow responses (> 2s) which can indicate overloaded services, throttling, or network anomalies — also used as a heuristic in the scoring model.
  • Analyze channel creation times (how long a server takes to open channels and respond to channel requests) for abnormal timing patterns.
  • Record packet round-trip times during active probes and include variance/jitter in the timing profile.

2.3 Behavioral Analysis

  • Enumerate supported authentication methods advertised by the server and compare to typical OpenSSH responses.
  • Detect servers that advertise or accept SSH_AUTH_METHOD_NONE (no-auth) or other unusual authentication paths, which is a strong honeypot indicator.
  • Identify servers that do not properly support public key authentication (missing or broken implementation) which is common in lightweight honeypots.
  • Attempt safe, non-destructive execution of limited commands (whoami, uptime, uname) and analyze output for signs of emulation versus real system responses (output structure, timing, content consistency).
  • Detect immediate root access or suspicious privilege indicators returned early in sessions (often a honeytrap behavior to entice attackers).

2.4 Cryptography & Algorithms Analysis

  • Inspect Key Exchange (KEX) algorithms offered by the server and compare to modern secure lists.
  • Flag usage of weak or legacy ciphers and algorithms such as 3DES, Blowfish, or Arcfour as potential insecure or emulated setups.
  • Analyze server key sizes and types (RSA, ECDSA, ED25519) and check for abnormally small keys or inconsistent metadata.
  • Specifically check for the presence of diffie-hellman-group1 or other deprecated groups and mark them as potential risk/honeypot evidence.

2.5 Operating System & Environment Analysis

  • Collect innocuous environment information exposed via safe probes (e.g., /proc/cpuinfo where accessible through indirect means) to build a fingerprint of the host environment.
  • Detect virtualization artifacts suggesting QEMU, VMware, VirtualBox, or KVM environments by analyzing reported CPU and device info patterns.
  • Analyze user account listings or metadata (when safely obtainable) to detect unrealistic user counts or default honeypot accounts.
  • Check uptime values for suspiciously low or high durations that do not match typical server behavior.
  • Detect abnormal filesystem structures or placeholder filesystem metadata indicative of containerized/emulated filesystems.

2.6 Advanced Network Analysis

  • Measure jitter across repeated probes and use that statistical profile when scoring host authenticity.
  • Track bandwidth characteristics where possible and note sudden or artificial-looking stability in throughput as a potential honeypot sign.
  • Estimate packet loss rate under controlled test conditions and include it in the network fingerprint.
  • Analyze TCP retransmission rates and patterns for anomalies compared to normal production servers.
  • Aggregate these network metrics into the overall anomaly detection model.

2.7 Scoring System

  • Compute a comprehensive honeypot score by combining banner, timing, behavioral, crypto, OS/environment, and network signals.
  • Confidence levels are reported: High (>0.7), Medium (>0.5), Low (≤0.5) with reasoned breakdowns of contributing factors.
  • Produce a combined confidence score that weights signals according to empirically derived importance.
  • Provide a detailed report explaining which heuristics and measurements resulted in the honeypot classification so operators can review the findings.

3. Advanced Multi-Threading

۳. سیستم Multi-Threading پیشرفته

۳.۱ مدیریت Thread

  • پشتیبانی از 4 تا 512 thread همزمان
  • تنظیم خودکار تعداد thread بر اساس CPU cores
  • Thread affinity optimization برای بهره‌وری بهتر
  • مدیریت lifecycle threads به صورت ایمن

۳.۲ Task Queue System

  • Ring buffer با اندازه 512K برای task queuing
  • Lock-free operations با atomic variables
  • Auto-resize در صورت پر شدن queue
  • Priority-based task scheduling

۳.۳ Thread Pool Management

  • Worker threads با load balancing خودکار
  • Monitoring thread برای نظارت real-time
  • Cleanup thread برای مدیریت منابع
  • Thread synchronization با mutex و spinlock

3.1 Thread Management

  • Support for 4 to 512 concurrent threads configurable by the user or auto-tuned based on detected CPU core count.
  • Automatic thread pool sizing and dynamic adjustment according to runtime load and CPU resources.
  • Thread affinity optimization to bind threads to specific cores for reduced context-switching and cache locality.
  • Safe lifecycle management for threads including clean startup, graceful shutdown, and watchdogs for hung workers.

3.2 Task Queue System

  • High-performance ring buffer with 512K entry capacity for lock-free MPMC task queuing.
  • Lock-free operations using atomic variables to minimize contention and improve throughput.
  • Auto-resize strategies to expand queue capacity or apply backpressure when nearing capacity.\li>
  • Priority-based scheduling to allow urgent tasks to be handled promptly without starving background work.

3.3 Thread Pool Management

  • Worker threads with automatic load balancing across tasks and targets.
  • Dedicated monitoring thread(s) for real-time observation of pool health and task distribution.
  • Cleanup thread for periodic resource reclamation and handling of orphaned or failed tasks.
  • Thread synchronization primitives including mutexes and spinlocks used judiciously to avoid deadlocks and minimize contention on hot paths.

4. Stealth & Anti-Detection

۴. سیستم Stealth و Anti-Detection

۴.۱ Stealth Mode (حالت مخفیانه عادی)

  • تاخیرهای تصادفی بین 50ms تا 300ms
  • تغییر الگوی اتصال برای جلوگیری از شناسایی
  • تنظیم timing بر اساس شرایط شبکه

۴.۲ Ultra-Stealth Mode (حالت مخفیانه پیشرفته)

  • الگوهای پیچیده‌تر برای فریب سیستم‌های تشخیص
  • Micro-variations در timing (0-1ms)
  • Pattern breaking با randomization
  • تاخیرهای کمتر اما هوشمندانه‌تر

۴.۳ Anti-Block System (سیستم ضد مسدودسازی)

  • تشخیص خودکار blocking از سمت سرور
  • Exponential backoff برای retry
  • Adaptive delay بر اساس response time
  • تغییر خودکار connection parameters

۴.۴ Traffic Pattern Obfuscation

  • Randomization در timing patterns
  • تغییر TCP flags (TCP_NODELAY toggle)
  • Multi-layer encryption برای log ها
  • تغییر depth encryption در صورت مشکل

4.1 Stealth Mode (Normal)

  • Introduce randomized delays between 50ms and 300ms per connection attempt to reduce detectability by pattern-based IDS/IPS systems.
  • Vary connection patterns (timing, ordering, target rotation) to avoid signature-based detection.
  • Adjust timing heuristics dynamically based on network conditions to mimic normal traffic behavior.

4.2 Ultra-Stealth Mode (Advanced)

  • Employ more complex connection and timing patterns designed to obfuscate automated fingerprinting systems.
  • Apply micro-variations in timing (sub-millisecond adjustments where feasible) to break deterministic patterns.
  • Use pattern-breaking randomization techniques to fragment observable sequences.
  • Maintain lower average delays while intelligently spreading attempts to appear human-like and avoid bursts.

4.3 Anti-Block System

  • Automatically detect when a server or network is blocking or rate-limiting requests and react accordingly.
  • Implement exponential backoff for retries to avoid persistent rapid retries that would trigger blocks.
  • Adapt delays based on measured response-time signals to reduce the chance of being classified as abusive traffic.
  • Dynamically adjust connection parameters (timeouts, window sizes, proxy usage) to attempt alternative paths when blocking is detected.

4.4 Traffic Pattern Obfuscation

  • Randomize timing patterns across multiple dimensions (inter-request, intra-session, per-target) to minimize recognizable signatures.
  • Tweak TCP flags where applicable (e.g., toggling TCP_NODELAY) to create subtle variation in packetization behavior.
  • Apply multi-layer encryption for stored logs and sensitive telemetry to reduce forensic disclosure and to control visibility of interaction fingerprints.
  • Dynamically modify the depth or strength of logging/encryption for operational resilience when detection risk increases.

5. Advanced Network Capabilities

۵. قابلیت‌های شبکه پیشرفته

۵.۱ پشتیبانی از Proxy

  • پشتیبانی کامل از SOCKS5 proxy
  • Proxy rotation (استفاده چرخشی از لیست proxy)
  • Retry mechanism برای proxy های ناموفق
  • Proxy health checking

۵.۲ DNS Caching

  • Cache کردن نتایج DNS resolution
  • Time-to-live 30 دقیقه برای cache entries
  • Lock-free access با mutex protection
  • Automatic cache eviction

۵.۳ Connection Optimization

  • TCP_NODELAY برای کاهش latency
  • TCP_FASTOPEN برای اتصالات سریعتر
  • SO_KEEPALIVE برای نگهداری اتصال
  • Custom linger settings

۵.۴ Network Analysis

  • اندازه‌گیری real-time latency
  • محاسبه jitter و packet loss
  • Bandwidth measurement
  • TCP retransmission rate tracking
  • Network stability score

۵.۵ Adaptive Timeout

  • تنظیم خودکار timeout بر اساس latency
  • در نظر گرفتن jitter در محاسبات
  • Smoothing برای جلوگیری از تغییرات ناگهانی
  • محدودیت min/max برای timeout (1-60 ثانیه)

5.1 Proxy Support

  • Full SOCKS5 proxy support with ability to set authentication and chained proxies.
  • Proxy rotation to cycle through a provided list of proxies to distribute connection origin points.
  • Retry mechanisms specifically for proxy failures with configurable retry counts and backoff strategies.
  • Proxy health checking to avoid repeatedly using degraded or dead proxies.

5.2 DNS Caching

  • Cache DNS resolution results to minimize repeated lookups and reduce latency.
  • TTL for cache entries configurable (default 30 minutes) with safe eviction policies.
  • Lock-free read access where possible with mutex protection on writes to ensure thread-safe operations.
  • Automatic cache eviction policies to remove stale entries and control memory usage.

5.3 Connection Optimization

  • Use TCP_NODELAY to reduce latency for small request/response interactions.
  • Support TCP_FASTOPEN where available for faster initial handshakes.
  • Utilize SO_KEEPALIVE to maintain long-lived connections when appropriate.
  • Offer custom linger and socket options to tune connection teardown behavior.

5.4 Network Analysis

  • Real-time latency monitoring and aggregation across multiple probes.
  • Calculate jitter and packet loss statistics to feed into scoring and adaptive timeout decisions.
  • Measure bandwidth and track throughput variability over time.
  • Monitor TCP retransmission rates and other transport-layer metrics to identify degraded links.
  • Compute a derived network stability score summarizing observed network health.

5.5 Adaptive Timeout

  • Dynamically adjust connection and operation timeouts based on observed latency and jitter to reduce false timeouts and maximize throughput.
  • Incorporate jitter into timeout calculations and smooth adjustments over time to avoid oscillation.
  • Enforce configured minimum and maximum timeout bounds (1–60 seconds) to prevent extreme values.

6. Advanced Memory Management

۶. مدیریت حافظه پیشرفته

۶.۱ Huge Pages Support

  • استفاده از 2MB huge pages برای بهره‌وری
  • Fallback خودکار به allocation معمولی
  • Memory pressure monitoring

۶.۲ Memory Alignment

  • 128-byte cache line alignment
  • 4KB page alignment
  • Optimal memory layout

۶.۳ Memory Recovery System

  • تشخیص خودکار memory pressure
  • 3 استراتژی recovery: Normal, Aggressive, Emergency
  • Exponential backoff برای retry
  • Automatic memory trimming (malloc_trim)
  • Drop cache در شرایط بحرانی

۶.۴ Memory Pooling

  • Pre-allocated memory blocks
  • Zero-copy operations
  • Memory reuse برای کاهش overhead

۶.۵ Smart Allocation

  • mmap برای فایل‌های بزرگ (>1MB)
  • aligned_alloc برای دقت cache
  • Memory locking برای critical allocations (>16MB)
  • madvise hints (MADV_SEQUENTIAL, MADV_WILLNEED)

6.1 Huge Pages Support

  • Use 2MB huge pages for large allocations to reduce TLB pressure and improve throughput.
  • Automatic fallback to normal allocations when huge pages are not available.
  • Monitor memory pressure and adjust strategies accordingly.

6.2 Memory Alignment

  • 128-byte cache line alignment for hot data structures to minimize false sharing and improve cache utilization.
  • 4KB page alignment for page-friendly operations and mmap usage.
  • Design optimal memory layouts for predictable access patterns.

6.3 Memory Recovery System

  • Automatically detect memory pressure and trigger recovery strategies.
  • Three-tier recovery strategies: Normal (light), Aggressive (reclaim more memory), Emergency (forceful trimming and cache drops).
  • Use exponential backoff for repeated recovery attempts to avoid thrashing.
  • Automatic invocation of malloc_trim and optional dropping of OS caches when critical.

6.4 Memory Pooling

  • Pre-allocated memory block pools for frequently used buffers to avoid frequent allocations and fragmentation.
  • Zero-copy operations where possible to reduce memory bandwidth.
  • Memory reuse strategies to lower allocation/deallocation overhead.

6.5 Smart Allocation

  • Use mmap for large files or buffers (>1MB) to optimize I/O and memory usage.
  • aligned_alloc for cache-friendly alignment requirements.
  • Lock critical large allocations in memory (>16MB) when necessary to prevent swapping.
  • Provide madvise hints (MADV_SEQUENTIAL, MADV_WILLNEED) to the OS to optimize paging.

7. Real-Time Statistics

۷. سیستم آمارگیری Real-Time

۷.۱ Checker Statistics

  • تعداد کل سرورهای چک شده | معتبر (Good) | نامعتبر (Bad)
  • تعداد timeout ها | honeypot های شناسایی شده
  • تعداد خطاها | میانگین زمان پاسخ (milliseconds)
  • Packet loss rate | Success rate | TCP stability score

۷.۲ Cracker Statistics

  • تعداد کل تلاش‌ها | login های موفق | شکست‌ها
  • Attempts per second (سرعت crack)
  • Bandwidth efficiency | TCP success rate

৭.৫ Progress Tracking

  • Progress bar با نمایش بصری
  • درصد پیشرفت دقیق | زمان سپری شده (Elapsed time)
  • نمایش همزمان در terminal

7.1 Checker Statistics

  • Total checked servers, categorized counts: Good (valid), Bad (invalid), and Unreachable.
  • Counts of timeouts and detected honeypots, with breakdowns by category.
  • Error counts and mean response time (milliseconds) with min/max values reported.
  • Packet loss rate, overall success rate, and TCP stability score for the checking subsystem.

7.2 Cracker Statistics

  • Total number of attempts, successful logins captured, and failure counts with timestamps.\li>
  • Attempts per second metric to measure brute-force throughput and throttling behavior.
  • Bandwidth efficiency indicators and TCP success rate to evaluate network utilization for cracking operations.

7.3 Network Statistics

  • Average latency (ms), jitter (ms), and measured bandwidth (Mbps) statistics.
  • Network health score aggregated from multiple network signals.
  • Connection stability metrics across the run.

7.4 System Statistics

  • CPU usage percentage, RAM usage percentage, and active thread counts updated in real time.
  • Memory pressure indicators and I/O throughput monitoring for the host system.

7.5 Progress Tracking

  • Visual progress bar with precise percentage completion and elapsed time.
  • Concurrent terminal display and UI updates to show live progress per task group.

8. Security & Encryption

۸. امنیت و رمزنگاری

۸.۱ Multi-Layer Encryption

  • رمزنگاری دو لایه AES-256-CBC
  • استفاده از کلیدهای تصادفی برای هر لایه
  • IV (Initialization Vector) تصادفی
  • حفاظت از log های حساس

۸.۲ Key Management

  • تولید خودکار کلیدهای رمزنگاری با RAND_bytes
  • ذخیره امن کلیدها در حافظه
  • عدم نوشتن کلیدها در disk

۸.۳ Secure Logging

  • Log encryption برای حفاظت از اطلاعات
  • Log compression با ZSTD (سطح 3)
  • Thread-safe logging

8.1 Multi-Layer Encryption

  • Double-layer AES-256-CBC encryption for sensitive artifacts such as credential storage and session logs.
  • Use random keys per-layer and per-session where applicable to reduce correlation risk.
  • Random IV generation for each encryption operation to guarantee semantic security.
  • Protect sensitive logs and outputs with encryption at rest and in transit as needed.

8.2 Key Management

  • Generate cryptographic keys using secure RNG (RAND_bytes or equivalent) and ephemeral key strategies where reasonable.
  • Keep keys in protected in-memory structures and avoid persistent disk writes of plaintext keys.
  • Use secure erasure patterns on memory when keys are retired to reduce leakage risk.

8.3 Secure Logging

  • Encrypt logs containing sensitive data and compress them with ZSTD (level 3 default) to save space.
  • Atomic write operations for log files to avoid corruption and partial writes.
  • Thread-safe logging mechanisms to prevent race conditions in high-concurrency environments.

9. File & Data Management

۹. مدیریت فایل و داده

۹.۱ Large File Support

  • پشتیبانی از فایل‌های تا 1TB
  • Memory mapping برای فایل‌های بزرگ
  • Sequential read optimization

۹.۲ File Formats

  • پشتیبانی از فرمت‌های مختلف ورودی
  • Auto-detection فرمت فایل
  • UTF-8 encoding support

۹.۳ State Persistence

  • ذخیره خودکار state هر چند ثانیه
  • Resume قابلیت از جایی که قطع شده
  • Checksum validation برای data integrity

9.1 Large File Support

  • Support for files up to 1TB with memory-mapped I/O for efficient large-file processing.
  • Optimizations for sequential reads and chunk-based processing to minimize memory overhead.

9.2 File Formats

  • Support a variety of input formats (plain lists, CSV, JSON-lines, etc.) and automatically detect format where possible.
  • Full UTF-8 encoding support and robust handling of long line lengths (up to 1MB per line).

9.3 State Persistence

  • Persist runtime state periodically so long-running jobs can resume from the latest saved checkpoint.
  • Resume capabilities with checksum validation for integrity and encrypted state files to protect sensitive progress data.

10. Configuration

۱۰. تنظیمات و Configuration

۱۰.۱ Timeout Settings

  • Connection timeout: قابل تنظیم 1-60 ثانیه (پیش‌فرض 3)
  • Authentication timeout: 6 ثانیه
  • Banner timeout: 1 ثانیه
  • Dynamic timeout adjustment بر اساس شرایط شبکه

۱۰.۲ Retry Mechanism

  • تعداد retry: قابل تنظیم 1-10 (پیش‌فرض 3)
  • Delay بین retry ها: قابل تنظیم 0-10000ms (پیش‌فرض 200ms)
  • Exponential backoff برای retry های ناموفق
  • Smart retry بر اساس نوع خطا

१०.३ Thread Configuration

  • تعداد thread: قابل تنظیم 4-512
  • Auto-tuning بر اساس CPU cores
  • Priority scheduling و Thread affinity

१०.४ Buffer Sizes

  • Main buffer: 512KB
  • Network buffer: 128KB
  • Ring buffer: 512K entries
  • Hash table: 16M entries

10.1 Timeout Settings

  • Connection timeout: configurable range 1–60 seconds (default 3s).
  • Authentication timeout: default 6s.
  • Banner read timeout: default 1s.
  • Dynamic timeout adjustment based on observed network latency and jitter.

10.2 Retry Mechanism

  • Configurable retry attempts (1–10, default 3) with adjustable delay (0–10000ms, default 200ms).
  • Exponential backoff for persistent failures to reduce rate-limiting triggers.
  • Smart retry policies that vary behavior by error class (network vs auth vs server error).

10.3 Thread Configuration

  • User-configurable thread counts (4–512) with auto-tuning based on CPU core count and load.
  • Priority scheduling options and thread affinity controls to optimize throughput and fairness.

10.4 Buffer Sizes

  • Main buffer default 512KB, tunable by user.
  • Network buffer default 128KB for socket I/O buffering.
  • Ring buffer capacity 512K entries for task queuing; hash table sized to 16M entries by default for internal indexing.

11. Performance Optimizations

۱۱. بهینه‌سازی‌های عملکردی

۱۱.۱ CPU Optimization

  • همترازی cache line تا 128 بایت
  • بهینه‌سازی SIMD در عملیات حافظه
  • تخصیص affinity برای threads

۱۱.۲ Memory Optimization

  • Zero-copy operations
  • Memory pooling
  • Lazy initialization

۱۱.۳ Network Optimization

  • Connection pooling
  • Pipelining
  • Batch operations

۱۱.۴ I/O Optimization

  • Non-blocking I/O
  • epoll برای event handling
  • Direct I/O برای فایل‌های بزرگ

۱۱.۵ Algorithm Optimization

  • FNV-1a hashing
  • Lock-free data structures
  • O(1) operations در critical paths

11.1 CPU Optimization

  • Cache line alignment (128 bytes) for hot data structures, SIMD-friendly memory operations, and cpu affinity tuning.

11.2 Memory Optimization

  • Zero-copy operations, memory pooling, and lazy initialization patterns to reduce allocations and improve throughput.

11.3 Network Optimization

  • Connection pooling, pipelining of network operations, and batching to amortize per-connection overhead.

11.4 I/O Optimization

  • Non-blocking I/O, epoll-based event handling, buffered I/O, and direct I/O for large files where appropriate.

11.5 Algorithm Optimization

  • Use FNV-1a for fast hashing, lock-free structures on hot paths, and O(1) operations where possible for critical lookups.

12. Error Handling & Recovery

۱۲. Error Handling و Recovery

۱۲.۱ Error Detection

  • تشخیص خودکار انواع خطاها
  • Classification خطاها به دسته‌های مختلف
  • Error rate tracking

۱۲.۲ Recovery Strategies

  • Automatic retry با backoff
  • Alternative path selection
  • Resource reallocation

۱۲.۳ Crash Protection

  • Signal handling (SIGINT, SIGTERM, SIGQUIT)
  • Graceful shutdown
  • Resource cleanup
  • State save قبل از exit

۱۲.۴ Data Integrity

  • Checksum validation
  • Atomic operations
  • Rollback capability

12.1 Error Detection

  • Automatic detection and classification of error types with tracking and pattern analysis.

12.2 Recovery Strategies

  • Automatic retry with exponential backoff, alternative path selection, and resource reallocation.

12.3 Crash Protection

  • Signal handlers for SIGINT/SIGTERM/SIGQUIT, graceful shutdown, and state preservation before exit.

12.4 Data Integrity

  • Checksum validation, atomic operations, and transaction-like behavior with rollback capabilities.

13. User Interface (UI)

۱۳. رابط کاربری (UI)

۱۳.۱ Banner Display

  • ASCII art خفن و جذاب
  • اطلاعات نسخه و creator
  • System specs summary

۱۳.۲ Progress Display

  • Progress bar نموداری
  • آمار real-time
  • Color-coded status

۱۳.۳ Help System

  • راهنمای کامل دستورات
  • مثال‌های کاربردی
  • توضیح هر option

۱۳.۴ Logging Levels

  • INFO, WARNING, ERROR, CRITICAL, ATTEMPT

13.1 Banner Display

  • Polished ASCII art banner, version, and creator information along with a short system summary.

13.2 Progress Display

  • Graphic progress bars, real-time stats, and color-coded status updates refreshed every second.

13.3 Help System

  • Comprehensive command help, usage examples, and explanations for each option and flag.

13.4 Logging Levels

  • Support for INFO, WARNING, ERROR, CRITICAL, and ATTEMPT logging levels with filters.

14. Additional Advanced Capabilities

۱۴. قابلیت‌های پیشرفته اضافی

۱۴.۱ JSON Logging

  • فرمت JSON برای log ها
  • Structured data

۱۴.۲ Bandwidth Monitoring

  • Real-time bandwidth measurement
  • Bandwidth limit enforcement

۱۴.۳ TCP Analysis

  • TCP window size tracking
  • Congestion control monitoring

۱۴.۴ Deep Detection

  • ML-based pattern recognition
  • Anomaly detection

۱۴.۵ Priority Scheduling

  • Task prioritization based on latency
  • Fast-path for high-priority tasks

۱۴.۶ Auto-Optimization

  • Self-tuning parameters
  • Automatic adjustment based on profiling

14.1 JSON Logging

  • JSON formatted logs for machine-readability and easy integration with log systems.

14.2 Bandwidth Monitoring

  • Real-time measurement, enforcement, and shaping capabilities for bandwidth usage.

14.3 TCP Analysis

  • Track TCP window sizes, retransmissions, and congestion signals to diagnose network problems.

14.4 Deep Detection

  • ML-based behavioral and anomaly detection layered with advanced fingerprinting.

14.5 Priority Scheduling

  • Prioritize tasks by latency sensitivity with fast-path execution for urgent work and fair scheduling for background tasks.

14.6 Auto-Optimization

  • Self-tuning algorithms that adjust parameters automatically and continuously based on performance profiles.

15. Special Performance Modes

۱۵. مدل‌های عملکردی خاص

۱۵.۱ Dead Server Filtering

  • Pre-check برای سرورهای مرده
  • Skip کردن سرورهای unreachable

۱۵.۲ Adaptive Speed

  • تنظیم خودکار سرعت بر اساس شرایط
  • Throttling و Acceleration

۱۵.۳ Precision Mode

  • Nanosecond timing
  • High-resolution statistics

۱۵.۴ Crash Proof

  • Auto-recovery
  • State preservation

15.1 Dead Server Filtering

  • Pre-check mechanisms to identify and skip dead or permanently-down targets to save resources.

15.2 Adaptive Speed

  • Automatically adjust operational speed, throttle when problems are detected, and accelerate under favorable conditions balancing speed and stability.

15.3 Precision Mode

  • Precision timing modes using high-resolution timers for nanosecond measurements and double-precision calculations.

15.4 Crash Proof

  • Crash protection, automatic recovery strategies, and state preservation to continue after failures.

16. Advanced Data Structures

۱۶. Data Structures پیشرفته

۱۶.۱ Ring Buffer

  • Lock-free MPMC queue
  • Power-of-2 size برای performance

۱۶.۲ Hash Table

  • 16M entries
  • FNV-1a hashing

۱۶.۳ Cache Block

  • Metadata tracking

۱۶.۴ Task Structure

  • Comprehensive metadata per task

16.1 Ring Buffer

  • Lock-free MPMC ring buffer with power-of-two sizing, overflow/underflow handling, and contention tracking.

16.2 Hash Table

  • Large hash table (16M entries), FNV-1a hashing, chaining for collisions, and per-bucket locking where necessary.

16.3 Cache Block

  • Cache block metadata tracking, access counting, and lifecycle management tuned for memory pressure.

16.4 Task Structure

  • Comprehensive task metadata including timing, network metrics, and embedded statistics for accurate monitoring and retries.\li>

17. Validation & Verification

۱۷. Validation و Verification

۱۷.۱ Input Validation

  • IP:Port format checking
  • Range validation

۱۷.۲ Network Validation

  • Connectivity verification
  • Protocol compliance

۱۷.۳ Authentication Validation

  • Credential format checking
  • Key file validation

17.1 Input Validation

  • IP:Port format validation, type checking, and sanitization to prevent malformed input.

17.2 Network Validation

  • Connectivity verification, protocol compliance, and response validation layers.

17.3 Authentication Validation

  • Credential format checks, key file integrity validation, and confirmation of successful authentications.

18. Protocol Support

۱۸. Protocol Support

۱۸.۱ SSH Protocol

  • پشتیبانی از SSH-2.0
  • Multiple auth methods

۱۸.۲ Network Protocols

  • IPv4 (کامل)
  • TCP optimization

18.1 SSH Protocol

  • Full SSH-2.0 support with multiple authentication methods, channel management, and shell interactions where appropriate.\li>

18.2 Network Protocols

  • IPv4 support, TCP-level optimizations, SOCKS5 proxy handling, and raw socket operations for advanced uses.

19. User Experience

۱۹. User Experience

۱۹.۱ Color Coding

  • Success: سبز | Error: قرمز | Warning: زرد | Info: آبی | Special: رنگ‌های cosmic

۱۹.۲ Real-Time Feedback

  • Instant updates و وضعیت به‌روز

۱۹.۳ Clear Screen

  • Clean UI updates و نمایش منظم

19.1 Color Coding

  • Success: green, Error: red, Warning: yellow, Info: blue, Special: cosmic palette.

19.2 Real-Time Feedback

  • Instant updates, progress indication, and fast status changes to keep users informed.

19.3 Clear Screen

  • Organized, professional terminal UI with reduced clutter and clear rendering.

20. System Integration

۲۰. System Integration

۲۰.۱ Platform Support

  • Linux x86-64 (اصلی)
  • POSIX compliance

۲۰.۲ Library Dependencies

  • libssh, OpenSSL, zstd, pthread

۲۰.۳ Resource Management

  • File descriptor management, socket management, memory management

20.1 Platform Support

  • Main target: Linux x86-64 with POSIX compliance and kernel feature usage where beneficial.

20.2 Library Dependencies

  • Depends on libssh for SSH protocol handling, OpenSSL for crypto, zstd for compression, pthread for threading, and math/libc utilities.

20.3 Resource Management

  • Careful management of file descriptors, sockets, memory, and CPU utilization to ensure stability under high load.

Troubleshooting

رفع اشکال