JavaToolbox banner

JavaToolbox

3 devlogs
7h 29m 50s

Java ToolBox is a high-performance network security utility designed to demonstrate the power of modern concurrency in systems programming. At its core, it implements a native TCP Connect Scan (-sT) logic using Java 21 Virtual Threads (Project Loo…

Java ToolBox is a high-performance network security utility designed to demonstrate the power of modern concurrency in systems programming. At its core, it implements a native TCP Connect Scan (-sT) logic using Java 21 Virtual Threads (Project Loom).

By using lightweight virtual threads instead of traditional OS-level threads, the toolbox can handle massive concurrency with minimal overhead, achieving performance parity with industry-standard tools like nmap while remaining entirely transparent in its implementation.

Key Technical Highlights:

  • Project Loom Integration: Dispatches thousands of concurrent probes without thread exhaustion.
  • Native Implementation: Written from scratch to expose the “under the hood” mechanics of TCP handshakes.
  • Modular Security Suite: Beyond scanning, includes subnet discovery engines and cryptographic utilities (XOR/Hex).
This project uses AI

i used ai to help design the port-scanning logic, and improve the documentation. i reviewed and adjusted the code myself to make sure it worked correctly.

Demo Repository

Loading README...

FarciarzYT

Shipped this project!

Hours: 7.5
Cookies: 🍪 180
Multiplier: 24.07 cookies/hr

Java ToolBox: Performance-first Network Security Suite

I just shipped the first version of Java ToolBox for Week 1 of Lock In! This is a from-scratch implementation of a multi-threaded TCP Port Scanner (-sT logic) leveraging Java 21 Virtual Threads (Project Loom).

Unlike traditional scanners that bottleneck on OS threads, this toolkit handles thousands of concurrent probes with massive efficiency.

What’s inside:

  • Native TCP Connect scanning engine
  • CIDR-based subnet discovery
  • Modular Cipher Tools (XOR/Hex encryption)
  • Zero external dependencies — pure Java 21 engineering

This was a deep dive into the “under the hood” mechanics of networking and modern concurrency.

I learned that Java is a bad language for this task but i made it work !
(better would be Python or C++)

FarciarzYT

DEVLOG #3: CIPHER TOOLS & PERFORMANCE

New Module: XOR Cipher

  • Implemented a functional XOR cipher engine as the first entry in the Cipher Tools module
  • Output rendered in hex format for readability and compatibility with standard tooling
  • Zero external dependencies — pure Java, built on the same architecture as the rest of the toolkit

Performance Improvement: Subnet Scanner

  • Refactored the subnet discovery module for better throughput under load
  • Reduced unnecessary overhead in host resolution loop, tightening the scan cycle
  • The Virtual Thread pool now handles subnet ranges more efficiently with lower latency per host
0
FarciarzYT

DEVLOG #2: Subnet Scanning and Cipher Tools
Expanded Networking: Subnet Scanning

  • Scale: Moved beyond single-target scanning to full subnet discovery (CIDR support)
  • Code Reusability: Decoupled the core TCP scanning engine from target selection to allow for modular reuse
  • Concurrency: Maintained high performance by dispatching subnet tasks to the existing Virtual Thread pool

New Module: Cipher Tools

  • Initiated the Cipher module for cryptographic operations
  • Integrating AES-256 encryption to provide a balanced offensive/defensive feature set
  • Focusing on a zero-dependency implementation using standard Java security libraries

Now i understand why hacking software is written in C++/Python but i will continue to use Java so i will learn new things maybe when making some other project i will use other language

0
FarciarzYT

DEVLOG #1: Port Scanning
Under the Hood:

  • Dynamic Entry: Flexible target selection via CLI arguments with fallback defaults.
  • Fail-Fast Validation: Pre-scan verification (DNS + TCP/ICMP ping) to prevent wasting resources on unreachable hosts.
  • Thread-Safe Logging: Synchronized I/O to ensure clean, race-condition-free result logging.
  • Project Loom & Flow Control: Leveraging Java 21 Virtual Threads for massive scalability, throttled by a Semaphore to prevent network congestion.
  • Native -sT Logic: A clean-room implementation of the standard TCP Connect scan using low-level sockets.
  • Lock-Free Concurrency: High-performance tracking using AtomicInteger for non-blocking progress monitoring across 65k+ tasks.

Check out demo video:

0