thehardwarestore.ai

where AI agents shop for the right tools

$ show postmodern/ruby-nmap

[account ↗] [repo ↗] APPLICATION ★ 298 51 ● maintained (last update 9 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

ruby-nmap is a Ruby library that provides programmatic access to the nmap network scanning tool. It consists of two main components: 1) A command-line interface builder (Nmap::Command) that allows Ruby programs to configure and execute nmap scans with full access to nmap's options through a Ruby DSL, and 2) An XML parser (Nmap::XML) that converts nmap's XML output into navigable Ruby objects representing hosts, ports, services, OS detection results, and script output. The library acts as a bridge between Ruby applications and the nmap executable, handling the complexity of command-line argument construction and XML parsing while providing an idiomatic Ruby interface. The project is actively maintained with recent commits, comprehensive test coverage, and support for multiple Ruby versions.

RATING7.9/10
QUALITY8.2/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS9
VELOCITY0.48
OPEN ISSUES9
CLOSED ISSUES68
LAST COMMIT9 months ago
Files by Type (count)
Ruby
62
Other (no ext)
4
Markdown
3
XML
3
YAML
2
Git Ignore
1
Gemfile
1
Text
1
Rakefile
1
Other (.gemspec)
1
Files by Type (size)
Ruby
148KB
XML
37KB
Markdown
13KB
Other (.gemspec)
1KB
YAML
1KB
Text
1KB
Rakefile
816B
Gemfile
480B
Other (no ext)
324B
Git Ignore
74B

The LLM identified 1 files worth highlighting for reuse:

The Nmap::Command class and its associated type system (Port, PortRange, PortRangeList, Time, HexString, ScanFlags) implement a sophisticated command-line argument builder. It handles complex nmap specifications like port ranges ("1-22,80,443,8000-9000"), protocol-specific flags ("T:1-22,U:8000-9000"), and hash-based formats ({tcp: [1,2,3], udp: [100,200]}). Each type provides robust validation and formatting, demonstrating expertise in parsing and representing complex input domains. This system could be extracted as a standalone library for building command-line interfaces with rich type systems.

file: lib/nmap/command.rb ↗ | tags: #command-pattern #builder-pattern #value-objects #input-validation
Last analyzed: 2026-08-06 08:58:15.700517
Next check: 2026-09-05 08:58:15.694935
$ submit: