ronin-db 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d310dd9211968ccd20e1f7f7962673217fac978bb9d1698a443db713196be894
4
- data.tar.gz: a279d215f78d2e40d04a2ff6519537ed275be707d1adeba2450bbe805a688009
3
+ metadata.gz: e887e863b916cfbb31dcccf48adfb04ed662e5ecc8012e749d6389f1b9149a5a
4
+ data.tar.gz: 698d79788a12a30cd7fd03d9295d76dfe98e12911aef13d4a830f35c1a99ac29
5
5
  SHA512:
6
- metadata.gz: 73778356b09c0ec1f7ff37f7faba38c64c46d23d5b44aeed49a78248bd5c72794e2057a690c1bacdced48d522f2cdec4dc65b628e64580dc0a9d640d5a6968c6
7
- data.tar.gz: 18edf72f11d0748f17b4a8f18541fdcdc45b541053231cbf3b75c40f5dbb68a8a943e19654b8081a28b5d3348c9772304ead95f38810825fc448e5ed6ceb442b
6
+ metadata.gz: 655172b999161aeec34794d90fd279e8d468e280a67b07f1db03f3659facedc99ad053c508e9245e40bb6623fae792cec2f241a476ece1fe178bbcd75674c198
7
+ data.tar.gz: 21e77b67c29ed5cc37aea7888d80b0547375eb7140bf1491283789750505ef35344bd53b185aef251b36a7186cb33001aa849728b2c6f13cb3a618b3ba916448
data/.document CHANGED
@@ -2,4 +2,3 @@ lib/**/*.rb
2
2
  -
3
3
  ChangeLog.md
4
4
  COPYING.txt
5
- man/*.md
@@ -16,7 +16,7 @@ jobs:
16
16
  - truffleruby
17
17
  name: Ruby ${{ matrix.ruby }}
18
18
  steps:
19
- - uses: actions/checkout@v2
19
+ - uses: actions/checkout@v4
20
20
  - name: Set up Ruby
21
21
  uses: ruby/setup-ruby@v1
22
22
  with:
@@ -35,7 +35,7 @@ jobs:
35
35
  rubocop:
36
36
  runs-on: ubuntu-latest
37
37
  steps:
38
- - uses: actions/checkout@v2
38
+ - uses: actions/checkout@v4
39
39
  - name: Set up Ruby
40
40
  uses: ruby/setup-ruby@v1
41
41
  with:
data/ChangeLog.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### 0.1.3 / 2023-12-13
2
+
3
+ * Fixed a bug in {Ronin::DB::ConfigFile.edit} when `YAML::Store` would attempt
4
+ to create the config file but the parent directory did not exist yet.
5
+
6
+ ### 0.1.2 / 2023-09-19
7
+
8
+ * Fixed a typo in an exception message in {Ronin::DB.connect}.
9
+ * Documentation fixes and improvements.
10
+
1
11
  ### 0.1.1 / 2023-06-09
2
12
 
3
13
  #### CLI
data/README.md CHANGED
@@ -9,7 +9,6 @@
9
9
  * [Issues](https://github.com/ronin-rb/ronin-db/issues)
10
10
  * [Documentation](https://ronin-rb.dev/docs/ronin-db/frames)
11
11
  * [Discord](https://discord.gg/6WAb3PsVX9) |
12
- [Twitter](https://twitter.com/ronin_rb) |
13
12
  [Mastodon](https://infosec.exchange/@ronin_rb)
14
13
 
15
14
  ## Description
@@ -26,11 +26,11 @@ module Ronin
26
26
  class CLI
27
27
  module Commands
28
28
  #
29
- # Queries all credentials in the database.
29
+ # Manages all credentials in the database.
30
30
  #
31
31
  # ## Usage
32
32
  #
33
- # ronin creds [options]
33
+ # ronin-db creds [options]
34
34
  #
35
35
  # ## Options
36
36
  #
@@ -41,8 +41,8 @@ module Ronin
41
41
  # --import FILE Imports the values from the FILE into the database
42
42
  # --delete VALUE Deletes a value from the database
43
43
  # --delete-all Deletes all values from the database
44
- # -u, --user [USER] Username to search for.
45
- # -p, --password [PASS] Password to search for.
44
+ # -u, --for-user USER Username to search for
45
+ # -p, --with-password PASSWORD Password to search for
46
46
  #
47
47
  class Creds < ModelCommand
48
48
 
@@ -51,25 +51,25 @@ module Ronin
51
51
  model_file 'ronin/db/credential'
52
52
  model_name 'Credential'
53
53
 
54
- option :user, short: '-u',
55
- value: {
56
- type: String,
57
- usage: 'USER'
58
- },
59
- desc: 'Username to search for' do |user|
60
- @query_method_calls << [:for_user, [user]]
61
- end
62
-
63
- option :password, short: '-P',
54
+ option :for_user, short: '-u',
64
55
  value: {
65
56
  type: String,
66
- usage: 'PASSWORD'
57
+ usage: 'USER'
67
58
  },
68
- desc: 'Password to search for' do |password|
69
- @query_method_calls << [:with_password, [password]]
59
+ desc: 'Username to search for' do |user|
60
+ @query_method_calls << [:for_user, [user]]
70
61
  end
71
62
 
72
- description 'Queries all credentials in the database'
63
+ option :with_password, short: '-P',
64
+ value: {
65
+ type: String,
66
+ usage: 'PASSWORD'
67
+ },
68
+ desc: 'Password to search for' do |password|
69
+ @query_method_calls << [:with_password, [password]]
70
+ end
71
+
72
+ description 'Manages all credentials in the database'
73
73
 
74
74
  man_page 'ronin-db-creds.1'
75
75
 
@@ -21,6 +21,7 @@
21
21
  require 'ronin/db/exceptions'
22
22
  require 'ronin/db/home'
23
23
 
24
+ require 'fileutils'
24
25
  require 'yaml'
25
26
  require 'yaml/store'
26
27
 
@@ -65,21 +66,21 @@ module Ronin
65
66
  #
66
67
  def self.validate(path,data)
67
68
  unless data.kind_of?(Hash)
68
- raise(InvalidConfig)
69
+ raise(InvalidConfig,"config data must be a Hash: #{data.inspect}")
69
70
  end
70
71
 
71
72
  data.each do |key,value|
72
- unless (key.kind_of?(Symbol) || key.kind_of?(String))
73
- raise(InvalidConfig)
73
+ unless key.kind_of?(Symbol)
74
+ raise(InvalidConfig,"all Hash keys must be a Symbol: #{key.inspect}")
74
75
  end
75
76
 
76
77
  unless value.kind_of?(Hash)
77
- raise(InvalidConfig)
78
+ raise(InvalidConfig,"all Hash values must also be a Hash: #{value.inspect}")
78
79
  end
79
80
 
80
81
  value.each_key do |sub_key|
81
- unless (sub_key.kind_of?(Symbol) || sub_key.kind_of?(String))
82
- raise(InvalidConfig)
82
+ unless sub_key.kind_of?(Symbol)
83
+ raise(InvalidConfig,"all sub-keys must be a Symbol: #{sub_key.inspect}")
83
84
  end
84
85
  end
85
86
  end
@@ -124,8 +125,12 @@ module Ronin
124
125
  # The loaded YAML configuration data.
125
126
  #
126
127
  def self.edit(path=PATH,&block)
127
- store = YAML::Store.new(path)
128
+ unless File.file?(path)
129
+ # create the parent directory for YAML::Store
130
+ FileUtils.mkdir_p(File.dirname(path))
131
+ end
128
132
 
133
+ store = YAML::Store.new(path)
129
134
  store.transaction(&block)
130
135
  end
131
136
  end
@@ -20,7 +20,16 @@
20
20
 
21
21
  module Ronin
22
22
  module DB
23
+ #
24
+ # Indicates that the given database name is not in the config file.
25
+ #
23
26
  class UnknownDatabase < RuntimeError
24
27
  end
28
+
29
+ #
30
+ # Indicates that the config file is corrupted.
31
+ #
32
+ class InvalidConfig < RuntimeError
33
+ end
25
34
  end
26
35
  end
@@ -21,6 +21,6 @@
21
21
  module Ronin
22
22
  module DB
23
23
  # ronin-db version
24
- VERSION = '0.1.1'
24
+ VERSION = '0.1.3'
25
25
  end
26
26
  end
data/lib/ronin/db.rb CHANGED
@@ -86,8 +86,19 @@ module Ronin
86
86
  # Specifies whether to load all models or just connect to the database.
87
87
  #
88
88
  # @raise [UnknownDatabase]
89
+ # The database name was not listed in the config file.
89
90
  #
90
91
  # @raise [ArgumentError]
92
+ # The given database was not a Symbol or a Hash.
93
+ #
94
+ # @example Connect to the default database (`~/.local/share/ronin-db/default.sqlite3`):
95
+ # DB.connect
96
+ #
97
+ # @example Connect to a specific database from the configuration file (`~/.config/ronin-db/databases.yml`):
98
+ # DB.connect(:my_database)
99
+ #
100
+ # @example Connect to an arbitrary database:
101
+ # Db.connect({adapter: 'sqlite3', database: '/path/to/database.sqlite3'})
91
102
  #
92
103
  # @api semipublic
93
104
  #
@@ -100,7 +111,7 @@ module Ronin
100
111
  raise(UnknownDatabase,"unknown database: #{database.inspect}")
101
112
  end
102
113
  else
103
- raise(ArgumentError,"#{self.class}.#{__method__} only accepts a Symbol or a Hash")
114
+ raise(ArgumentError,"#{self}.#{__method__} only accepts a Symbol or a Hash")
104
115
  end
105
116
 
106
117
  # load activerecord
data/man/ronin-db-add.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-add 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db add\fR \[lB]\fIoptions\fP\[rB] \fINAME\fP \[lB]\fIURI\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
data/man/ronin-db-asn.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-asn 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db asn\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -20,8 +20,16 @@ The database name to connect to\. Defaults to \fBdefault\fR if not given\.
20
20
  .LP
21
21
  .TP
22
22
  \fB--db-uri\fR \fIURI\fP
23
- The explicit database URI to connect to
24
- (ex: \fBpostgres://user:password@host/db\fR)\.
23
+ The explicit database URI to connect to\.
24
+ .LP
25
+ .RS
26
+ .IP \(bu 2
27
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
28
+ .IP \(bu 2
29
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
30
+ .IP \(bu 2
31
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
32
+ .RE
25
33
  .LP
26
34
  .TP
27
35
  \fB-v\fR, \fB--verbose\fR
@@ -14,8 +14,11 @@ Queries or updates Autonomous System Numbers (ASNs) in the database.
14
14
  The database name to connect to. Defaults to `default` if not given.
15
15
 
16
16
  `--db-uri` *URI*
17
- The explicit database URI to connect to
18
- (ex: `postgres://user:password@host/db`).
17
+ The explicit database URI to connect to.
18
+
19
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
20
+ * **mysql**: `mysql://user:password@host/database`
21
+ * **postgres**: `postgres://user:password@host/database`
19
22
 
20
23
  `-v`, `--verbose`
21
24
  Enables verbose output
data/man/ronin-db-creds.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-creds 1 "2023-01-02" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db creds\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -20,8 +20,16 @@ The database to connect to\. Defaults to \fBdefault\fR if not given\.
20
20
  .LP
21
21
  .TP
22
22
  \fB--db-uri\fR \fIURI\fP
23
- The explicit database URI to connect to
24
- (ex: \fBmysql://user:password@host/ronin\fR)\.
23
+ The explicit database URI to connect to\.
24
+ .LP
25
+ .RS
26
+ .IP \(bu 2
27
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
28
+ .IP \(bu 2
29
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
30
+ .IP \(bu 2
31
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
32
+ .RE
25
33
  .LP
26
34
  .TP
27
35
  \fB-v\fR, \fB--verbose\fR
@@ -45,11 +53,15 @@ Deletes every credential from the database\.
45
53
  .LP
46
54
  .TP
47
55
  \fB-u\fR, \fB--for-user\fR \fIUSER\fP
48
- Searches for credentials associated with the USER\.
56
+ Searches for credentials associated with the \fIUSER\fP\.
49
57
  .LP
50
58
  .TP
51
59
  \fB-p\fR, \fB--with-password\fR \fIPASSWORD\fP
52
- Searches for credentials that have the PASSWORD\.
60
+ Searches for credentials that have the \fIPASSWORD\fP\.
61
+ .LP
62
+ .TP
63
+ \fB-h\fR, \fB--help\fR
64
+ Print help information\.
53
65
  .LP
54
66
  .SH ENVIRONMENT
55
67
  .LP
@@ -14,8 +14,11 @@ Manages credentials.
14
14
  The database to connect to. Defaults to `default` if not given.
15
15
 
16
16
  `--db-uri` *URI*
17
- The explicit database URI to connect to
18
- (ex: `mysql://user:password@host/ronin`).
17
+ The explicit database URI to connect to.
18
+
19
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
20
+ * **mysql**: `mysql://user:password@host/database`
21
+ * **postgres**: `postgres://user:password@host/database`
19
22
 
20
23
  `-v`, `--verbose`
21
24
  Enable verbose output.
@@ -33,10 +36,13 @@ Manages credentials.
33
36
  Deletes every credential from the database.
34
37
 
35
38
  `-u`, `--for-user` *USER*
36
- Searches for credentials associated with the USER.
39
+ Searches for credentials associated with the *USER*.
37
40
 
38
41
  `-p`, `--with-password` *PASSWORD*
39
- Searches for credentials that have the PASSWORD.
42
+ Searches for credentials that have the *PASSWORD*.
43
+
44
+ `-h`, `--help`
45
+ Print help information.
40
46
 
41
47
  ## ENVIRONMENT
42
48
 
data/man/ronin-db-edit.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-edit 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db edit\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-emails 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db emails\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -20,8 +20,16 @@ The database to connect to\. Defaults to \fBdefault\fR if not given\.
20
20
  .LP
21
21
  .TP
22
22
  \fB--db-uri\fR \fIURI\fP
23
- The explicit database URI to connect to
24
- (ex: \fBmysql://user:password@host/ronin\fR)\.
23
+ The explicit database URI to connect to\.
24
+ .LP
25
+ .RS
26
+ .IP \(bu 2
27
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
28
+ .IP \(bu 2
29
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
30
+ .IP \(bu 2
31
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
32
+ .RE
25
33
  .LP
26
34
  .TP
27
35
  \fB-v\fR, \fB--verbose\fR
@@ -51,10 +59,14 @@ Searches for email addresses associated with the \fIHOST\fP\.
51
59
  \fB-I\fR, \fB--with-ip\fR \fIIP\fP
52
60
  Searches for email addresses associated with the IP address\.
53
61
  .LP
54
- .HP
62
+ .PP
55
63
  \fB-u\fR, \fB--with-users\fR \fINAME\fP \[lB]\.\.\.\[rB]
56
64
  Searches for email addresses associated with the user NAME(s)\.
57
65
  .LP
66
+ .TP
67
+ \fB-h\fR, \fB--help\fR
68
+ Print help information\.
69
+ .LP
58
70
  .SH ENVIRONMENT
59
71
  .LP
60
72
  .TP
@@ -14,8 +14,11 @@ Manages email addresses.
14
14
  The database to connect to. Defaults to `default` if not given.
15
15
 
16
16
  `--db-uri` *URI*
17
- The explicit database URI to connect to
18
- (ex: `mysql://user:password@host/ronin`).
17
+ The explicit database URI to connect to.
18
+
19
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
20
+ * **mysql**: `mysql://user:password@host/database`
21
+ * **postgres**: `postgres://user:password@host/database`
19
22
 
20
23
  `-v`, `--verbose`
21
24
  Enable verbose output.
@@ -41,6 +44,9 @@ Manages email addresses.
41
44
  `-u`, `--with-users` *NAME* [...]
42
45
  Searches for email addresses associated with the user NAME(s).
43
46
 
47
+ `-h`, `--help`
48
+ Print help information.
49
+
44
50
  ## ENVIRONMENT
45
51
 
46
52
  *HOME*
data/man/ronin-db-hosts.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-hosts 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db hosts\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -20,8 +20,16 @@ The database to connect to\. Defaults to \fBdefault\fR if not given\.
20
20
  .LP
21
21
  .TP
22
22
  \fB--db-uri\fR \fIURI\fP
23
- The explicit database URI to connect to
24
- (ex: \fBmysql://user:password@host/ronin\fR)\.
23
+ The explicit database URI to connect to\.
24
+ .LP
25
+ .RS
26
+ .IP \(bu 2
27
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
28
+ .IP \(bu 2
29
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
30
+ .IP \(bu 2
31
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
32
+ .RE
25
33
  .LP
26
34
  .TP
27
35
  \fB-v\fR, \fB--verbose\fR
@@ -59,6 +67,10 @@ Searches for HostNames belonging to the DOMAIN (\fBco.uk\fR)\.
59
67
  \fB-T\fR, \fB--tld\fR \fITLD\fP
60
68
  Searches for HostNames with the Top\-Level\-Domain (TLD) (\fBru\fR)\.
61
69
  .LP
70
+ .TP
71
+ \fB-h\fR, \fB--help\fR
72
+ Print help information\.
73
+ .LP
62
74
  .SH ENVIRONMENT
63
75
  .LP
64
76
  .TP
@@ -14,8 +14,11 @@ Manages host names.
14
14
  The database to connect to. Defaults to `default` if not given.
15
15
 
16
16
  `--db-uri` *URI*
17
- The explicit database URI to connect to
18
- (ex: `mysql://user:password@host/ronin`).
17
+ The explicit database URI to connect to.
18
+
19
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
20
+ * **mysql**: `mysql://user:password@host/database`
21
+ * **postgres**: `postgres://user:password@host/database`
19
22
 
20
23
  `-v`, `--verbose`
21
24
  Enable verbose output.
@@ -44,6 +47,9 @@ Manages host names.
44
47
  `-T`, `--tld` *TLD*
45
48
  Searches for HostNames with the Top-Level-Domain (TLD) (`ru`).
46
49
 
50
+ `-h`, `--help`
51
+ Print help information.
52
+
47
53
  ## ENVIRONMENT
48
54
 
49
55
  *HOME*
data/man/ronin-db-ips.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-ips 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db ips\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -20,8 +20,16 @@ The database to connect to\. Defaults to \fBdefault\fR if not given\.
20
20
  .LP
21
21
  .TP
22
22
  \fB--db-uri\fR \fIURI\fP
23
- The explicit database URI to connect to
24
- (ex: \fBmysql://user:password@host/ronin\fR)\.
23
+ The explicit database URI to connect to\.
24
+ .LP
25
+ .RS
26
+ .IP \(bu 2
27
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
28
+ .IP \(bu 2
29
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
30
+ .IP \(bu 2
31
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
32
+ .RE
25
33
  .LP
26
34
  .TP
27
35
  \fB-v\fR, \fB--verbose\fR
@@ -63,6 +71,10 @@ Searches for IP addresses associated with the MAC address\.
63
71
  \fB-I\fR, \fB--with-host\fR \fIHOST\fP
64
72
  Searches for IP addresses associated with the \fIHOST\fP\.
65
73
  .LP
74
+ .TP
75
+ \fB-h\fR, \fB--help\fR
76
+ Print help information\.
77
+ .LP
66
78
  .SH ENVIRONMENT
67
79
  .LP
68
80
  .TP
@@ -14,8 +14,11 @@ Manages IP addresses.
14
14
  The database to connect to. Defaults to `default` if not given.
15
15
 
16
16
  `--db-uri` *URI*
17
- The explicit database URI to connect to
18
- (ex: `mysql://user:password@host/ronin`).
17
+ The explicit database URI to connect to.
18
+
19
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
20
+ * **mysql**: `mysql://user:password@host/database`
21
+ * **postgres**: `postgres://user:password@host/database`
19
22
 
20
23
  `-v`, `--verbose`
21
24
  Enable verbose output.
@@ -47,6 +50,9 @@ Manages IP addresses.
47
50
  `-I`, `--with-host` *HOST*
48
51
  Searches for IP addresses associated with the *HOST*.
49
52
 
53
+ `-h`, `--help`
54
+ Print help information.
55
+
50
56
  ## ENVIRONMENT
51
57
 
52
58
  *HOME*
data/man/ronin-db-irb.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-irb 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db irb\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -23,6 +23,15 @@ specified\.
23
23
  \fB--db-uri\fR \fIURI\fP
24
24
  The database URI to connect to\.
25
25
  .LP
26
+ .RS
27
+ .IP \(bu 2
28
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
29
+ .IP \(bu 2
30
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
31
+ .IP \(bu 2
32
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
33
+ .RE
34
+ .LP
26
35
  .TP
27
36
  \fB--no-connect\fR
28
37
  Causes the Ruby shell to not connect to a database on startup\.
@@ -17,6 +17,10 @@ Connects to a database and start an interactive Ruby shell.
17
17
  `--db-uri` *URI*
18
18
  The database URI to connect to.
19
19
 
20
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
21
+ * **mysql**: `mysql://user:password@host/database`
22
+ * **postgres**: `postgres://user:password@host/database`
23
+
20
24
  `--no-connect`
21
25
  Causes the Ruby shell to not connect to a database on startup.
22
26
 
data/man/ronin-db-list.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-list 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db list\fR \[lB]\fIoptions\fP\[rB] \[lB]\fINAME\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-migrate 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db migrate\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -23,6 +23,15 @@ specified\.
23
23
  \fB--db-uri\fR \fIURI\fP
24
24
  The database URI to connect to\.
25
25
  .LP
26
+ .RS
27
+ .IP \(bu 2
28
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
29
+ .IP \(bu 2
30
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
31
+ .IP \(bu 2
32
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
33
+ .RE
34
+ .LP
26
35
  .TP
27
36
  \fB--no-connect\fR
28
37
  Causes the Ruby shell to not connect to a database on startup\.
@@ -17,6 +17,10 @@ Runs database migrations.
17
17
  `--db-uri` *URI*
18
18
  The database URI to connect to.
19
19
 
20
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
21
+ * **mysql**: `mysql://user:password@host/database`
22
+ * **postgres**: `postgres://user:password@host/database`
23
+
20
24
  `--no-connect`
21
25
  Causes the Ruby shell to not connect to a database on startup.
22
26
 
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-remove 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db remove\fR \[lB]\fIoptions\fP\[rB] \fINAME\fP
9
9
  .LP
10
10
  .SH DESCRIPTION
data/man/ronin-db-urls.1 CHANGED
@@ -1,10 +1,10 @@
1
- .\" Generated by kramdown-man 0.1.8
1
+ .\" Generated by kramdown-man 0.1.9
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
3
  .TH ronin-db-urls 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
7
- .HP
7
+ .PP
8
8
  \fBronin-db urls\fR \[lB]\fIoptions\fP\[rB]
9
9
  .LP
10
10
  .SH DESCRIPTION
@@ -20,8 +20,16 @@ The database to connect to\. Defaults to \fBdefault\fR if not given\.
20
20
  .LP
21
21
  .TP
22
22
  \fB--db-uri\fR \fIURI\fP
23
- The explicit database URI to connect to
24
- (ex: \fBmysql://user:password@host/ronin\fR)\.
23
+ The explicit database URI to connect to\.
24
+ .LP
25
+ .RS
26
+ .IP \(bu 2
27
+ \fBsqlite3\fP: \fBsqlite3:relative/path.db\fR or \fBsqlite3:///absolute/path.db\fR
28
+ .IP \(bu 2
29
+ \fBmysql\fP: \fBmysql://user:password@host/database\fR
30
+ .IP \(bu 2
31
+ \fBpostgres\fP: \fBpostgres://user:password@host/database\fR
32
+ .RE
25
33
  .LP
26
34
  .TP
27
35
  \fB-v\fR, \fB--verbose\fR
@@ -63,14 +71,18 @@ Searches for URLs associated with the \fIPORT\fP\.
63
71
  \fB-d\fR, \fB--directory\fR \fIDIRECTORY\fP
64
72
  Searches for URLs sharing the DIRECTORY\.
65
73
  .LP
66
- .HP
74
+ .PP
67
75
  \fB-q\fR, \fB--with-query-param\fR \fINAME\fP \[lB]\.\.\.\[rB]
68
76
  Searches for URLs containing the query\-param NAME\.
69
77
  .LP
70
- .HP
78
+ .PP
71
79
  \fB-Q\fR, \fB--with-query-value\fR \fIVALUE\fP \[lB]\.\.\.\[rB]
72
80
  Searches for URLs containing the query\-param VALUE\.
73
81
  .LP
82
+ .TP
83
+ \fB-h\fR, \fB--help\fR
84
+ Print help information\.
85
+ .LP
74
86
  .SH ENVIRONMENT
75
87
  .LP
76
88
  .TP
@@ -14,8 +14,11 @@ Manages URLs.
14
14
  The database to connect to. Defaults to `default` if not given.
15
15
 
16
16
  `--db-uri` *URI*
17
- The explicit database URI to connect to
18
- (ex: `mysql://user:password@host/ronin`).
17
+ The explicit database URI to connect to.
18
+
19
+ * **sqlite3**: `sqlite3:relative/path.db` or `sqlite3:///absolute/path.db`
20
+ * **mysql**: `mysql://user:password@host/database`
21
+ * **postgres**: `postgres://user:password@host/database`
19
22
 
20
23
  `-v`, `--verbose`
21
24
  Enable verbose output.
@@ -53,6 +56,9 @@ Manages URLs.
53
56
  `-Q`, `--with-query-value` *VALUE* [...]
54
57
  Searches for URLs containing the query-param VALUE.
55
58
 
59
+ `-h`, `--help`
60
+ Print help information.
61
+
56
62
  ## ENVIRONMENT
57
63
 
58
64
  *HOME*
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-09 00:00:00.000000000 Z
11
+ date: 2023-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3