ruby-amass 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1e89dca421caa03c019648a989c64b545471cf47a7796c9e70c626d96f628a72
4
+ data.tar.gz: 10ff26f9389cd237cde1ab09b8f4a1f780f202745bac4342219baae5307dc108
5
+ SHA512:
6
+ metadata.gz: 8c9a8a0816938edce764ee7b2d037adbc481bc8eb50f88f49f1b6892d4197592e0a845a3b89e0c0b757fd8b2f97760a0a93023e13233e359b6912c0713a90114
7
+ data.tar.gz: 0cebc829f9bd63ddfc48dbbe4f0936cedfbc58ef91486c4c0a27676a037c4a32e91f0167391c966423c5c1f5496b75a5f9307c094cf9246d1e5324e170dbe338
data/.document ADDED
@@ -0,0 +1,3 @@
1
+ -
2
+ ChangeLog.md
3
+ LICENSE.txt
data/.editorconfig ADDED
@@ -0,0 +1,11 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ insert_final_newline = true
6
+ tab_width = 8
7
+ trim_trailing_whitespace = true
8
+
9
+ [{Gemfile,Rakefile,*.rb,*.gemspec,*.yml}]
10
+ indent_style = space
11
+ indent_size = 2
@@ -0,0 +1,27 @@
1
+ name: CI
2
+
3
+ on: [ push, pull_request ]
4
+
5
+ jobs:
6
+ tests:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby:
12
+ - 2.6
13
+ - 2.7
14
+ - 3.0
15
+ - jruby
16
+ - truffleruby
17
+ name: Ruby ${{ matrix.ruby }}
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ - name: Install dependencies
25
+ run: bundle install --jobs 4 --retry 3
26
+ - name: Run tests
27
+ run: bundle exec rake test
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /Gemfile.lock
2
+ /coverage
3
+ /doc
4
+ /pkg
5
+ /.yardoc
6
+ .DS_Store
7
+ *.db
8
+ *.log
9
+ *.swp
10
+ *~
11
+ *.gem
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour --format documentation
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --markup markdown --title 'Ruby Amass Documentation' --protected
data/ChangeLog.md ADDED
@@ -0,0 +1,10 @@
1
+ ### 0.1.0 / 2021-11-30
2
+
3
+ * Initial release:
4
+ * Added {Amass::Command}.
5
+ * Added {Amass::OutputFile}.
6
+ * Added {Amass::Parsers::TXT}.
7
+ * Added {Amass::Parsers::JSON}.
8
+ * Added {Amass::Address}.
9
+ * Added {Amass::Hostname}.
10
+
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ # gem 'command_mapper', '~> 0.1', github: 'postmodern/command_mapper.rb'
6
+
7
+ group :development do
8
+ gem 'rake'
9
+ gem 'rubygems-tasks', '~> 0.2'
10
+ gem 'rspec', '~> 3.0'
11
+ gem 'simplecov', '~> 0.7'
12
+
13
+ gem 'kramdown'
14
+ gem 'yard', '~> 0.9'
15
+ gem 'yard-spellcheck', require: false
16
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2021 Hal Brodigan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # ruby-amass
2
+
3
+ [![CI](https://github.com/postmodern/ruby-amass/actions/workflows/ruby.yml/badge.svg)](https://github.com/postmodern/ruby-amass/actions/workflows/ruby.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/ruby-amass.svg)](https://badge.fury.io/rb/ruby-amass)
5
+
6
+ * [Source](https://github.com/postmodern/ruby-amass/)
7
+ * [Issues](https://github.com/postmodern/ruby-amass/issues)
8
+ * [Documentation](http://rubydoc.info/gems/ruby-amass/frames)
9
+
10
+ ## Description
11
+
12
+ A Ruby interface to [amass], an in-depth Attack Surface Mapping and Asset
13
+ Discovery tool.
14
+
15
+ ## Features
16
+
17
+ * Provides a [Ruby interface][Amass::Command] for running the `amass` command.
18
+ * Supports [parsing][Amass::OutputFile] Amass `.txt` and `.json` output files.
19
+
20
+ [Amass::Command]: https://rubydoc.info/gems/ruby-amass/Amass/Command
21
+ [Amass::OutputFile]: https://rubydoc.info/gems/ruby-amass/Amass/OutputFile
22
+
23
+ ## Examples
24
+
25
+ Run `amass enum -d example.com -dir ...` from Ruby:
26
+
27
+ ```ruby
28
+ require 'amass/command'
29
+
30
+ Amass::Command.run(enum: {domain: 'example.com', output_dir: '/path/to/output/dir'})
31
+ ```
32
+
33
+ Parser an `amass` JSON file:
34
+
35
+ ```ruby
36
+ require 'amass/output_file'
37
+
38
+ output_file = Amass::OutputFile.new('/path/to/amass.json')
39
+ output_file.each do |hostname|
40
+ p hostname
41
+ end
42
+ ```
43
+
44
+ ```
45
+ #<Amass::Hostname:0x0000565365b58308 @name="www.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b58538 @ip="93.184.216.34", @cidr="93.184.216.0/24", @asn=15133, @desc="EDGECAST - MCI Communications Services, Inc. d/b/a Verizon Business">, #<Amass::Address:0x0000565365b58448 @ip="2606:2800:220:1:248:1893:25c8:1946", @cidr="2606:2800:220::/48", @asn=15133, @desc="EDGECAST - MCI Communications Services, Inc. d/b/a Verizon Business">], @tag="cert", @sources=["CertSpotter"]>
46
+ #<Amass::Hostname:0x0000565365b46568 @name="example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b466f8 @ip="2606:2800:220:1:248:1893:25c8:1946", @cidr="2606:2800:220::/48", @asn=15133, @desc="EDGECAST - MCI Communications Services, Inc. d/b/a Verizon Business">, #<Amass::Address:0x0000565365b466a8 @ip="93.184.216.34", @cidr="93.184.216.0/24", @asn=15133, @desc="EDGECAST - MCI Communications Services, Inc. d/b/a Verizon Business">], @tag="cert", @sources=["CertSpotter"]>
47
+ #<Amass::Hostname:0x0000565365b44f88 @name="waterregion643.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b45078 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="api", @sources=["Sublist3rAPI"]>
48
+ #<Amass::Hostname:0x0000565365b3b7d0 @name="ringneo5.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b44100 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="api", @sources=["Sublist3rAPI"]>
49
+ #<Amass::Hostname:0x0000565365b3a628 @name="ratara72.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b3a7e0 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="api", @sources=["Sublist3rAPI"]>
50
+ #<Amass::Hostname:0x0000565365b39688 @name="serafim.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b39700 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="api", @sources=["Sublist3rAPI"]>
51
+ #<Amass::Hostname:0x0000565365b38a30 @name="a8boyyy.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b38b48 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="api", @sources=["Sublist3rAPI"]>
52
+ #<Amass::Hostname:0x0000565365b33738 @name="bikamzhaz.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b33800 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="api", @sources=["Sublist3rAPI"]>
53
+ #<Amass::Hostname:0x0000565365b324a0 @name="wwwakamai.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b32518 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="alt", @sources=["Alterations"]>
54
+ #<Amass::Hostname:0x0000565365b305b0 @name="wwwakamaiint.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b30650 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="alt", @sources=["Alterations"]>
55
+ #<Amass::Hostname:0x0000565365b2ba60 @name="billing-serafim.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b2bb50 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="alt", @sources=["Alterations"]>
56
+ #<Amass::Hostname:0x0000565365b29058 @name="bikamzhazstaff.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b29968 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="alt", @sources=["Alterations"]>
57
+ #<Amass::Hostname:0x0000565365b23680 @name="bikamzhaz-6.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b23810 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="alt", @sources=["Alterations"]>
58
+ #<Amass::Hostname:0x0000565365b22a50 @name="wwwakamaiintorigin.example.com", @domain="example.com", @addresses=[#<Amass::Address:0x0000565365b22ac8 @ip="54.144.128.85", @cidr="54.144.0.0/14", @asn=14618, @desc="AMAZON-AES - Amazon.com, Inc.">], @tag="alt", @sources=["Alterations"]>
59
+ ```
60
+
61
+ ## Requirements
62
+
63
+ * [ruby] >= 2.0.0
64
+ * [amass] >= 3.0.0
65
+ * [command_mapper] ~> 0.1
66
+
67
+ [ruby]: https://www.ruby-lang.org/
68
+ [command_mapper]: https://github.com/postmodern/command_mapper.rb#readme
69
+
70
+ ## Install
71
+
72
+ ```shell
73
+ $ gem install ruby-amass
74
+ ```
75
+
76
+ ### gemspec
77
+
78
+ ```ruby
79
+ gemspec.add_dependency 'ruby-amass', '~> 0.1'
80
+ ```
81
+
82
+ ### Gemfile
83
+
84
+ ```ruby
85
+ gem 'ruby-amass', '~> 0.1'
86
+ ```
87
+
88
+ ## License
89
+
90
+ Copyright (c) 2021 Hal Brodigan
91
+
92
+ See {file:LICENSE.txt} for license information.
93
+
94
+ [amass]: https://github.com/OWASP/Amass#readme
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+
5
+ begin
6
+ require 'bundler/setup'
7
+ rescue LoadError => e
8
+ warn e.message
9
+ warn "Run `gem install bundler` to install Bundler"
10
+ exit -1
11
+ end
12
+
13
+ require 'rubygems/tasks'
14
+ Gem::Tasks.new
15
+
16
+ require 'rspec/core/rake_task'
17
+ RSpec::Core::RakeTask.new
18
+ task :test => :spec
19
+ task :default => :spec
20
+
21
+ require 'yard'
22
+ YARD::Rake::YardocTask.new
23
+ task :doc => :yard
data/gemspec.yml ADDED
@@ -0,0 +1,28 @@
1
+ name: ruby-amass
2
+ summary: A Ruby interface to amass.
3
+ description:
4
+ A Ruby interface to amass, an in-depth Attack Surface Mapping and Asset
5
+ Discovery tool.
6
+
7
+ license: MIT
8
+ authors: Postmodern
9
+ email: postmodern.mod3@gmail.com
10
+ homepage: https://github.com/postmodern/ruby-amass#readme
11
+ has_yard: true
12
+
13
+ metadata:
14
+ documentation_uri: https://rubydoc.info/gems/ruby-amass
15
+ source_code_uri: https://github.com/postmodern/ruby-amass
16
+ bug_tracker_uri: https://github.com/postmodern/ruby-amass/issues
17
+ changelog_uri: https://github.com/postmodern/ruby-amass/blob/master/ChangeLog.md
18
+ rubygems_mfa_required: 'true'
19
+
20
+ required_ruby_version: ">= 2.0.0"
21
+
22
+ requirements: amass >= 3.0.0
23
+
24
+ dependencies:
25
+ command_mapper: ~> 0.1
26
+
27
+ development_dependencies:
28
+ bundler: ~> 2.0
@@ -0,0 +1,64 @@
1
+ module Amass
2
+ #
3
+ # An address of a hostname.
4
+ #
5
+ # @api public
6
+ #
7
+ class Address
8
+
9
+ # The IP v4 or v6 address.
10
+ #
11
+ # @return [String]
12
+ attr_reader :ip
13
+
14
+ # The CIDR mask.
15
+ #
16
+ # @return [String]
17
+ attr_reader :cidr
18
+
19
+ # The ASN number.
20
+ #
21
+ # @return [Integer]
22
+ attr_reader :asn
23
+
24
+ # The description of the address.
25
+ #
26
+ # @return [String]
27
+ attr_reader :desc
28
+
29
+ alias description desc
30
+
31
+ #
32
+ # Initializes the address.
33
+ #
34
+ # @param [String] ip
35
+ # An IP v4 or v6 address.
36
+ #
37
+ # @param [String] cidr
38
+ # The IP address in CIDR format.
39
+ #
40
+ # @param [Integer] asn
41
+ # The ASN number for the IP address.
42
+ #
43
+ # @param [String] desc
44
+ # A description of the IP address.
45
+ #
46
+ def initialize(ip: , cidr: , asn: , desc: )
47
+ @ip = ip
48
+ @cidr = cidr
49
+ @asn = asn
50
+ @desc = desc
51
+ end
52
+
53
+ #
54
+ # Converts the address to a String.
55
+ #
56
+ # @return [String]
57
+ # The IP address.
58
+ #
59
+ def to_s
60
+ @ip
61
+ end
62
+
63
+ end
64
+ end
@@ -0,0 +1,341 @@
1
+ require 'command_mapper/command'
2
+
3
+ module Amass
4
+ #
5
+ # Represents the `amass` command and it's subcommands.
6
+ #
7
+ # ## Example
8
+ #
9
+ # require 'amass/command'
10
+ #
11
+ # Amass::Command.run(enum: {domain: 'example.com', output_dir: '/path/to/output/dir'})
12
+ #
13
+ # ## `amass` subcommands
14
+ #
15
+ # ### `amass intel`
16
+ #
17
+ # * `-active` - `amass.active`
18
+ # * `-addr` - `amass.addr`
19
+ # * `-asn` - `amass.asn`
20
+ # * `-cidr` - `amass.cidr`
21
+ # * `-config` - `amass.config`
22
+ # * `-d` - `amass.domain`
23
+ # * `-demo` - `amass.demo`
24
+ # * `-df` - `amass.domains_file`
25
+ # * `-dir` - `amass.output_dir`
26
+ # * `-ef` - `amass.exclude_file`
27
+ # * `-exclude` - `amass.exclude`
28
+ # * `-help` - `amass.help`
29
+ # * `-if` - `amass.include_file`
30
+ # * `-include` - `amass.include`
31
+ # * `-ip` - `amass.ip`
32
+ # * `-ipv4` - `amass.ipv4`
33
+ # * `-ipv6` - `amass.ipv6`
34
+ # * `-list` - `amass.list`
35
+ # * `-log` - `amass.log`
36
+ # * `-max-dns-queries` - `amass.max_dns_queries`
37
+ # * `-o` - `amass.output`
38
+ # * `-org` - `amass.org`
39
+ # * `-p` - `amass.ports`
40
+ # * `-r` - `amass.resolver`
41
+ # * `-rf` - `amass.resolver_file`
42
+ # * `-src` - `amass.src`
43
+ # * `-timeout` - `amass.timeout`
44
+ # * `-v` - `amass.verbose`
45
+ # * `-whois` - `amass.whois`
46
+ #
47
+ # ### `amass enum`
48
+ #
49
+ # * `-active` - `amass.active`
50
+ # * `-addr` - `amass.addr`
51
+ # * `-asn` - `amass.asn`
52
+ # * `-aw` - `amass.alterations_wordlist_file`
53
+ # * `-awm` - `amass.alterations_wordlist_mask`
54
+ # * `-bl` - `amass.blacklist`
55
+ # * `-blf` - `amass.blacklist_file`
56
+ # * `-brute` - `amass.bruteforce`
57
+ # * `-cidr` - `amass.cidr`
58
+ # * `-config` - `amass.config`
59
+ # * `-d` - `amass.domain`
60
+ # * `-demo` - `amass.demo`
61
+ # * `-df` - `amass.domains_file`
62
+ # * `-dir` - `amass.output_dir`
63
+ # * `-ef` - `amass.exclude_file`
64
+ # * `-exclude` - `amass.exclude`
65
+ # * `-help` - `amass.help`
66
+ # * `-if` - `amass.include_file`
67
+ # * `-iface` - `amass.iface`
68
+ # * `-include` - `amass.include`
69
+ # * `-ip` - `amass.ip`
70
+ # * `-ipv4` - `amass.ipv4`
71
+ # * `-ipv6` - `amass.ipv6`
72
+ # * `-json` - `amass.json`
73
+ # * `-list` - `amass.list`
74
+ # * `-log` - `amass.log`
75
+ # * `-max-depth` - `amass.max_depth`
76
+ # * `-max-dns-queries` - `amass.max_dns_queries`
77
+ # * `-min-for-recursive` - `amass.min_for_recursive`
78
+ # * `-nf` - `amass.known_subdomains_file`
79
+ # * `-noalts` - `amass.no_alts`
80
+ # * `-nocolor` - `amass.no_color`
81
+ # * `-nolocaldb` - `amass.no_localdb`
82
+ # * `-norecursive` - `amass.no_recursive`
83
+ # * `-o` - `amass.output`
84
+ # * `-oA` - `amass.output_prefix`
85
+ # * `-p` - `amass.ports`
86
+ # * `-passive` - `amass.passive`
87
+ # * `-r` - `amass.resolver`
88
+ # * `-rf` - `amass.resolver_file`
89
+ # * `-scripts` - `amass.scripts`
90
+ # * `-share` - `amass.share`
91
+ # * `-silent` - `amass.silent`
92
+ # * `-src` - `amass.src`
93
+ # * `-timeout` - `amass.timeout`
94
+ # * `-v` - `amass.verbose`
95
+ # * `-w` - `amass.wordlist_file`
96
+ # * `-wm` - `amass.wordlist_mask`
97
+ #
98
+ # ### `amass viz`
99
+ #
100
+ # * `-config` - `amass.config`
101
+ # * `-d` - `amass.domain`
102
+ # * `-d3` - `amass.d3`
103
+ # * `-df` - `amass.domains_file`
104
+ # * `-dir` - `amass.database_dir`
105
+ # * `-dot` - `amass.dot`
106
+ # * `-enum` - `amass.enum`
107
+ # * `-gexf` - `amass.gexf`
108
+ # * `-graphistry` - `amass.graphistry`
109
+ # * `-help` - `amass.help`
110
+ # * `-i` - `amass.input`
111
+ # * `-maltego` - `amass.maltego`
112
+ # * `-nocolor` - `amass.nocolor`
113
+ # * `-o` - `amass.output`
114
+ # * `-silent` - `amass.silent`
115
+ #
116
+ # ### `amass track`
117
+ #
118
+ # * `-config` - `amass.config`
119
+ # * `-d` - `amass.domain`
120
+ # * `-df` - `amass.domains_file`
121
+ # * `-dir` - `amass.output_dir`
122
+ # * `-help` - `amass.help`
123
+ # * `-history` - `amass.history`
124
+ # * `-last` - `amass.last`
125
+ # * `-nocolor` - `amass.nocolor`
126
+ # * `-silent` - `amass.silent`
127
+ # * `-since` - `amass.since`
128
+ #
129
+ # ### `amass db`
130
+ #
131
+ # * `-config` - `amass.config`
132
+ # * `-d` - `amass.domain`
133
+ # * `-demo` - `amass.demo`
134
+ # * `-df` - `amass.domains_file`
135
+ # * `-dir` - `amass.output_dir`
136
+ # * `-enum` - `amass.enum`
137
+ # * `-help` - `amass.help`
138
+ # * `-ip` - `amass.ip`
139
+ # * `-ipv4` - `amass.ipv4`
140
+ # * `-ipv6` - `amass.ipv6`
141
+ # * `-list` - `amass.list`
142
+ # * `-names` - `amass.names`
143
+ # * `-nocolor` - `amass.nocolor`
144
+ # * `-o` - `amass.output`
145
+ # * `-show` - `amass.show`
146
+ # * `-silent` - `amass.silent`
147
+ # * `-src` - `amass.src`
148
+ # * `-summary` - `amass.summary`
149
+ #
150
+ # ### `amass dns`
151
+ #
152
+ # * `-bl` - `amass.blacklist`
153
+ # * `-blf` - `amass.blacklist_file`
154
+ # * `-config` - `amass.config`
155
+ # * `-d` - `amass.domain`
156
+ # * `-demo` - `amass.demo`
157
+ # * `-df` - `amass.domains_file`
158
+ # * `-dir` - `amass.output_dir`
159
+ # * `-help` - `amass.help`
160
+ # * `-ip` - `amass.ip`
161
+ # * `-ipv4` - `amass.ipv4`
162
+ # * `-ipv6` - `amass.ipv6`
163
+ # * `-json` - `amass.json`
164
+ # * `-log` - `amass.log`
165
+ # * `-max-dns-queries` - `amass.max_dns_queries`
166
+ # * `-nf` - `amass.known_subdomains_file`
167
+ # * `-o` - `amass.output`
168
+ # * `-oA` - `amass.output_prefix`
169
+ # * `-r` - `amass.resolver`
170
+ # * `-rf` - `amass.resolver_file`
171
+ # * `-t` - `amass.type`
172
+ # * `-timeout` - `amass.timeout`
173
+ # * `-v` - `amass.verbose`
174
+ #
175
+ # @api public
176
+ #
177
+ class Command < CommandMapper::Command
178
+
179
+ command 'amass' do
180
+ subcommand :intel do
181
+ option '-active'
182
+ option '-addr', value: true
183
+ option '-asn', value: true
184
+ option '-cidr', value: true
185
+ option '-config', value: {type: InputFile.new}
186
+ option '-d', name: :domain, value: true, repeats: true
187
+ option '-demo'
188
+ option '-df', name: :domains_file, value: true
189
+ option '-dir', name: :output_dir, value: true
190
+ option '-ef', name: :exclude_file, value: {type: InputFile.new}
191
+ option '-exclude', value: true
192
+ option '-help'
193
+ option '-if', name: :include_file, value: {type: InputFile.new}
194
+ option '-include', value: {type: List.new}
195
+ option '-ip'
196
+ option '-ipv4'
197
+ option '-ipv6'
198
+ option '-list'
199
+ option '-log', value: true
200
+ option '-max-dns-queries', value: {type: Num.new}
201
+ option '-o', name: :output, value: true
202
+ option '-org', value: true
203
+ option '-p', name: :ports, value: {type: List.new}
204
+ option '-r', name: :resolver, value: true, repeats: true
205
+ option '-rf', name: :resolver_file, value: true
206
+ option '-src'
207
+ option '-timeout', value: {type: Num.new}
208
+ option '-v', name: :verbose
209
+ option '-whois'
210
+ end
211
+
212
+ subcommand :enum do
213
+ option '-active'
214
+ option '-addr', value: true
215
+ option '-asn', value: true
216
+ option '-aw', name: :alterations_wordlist_file, value: {type: InputFile.new}
217
+ option '-awm', name: :alterations_wordlist_mask, value: true
218
+ option '-bl', name: :blacklist, value: true
219
+ option '-blf', name: :blacklist_file, value: {type: InputFile.new}
220
+ option '-brute', name: :bruteforce
221
+ option '-cidr', value: true, repeats: true
222
+ option '-config', value: {type: InputFile.new}
223
+ option '-d', name: :domain, value: true, repeats: true
224
+ option '-demo'
225
+ option '-df', name: :domains_file, value: {type: InputFile.new}
226
+ option '-dir', name: :output_dir, value: true
227
+ option '-ef', name: :exclude_file, value: {type: InputFile.new}
228
+ option '-exclude', value: true
229
+ option '-help'
230
+ option '-if', name: :include_file, value: {type: InputFile.new}
231
+ option '-iface', value: true
232
+ option '-include', value: {type: List.new}
233
+ option '-ip'
234
+ option '-ipv4'
235
+ option '-ipv6'
236
+ option '-json', value: true
237
+ option '-list'
238
+ option '-log', value: true
239
+ option '-max-depth', value: {type: Num.new}
240
+ option '-max-dns-queries', value: {type: Num.new}
241
+ option '-min-for-recursive', value: {type: Num.new}
242
+ option '-nf', name: :known_subdomains_file, value: {type: InputFile.new}
243
+ option '-noalts', name: :no_alts
244
+ option '-nocolor', name: :no_color
245
+ option '-nolocaldb', name: :no_localdb
246
+ option '-norecursive', name: :no_recursive
247
+ option '-o', name: :output, value: true
248
+ option '-oA', name: :output_prefix, value: true
249
+ option '-p', name: :ports, value: {type: List.new}
250
+ option '-passive'
251
+ option '-r', name: :resolver, value: true, repeats: true
252
+ option '-rf', name: :resolver_file, value: true
253
+ option '-scripts', value: {type: InputDir.new}
254
+ option '-share'
255
+ option '-silent'
256
+ option '-src'
257
+ option '-timeout', value: {type: Num.new}
258
+ option '-v', name: :verbose
259
+ option '-w', name: :wordlist_file, value: {type: InputFile.new}
260
+ option '-wm', name: :wordlist_mask, value: true
261
+ end
262
+
263
+ subcommand :viz do
264
+ option '-config', value: true
265
+ option '-d', name: :domain, value: true, repeats: true
266
+ option '-d3'
267
+ option '-df', name: :domains_file, value: true
268
+ option '-dir', name: :database_dir, value: true
269
+ option '-dot'
270
+ option '-enum', value: {type: Num.new}
271
+ option '-gexf'
272
+ option '-graphistry'
273
+ option '-help'
274
+ option '-i', name: :input, value: {type: InputFile.new}
275
+ option '-maltego'
276
+ option '-nocolor'
277
+ option '-o', name: :output, value: true
278
+ option '-silent'
279
+ end
280
+
281
+ subcommand :track do
282
+ option '-config', value: {type: InputFile.new}
283
+ option '-d', name: :domain, value: true, repeats: true
284
+ option '-df', name: :domains_file, value: true
285
+ option '-dir', name: :output_dir, value: true
286
+ option '-help'
287
+ option '-history'
288
+ option '-last', value: {type: Num.new}
289
+ option '-nocolor'
290
+ option '-silent'
291
+ option '-since', value: true
292
+ end
293
+
294
+ subcommand :db do
295
+ option '-config', value: {type: InputFile.new}
296
+ option '-d', name: :domain, value: true, repeats: true
297
+ option '-demo'
298
+ option '-df', name: :domains_file, value: true
299
+ option '-dir', name: :output_dir, value: true
300
+ option '-enum', value: {type: Num.new}
301
+ option '-help'
302
+ option '-ip'
303
+ option '-ipv4'
304
+ option '-ipv6'
305
+ option '-list'
306
+ option '-names'
307
+ option '-nocolor'
308
+ option '-o', name: :output, value: true
309
+ option '-show'
310
+ option '-silent'
311
+ option '-src'
312
+ option '-summary'
313
+ end
314
+
315
+ subcommand :dns do
316
+ option '-bl', name: :blacklist, value: true
317
+ option '-blf', name: :blacklist_file, value: {type: InputFile.new}
318
+ option '-config', value: {type: InputFile.new}
319
+ option '-d', name: :domain, value: true, repeats: true
320
+ option '-demo'
321
+ option '-df', name: :domains_file, value: true
322
+ option '-dir', name: :output_dir, value: true
323
+ option '-help'
324
+ option '-ip'
325
+ option '-ipv4'
326
+ option '-ipv6'
327
+ option '-json', value: true
328
+ option '-log', value: true
329
+ option '-max-dns-queries', value: {type: Num.new}
330
+ option '-nf', name: :known_subdomains_file, value: {type: InputFile.new}
331
+ option '-o', name: :output, value: true
332
+ option '-oA', name: :output_prefix, value: true
333
+ option '-r', name: :resolver, value: true, repeats: true
334
+ option '-rf', name: :resolver_file, value: true
335
+ option '-t', name: :type, value: true, repeats: true
336
+ option '-timeout', value: {type: Num.new}
337
+ option '-v', name: :verbose
338
+ end
339
+ end
340
+ end
341
+ end