ronin-rb / ronin-support

A support library for Ronin. Like activesupport, but for hacking!
https://ronin-rb.dev
GNU Lesser General Public License v3.0
27 stars 10 forks source link

Add a `Network::Wildcard#===`/`#include?` method #539

Closed postmodern closed 6 days ago

postmodern commented 2 weeks ago

It should be possible to compare a Network::Wildcard object with another host name or even TLD.

Example

wildcard = Network::Wildcard.new('*.example.com')
wildcard === 'www.example.com'
# => true
wildcard = Network::Wildcard.new('gov.*')
wildcard === 'gov.ac'
# => true
postmodern commented 6 days ago

Implemented by 187888a.