Skip to content

Commit

Permalink
Renamed ronin-masscan targets to ronin-masscan dump (closes #10).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Dec 14, 2023
1 parent b03b9bc commit 3933043
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 32 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Arguments:
Commands:
convert
dump
help
import
scan
targets
```

Import a binary `masscan` scan file:
Expand All @@ -62,22 +62,22 @@ Import a JSON `masscan` scan file:
$ ronin-masscan import masscan.json
```

Convert an masscan scan file to a list of `IP:PORT` pairs:
Dumps a masscan scan file to a list of `IP:PORT` pairs:

```shell
$ ronin-masscan targets --print-ip-ports masscan.bin
$ ronin-masscan dump --print-ip-ports masscan.bin
```

Convert an masscan scan file to a list of `HOST:PORT` pairs:
Dump a masscan scan file to a list of `HOST:PORT` pairs:

```shell
$ ronin-masscan targets --print-host-ports masscan.bin
$ ronin-masscan dump --print-host-ports masscan.bin
```

Convert an masscan scan file to a list of `http`://` or `https://` URIs:
Dump a masscan scan file to a list of `http`://` or `https://` URIs:

```shell
$ ronin-masscan targets --print-uris masscan.bin
$ ronin-masscan dump --print-uris masscan.bin
```

Convert a binary `masscan` scan file to CSV:
Expand Down
2 changes: 1 addition & 1 deletion gemspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ metadata:
generated_files:
- man/ronin-masscan.1
- man/ronin-masscan-convert.1
- man/ronin-masscan-dump.1
- man/ronin-masscan-import.1
- man/ronin-masscan-scan.1
- man/ronin-masscan-targets.1

required_ruby_version: ">= 3.0.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ module Masscan
class CLI
module Commands
#
# Converts masscan scan files into a list of targets.
# Dumps the scanned ports from masscan scan file(s).
#
# ## Usage
#
# ronin-masscan targets [options] XML_FILE [...]
# ronin-masscan dump [options] XML_FILE [...]
#
# ## Options
#
Expand All @@ -55,13 +55,13 @@ module Commands
#
# ## Examples
#
# ronin-masscan targets --print-ip-ports masscan.bin
# ronin-masscan targets --print-ip-ports --ports 22,80,443 masscan.bin
# ronin-masscan targets --print-host-ports masscan.bin
# ronin-masscan targets --print-hosts --with-port 22 masscan.bin
# ronin-masscan targets --print-uris masscan.bin
# ronin-masscan dump --print-ip-ports masscan.bin
# ronin-masscan dump --print-ip-ports --ports 22,80,443 masscan.bin
# ronin-masscan dump --print-host-ports masscan.bin
# ronin-masscan dump --print-hosts --with-port 22 masscan.bin
# ronin-masscan dump --print-uris masscan.bin
#
class Targets < Command
class Dump < Command

usage '[options] MASSCAN_FILE [...]'

Expand Down Expand Up @@ -99,9 +99,9 @@ class Targets < Command
'--print-uris masscan.bin'
]

description 'Converts masscan scan files into a list of targets'
description 'Dumps the scanned ports from masscan scan file(s)'

man_page 'ronin-masscan-targets.1'
man_page 'ronin-masscan-dump.1'

#
# Initializes the command.
Expand All @@ -116,7 +116,7 @@ def initialize(**kwargs)
end

#
# Runs the `ronin-masscan targets` command.
# Runs the `ronin-masscan dump` command.
#
# @param [Array<String>] masscan_files
# The nmap `.xml` files to parse.
Expand Down
28 changes: 19 additions & 9 deletions man/ronin-masscan-targets.1.md → man/ronin-masscan-dump.1.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# ronin-masscan-targets 1 "2023-03-01" Ronin "User Manuals"
# ronin-masscan-dump 1 "2023-03-01" Ronin "User Manuals"

## NAME

ronin-masscan-targets - Converts masscan scan files into a list of targets
ronin-masscan-dump - Dumps the scanned ports from masscan scan file(s)

## SYNOPSIS

`ronin-masscan targets` [options] *MASSCAN_FILE*
`ronin-masscan dump` [options] *MASSCAN_FILE*

## DESCRIPTION

Converts masscan scan files into a list of targets.
Dumps the scanned ports from masscan scan files into a variety of formats. The
output formats include:

* IP
* Hostname
* `IP:PORT`
* `HOST:PORT`
* URI

The command also supports filtering the scanned ports by IP, IP range, domain,
or port.

## ARGUMENTS

Expand Down Expand Up @@ -57,23 +67,23 @@ Converts masscan scan files into a list of targets.

Print `IP:PORT` pairs from the masscan scan file:

$ ronin-masscan targets --print-ip-ports masscan.bin
$ ronin-masscan dump --print-ip-ports masscan.bin

Print `IP:PORT` pairs with ports 22, 80, or 443, from the masscan scan file:

$ ronin-masscan targets --print-ip-ports --ports 22,80,443 masscan.bin
$ ronin-masscan dump --print-ip-ports --ports 22,80,443 masscan.bin

Print `HOST:PORT` pairs from the masscan scan file:

$ ronin-masscan targets --print-host-ports masscan.bin
$ ronin-masscan dump --print-host-ports masscan.bin

Print target hostnames from the masscan scan file:

$ ronin-masscan targets --print-hosts --with-port 22 masscan.bin
$ ronin-masscan dump --print-hosts --with-port 22 masscan.bin

Print URIs from the masscan scan file:

$ ronin-masscan targets --print-uris masscan.bin
$ ronin-masscan dump --print-uris masscan.bin

## AUTHOR

Expand Down
8 changes: 4 additions & 4 deletions man/ronin-masscan.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ scan output files, and importing scan data into the database.
*convert*
: Converts an masscan scan file to JSON or CSV.

*dump*
: Dumps the scanned ports from masscan scan files.

*import*
: Imports a masscan scan file into ronin-db.

*scan*
: Runs masscan and outputs data as JSON or CSV or imports into the database.

*targets*
: Converts masscan scan files into a list of targets.

## AUTHOR

Postmodern <[email protected]>

## SEE ALSO

[ronin-masscan-convert](ronin-masscan-convert.1.md) [ronin-masscan-import](ronin-masscan-import.1.md) [ronin-masscan-scan](ronin-masscan-scan.1.md) [ronin-masscan-targets](ronin-masscan-targets.1.md)
[ronin-masscan-convert](ronin-masscan-convert.1.md) [ronin-masscan-dump](ronin-masscan-dump.1.md) [ronin-masscan-import](ronin-masscan-import.1.md) [ronin-masscan-scan](ronin-masscan-scan.1.md)

0 comments on commit 3933043

Please sign in to comment.