Skip to content

Commit

Permalink
Added a ronin new nmap command alias to ronin-nmap new (closes #250
Browse files Browse the repository at this point in the history
…).
  • Loading branch information
postmodern committed Nov 25, 2024
1 parent 0b5807b commit cf2d400
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,12 @@ Generate a new Ruby project with a `Gemfile`:
$ ronin new project foo
```
Generates a new [ronin-nmap] Ruby script:
```shell
$ ronin new nmap scan.rb
```
Generate a new [nokogiri] Ruby script for parsing HTML/XML:
[nokogiri]: https://nokogiri.org/
Expand Down
35 changes: 35 additions & 0 deletions lib/ronin/cli/commands/new/nmap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# frozen_string_literal: true
#
# Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
#
# Ronin is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ronin is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
#

require_relative '../../command'

require 'ronin/nmap/cli/commands/new'

module Ronin
class CLI
module Commands
class New < Command
# An alias for `ronin-nmap new`.
#
# @since 2.2.0
class Nmap < Ronin::Nmap::CLI::Commands::New
end
end
end
end
end
4 changes: 4 additions & 0 deletions man/ronin-new.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Creates a new project or script.
*script*
: Generates a new standalone Ruby script.

*nmap*
: Generates a new `ronin-nmap` Ruby script.
See https://github.com/ronin-rb/ronin-nmap#readme

*nokogiri*
: Generates a new Nokogiri Ruby script for parsing HTML/XML.
See https://nokogiri.org/
Expand Down

0 comments on commit cf2d400

Please sign in to comment.