ronin-db 0.1.0-java → 0.1.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.document +0 -1
- data/.github/workflows/ruby.yml +14 -0
- data/.rubocop.yml +16 -0
- data/ChangeLog.md +14 -1
- data/Gemfile +7 -3
- data/README.md +0 -1
- data/Rakefile +2 -3
- data/bin/ronin-db +6 -7
- data/lib/ronin/db/cli/command.rb +3 -0
- data/lib/ronin/db/cli/commands/asn.rb +1 -1
- data/lib/ronin/db/cli/commands/creds.rb +18 -18
- data/lib/ronin/db/cli/commands/migrate.rb +1 -1
- data/lib/ronin/db/cli/commands/urls.rb +6 -6
- data/lib/ronin/db/cli/resources_command.rb +0 -2
- data/lib/ronin/db/cli/uri_methods.rb +8 -3
- data/lib/ronin/db/cli.rb +5 -0
- data/lib/ronin/db/config_file.rb +2 -1
- data/lib/ronin/db/version.rb +1 -1
- data/lib/ronin/db.rb +6 -1
- data/man/ronin-db-add.1 +43 -12
- data/man/ronin-db-add.1.md +30 -10
- data/man/ronin-db-asn.1 +35 -3
- data/man/ronin-db-asn.1.md +25 -3
- data/man/ronin-db-creds.1 +34 -16
- data/man/ronin-db-creds.1.md +27 -16
- data/man/ronin-db-edit.1 +19 -12
- data/man/ronin-db-edit.1.md +15 -10
- data/man/ronin-db-emails.1 +35 -17
- data/man/ronin-db-emails.1.md +28 -17
- data/man/ronin-db-hosts.1 +32 -14
- data/man/ronin-db-hosts.1.md +25 -14
- data/man/ronin-db-ips.1 +35 -17
- data/man/ronin-db-ips.1.md +28 -17
- data/man/ronin-db-irb.1 +28 -12
- data/man/ronin-db-irb.1.md +19 -10
- data/man/ronin-db-list.1 +19 -12
- data/man/ronin-db-list.1.md +15 -10
- data/man/ronin-db-migrate.1 +34 -1
- data/man/ronin-db-migrate.1.md +24 -1
- data/man/ronin-db-remove.1 +19 -12
- data/man/ronin-db-remove.1.md +15 -10
- data/man/ronin-db-urls.1 +35 -17
- data/man/ronin-db-urls.1.md +28 -17
- data/ronin-db.gemspec +4 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e20fde641f025149b699e70299af69f99289adf64e968fee91a49f9caf33ac1
|
4
|
+
data.tar.gz: b7b02264509ad9800f61320bc3a8042c34a7e9552e4c658c4d8d1c5a34dfac96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c83dc934afed20756221f7b54336c30e957e6a9849a5846bec7d068a81e1cf4a68c5bb098a57096bbba912da9353d9a2d9690374f1de024e38e71c2d420856cc
|
7
|
+
data.tar.gz: 1f62303657c9c113a2a4b14ce16e4f3849fb2f6f475757164e81b29cd431d9fa6ec43b6ad2e08737e14f40bf034036ff85bc06766a5a0cf126f3dea53e051232
|
data/.document
CHANGED
data/.github/workflows/ruby.yml
CHANGED
@@ -30,3 +30,17 @@ jobs:
|
|
30
30
|
run: bundle install --jobs 4 --retry 3
|
31
31
|
- name: Run tests
|
32
32
|
run: bundle exec rake test
|
33
|
+
|
34
|
+
# rubocop linting
|
35
|
+
rubocop:
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v2
|
39
|
+
- name: Set up Ruby
|
40
|
+
uses: ruby/setup-ruby@v1
|
41
|
+
with:
|
42
|
+
ruby-version: 3.0
|
43
|
+
- name: Install dependencies
|
44
|
+
run: bundle install --jobs 4 --retry 3
|
45
|
+
- name: Run rubocop
|
46
|
+
run: bundle exec rubocop --parallel
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
SuggestExtensions: false
|
4
|
+
TargetRubyVersion: 3.1
|
5
|
+
|
6
|
+
inherit_gem:
|
7
|
+
rubocop-ronin: rubocop.yml
|
8
|
+
|
9
|
+
#
|
10
|
+
# ronin-db specific exceptions
|
11
|
+
#
|
12
|
+
|
13
|
+
# This looks like a rubocop bug.
|
14
|
+
Lint/ShadowingOuterLocalVariable:
|
15
|
+
Exclude:
|
16
|
+
- 'lib/ronin/db/cli/commands/list.rb'
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,17 @@
|
|
1
|
-
### 0.1.
|
1
|
+
### 0.1.2 / 2023-09-19
|
2
|
+
|
3
|
+
* Fixed a typo in an exception message in {Ronin::DB.connect}.
|
4
|
+
* Documentation fixes and improvements.
|
5
|
+
|
6
|
+
### 0.1.1 / 2023-06-09
|
7
|
+
|
8
|
+
#### CLI
|
9
|
+
|
10
|
+
* Fixed typos in the `ronin-db add` man-page.
|
11
|
+
* Fixed typos in the `ronin-db creds` man-page.
|
12
|
+
* Fixed formatting of man-pages.
|
13
|
+
|
14
|
+
### 0.1.0 / 2023-02-01
|
2
15
|
|
3
16
|
* Initial release:
|
4
17
|
* Uses a [sqlite] database by default.
|
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
@@ -8,11 +10,11 @@ gem 'jruby-openssl', '~> 0.7', platform: :jruby
|
|
8
10
|
# branch: 'main'
|
9
11
|
|
10
12
|
# Library dependencies
|
11
|
-
# gem 'ronin-db-activerecord', '~> 0.1', github:
|
13
|
+
# gem 'ronin-db-activerecord', '~> 0.1', github: 'ronin-rb/ronin-db-activerecord',
|
12
14
|
# branch: 'main'
|
13
|
-
# gem 'ronin-support', '~> 1.0', github:
|
15
|
+
# gem 'ronin-support', '~> 1.0', github: 'ronin-rb/ronin-support',
|
14
16
|
# branch: '1.0.0'
|
15
|
-
# gem 'ronin-core', '~> 0.1', github:
|
17
|
+
# gem 'ronin-core', '~> 0.1', github: 'ronin-rb/ronin-core',
|
16
18
|
# branch: 'main'
|
17
19
|
|
18
20
|
group :development do
|
@@ -31,4 +33,6 @@ group :development do
|
|
31
33
|
gem 'dead_end', require: false
|
32
34
|
gem 'sord', require: false, platform: :mri
|
33
35
|
gem 'stackprof', require: false, platform: :mri
|
36
|
+
gem 'rubocop', require: false, platform: :mri
|
37
|
+
gem 'rubocop-ronin', require: false, platform: :mri
|
34
38
|
end
|
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
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
begin
|
4
4
|
require 'bundler'
|
5
5
|
rescue LoadError => e
|
6
6
|
warn e.message
|
7
7
|
warn "Run `gem install bundler` to install Bundler"
|
8
|
-
exit
|
8
|
+
exit(-1)
|
9
9
|
end
|
10
10
|
|
11
11
|
begin
|
@@ -35,7 +35,6 @@ task :docs => :yara
|
|
35
35
|
require 'kramdown/man/task'
|
36
36
|
Kramdown::Man::Task.new
|
37
37
|
|
38
|
-
|
39
38
|
directory 'db'
|
40
39
|
file 'db/dev.sqlite3' => %w[db db:migrate]
|
41
40
|
|
data/bin/ronin-db
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
#
|
3
4
|
# Copyright (c) 2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
5
|
#
|
@@ -21,13 +22,11 @@
|
|
21
22
|
root = File.expand_path(File.join(__dir__,'..'))
|
22
23
|
if File.file?(File.join(root,'Gemfile.lock'))
|
23
24
|
Dir.chdir(root) do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
exit -1
|
30
|
-
end
|
25
|
+
require 'bundler/setup'
|
26
|
+
rescue LoadError => e
|
27
|
+
warn e.message
|
28
|
+
warn "Run `gem install bundler` to install Bundler"
|
29
|
+
exit(-1)
|
31
30
|
end
|
32
31
|
end
|
33
32
|
|
data/lib/ronin/db/cli/command.rb
CHANGED
@@ -26,11 +26,11 @@ module Ronin
|
|
26
26
|
class CLI
|
27
27
|
module Commands
|
28
28
|
#
|
29
|
-
#
|
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
|
45
|
-
# -p, --password
|
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 :
|
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: '
|
57
|
+
usage: 'USER'
|
67
58
|
},
|
68
|
-
desc: '
|
69
|
-
@query_method_calls << [:
|
59
|
+
desc: 'Username to search for' do |user|
|
60
|
+
@query_method_calls << [:for_user, [user]]
|
70
61
|
end
|
71
62
|
|
72
|
-
|
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
|
|
@@ -122,7 +122,7 @@ module Ronin
|
|
122
122
|
option :query_string, short: '-q',
|
123
123
|
value: {
|
124
124
|
type: String,
|
125
|
-
usage: 'STRING'
|
125
|
+
usage: 'STRING'
|
126
126
|
},
|
127
127
|
desc: 'Searches for all URLs with the query string' do |string|
|
128
128
|
@query_method_calls << [:where, [], {query: string}]
|
@@ -136,11 +136,11 @@ module Ronin
|
|
136
136
|
desc: 'Searches for the associated query-param NAME(s)' do |string|
|
137
137
|
name, value = string.split('=',2)
|
138
138
|
|
139
|
-
if value
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
139
|
+
@query_method_calls << if value
|
140
|
+
[:with_query_param, [name, value]]
|
141
|
+
else
|
142
|
+
[:with_query_param_name, [name]]
|
143
|
+
end
|
144
144
|
end
|
145
145
|
|
146
146
|
option :with_query_param_name, value: {
|
@@ -24,6 +24,10 @@ require 'ronin/db'
|
|
24
24
|
module Ronin
|
25
25
|
module DB
|
26
26
|
class CLI
|
27
|
+
#
|
28
|
+
# Mixin which adds methods for parsing database URIs
|
29
|
+
# (ex: `sqlite3:path/to/db.sqlite3`).
|
30
|
+
#
|
27
31
|
module URIMethods
|
28
32
|
# Common database adapter names and their ActiveRecord equivalents.
|
29
33
|
ADAPTER_ALIASES = {
|
@@ -57,8 +61,8 @@ module Ronin
|
|
57
61
|
# The expanded path or `":memory:"` if the path was `":memory:"`.
|
58
62
|
#
|
59
63
|
def normalize_sqlite3_path(path)
|
60
|
-
if path== ':memory:' then path
|
61
|
-
else
|
64
|
+
if path == ':memory:' then path
|
65
|
+
else File.expand_path(path)
|
62
66
|
end
|
63
67
|
end
|
64
68
|
|
@@ -72,7 +76,7 @@ module Ronin
|
|
72
76
|
# The database configuration Hash.
|
73
77
|
#
|
74
78
|
def parse_uri(uri)
|
75
|
-
if (match = uri.match(/\Asqlite
|
79
|
+
if (match = uri.match(/\Asqlite(?:3)?:(.+)\z/))
|
76
80
|
{
|
77
81
|
adapter: 'sqlite3',
|
78
82
|
database: normalize_sqlite3_path(match[1])
|
@@ -82,6 +86,7 @@ module Ronin
|
|
82
86
|
adapter = normalize_adapter(uri.scheme)
|
83
87
|
|
84
88
|
hash = {adapter: adapter}
|
89
|
+
|
85
90
|
hash[:host] = uri.host if uri.host
|
86
91
|
hash[:port] = uri.port if uri.port
|
87
92
|
hash[:username] = uri.user if uri.user
|
data/lib/ronin/db/cli.rb
CHANGED
data/lib/ronin/db/config_file.rb
CHANGED
@@ -35,7 +35,8 @@ module Ronin
|
|
35
35
|
# Path to the `~/.config/ronin-db/databases.yml` configuration file.
|
36
36
|
PATH = File.join(DB::Home::CONFIG_DIR,'databases.yml')
|
37
37
|
|
38
|
-
# Path to the default sqlite3 database file
|
38
|
+
# Path to the default sqlite3 database file
|
39
|
+
# (`~/.local/share/ronin-db/default.sqlite3`).
|
39
40
|
DEFAULT_DB_FILE = File.join(DB::Home::LOCAL_SHARE_DIR,'default.sqlite3')
|
40
41
|
|
41
42
|
# Default database configuration.
|
data/lib/ronin/db/version.rb
CHANGED
data/lib/ronin/db.rb
CHANGED
@@ -23,6 +23,9 @@ require 'ronin/db/config_file'
|
|
23
23
|
require 'ronin/db/version'
|
24
24
|
|
25
25
|
module Ronin
|
26
|
+
#
|
27
|
+
# Manages the Ronin database.
|
28
|
+
#
|
26
29
|
module DB
|
27
30
|
#
|
28
31
|
# Sets up the Database logger.
|
@@ -83,8 +86,10 @@ module Ronin
|
|
83
86
|
# Specifies whether to load all models or just connect to the database.
|
84
87
|
#
|
85
88
|
# @raise [UnknownDatabase]
|
89
|
+
# The database name was not listed in the config file.
|
86
90
|
#
|
87
91
|
# @raise [ArgumentError]
|
92
|
+
# The given database was not a Symbol or a Hash.
|
88
93
|
#
|
89
94
|
# @api semipublic
|
90
95
|
#
|
@@ -97,7 +102,7 @@ module Ronin
|
|
97
102
|
raise(UnknownDatabase,"unknown database: #{database.inspect}")
|
98
103
|
end
|
99
104
|
else
|
100
|
-
raise(ArgumentError,"#{self
|
105
|
+
raise(ArgumentError,"#{self}.#{__method__} only accepts a Symbol or a Hash")
|
101
106
|
end
|
102
107
|
|
103
108
|
# load activerecord
|
data/man/ronin-db-add.1
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" Generated by kramdown-man 0.1.8
|
2
2
|
.\" https://github.com/postmodern/kramdown-man#readme
|
3
|
-
.TH ronin-db-add 1 "
|
3
|
+
.TH ronin-db-add 1 "2023-02-01" Ronin DB "User Manuals"
|
4
4
|
.LP
|
5
5
|
.SH SYNOPSIS
|
6
6
|
.LP
|
@@ -10,7 +10,8 @@
|
|
10
10
|
.SH DESCRIPTION
|
11
11
|
.LP
|
12
12
|
.PP
|
13
|
-
|
13
|
+
Adds a pre\-existing database to the \fB~/.config/ronin-db/database.yml\fR
|
14
|
+
configuration file\.
|
14
15
|
.LP
|
15
16
|
.SH ARGUMENTS
|
16
17
|
.LP
|
@@ -69,22 +70,52 @@ may be given instead\.
|
|
69
70
|
\fB-h\fR, \fB--help\fR
|
70
71
|
Print help information\.
|
71
72
|
.LP
|
72
|
-
.SH
|
73
|
+
.SH EXAMPLES
|
73
74
|
.LP
|
74
|
-
.
|
75
|
-
|
76
|
-
The \fBronin-db\fR database(s) configuration file\.
|
75
|
+
.PP
|
76
|
+
Add a sqlite3 database file:
|
77
77
|
.LP
|
78
|
-
.
|
78
|
+
.nf
|
79
|
+
\[Do] ronin\-db add other\[ru]db \-\-sqlite3 path\[sl]to\[sl]db\.sqlite3
|
80
|
+
.fi
|
79
81
|
.LP
|
80
82
|
.PP
|
81
|
-
|
82
|
-
|
83
|
-
|
83
|
+
Add a PostgeSQL database:
|
84
|
+
.LP
|
85
|
+
.nf
|
86
|
+
\[Do] ronin\-db add other\[ru]db \-\-postgres \-\-host example\.com \-\-port 5432 \-\-username ronin \-\-password s3r3t \-\-database ronin\[ru]db
|
87
|
+
.fi
|
84
88
|
.LP
|
85
89
|
.PP
|
86
|
-
|
87
|
-
|
90
|
+
Add a MySQL database:
|
91
|
+
.LP
|
92
|
+
.nf
|
93
|
+
\[Do] ronin\-db add other\[ru]db \-\-mysql2 \-\-host example\.com \-\-port 3306 \-\-username ronin \-\-password s3r3t \-\-database ronin\[ru]db
|
94
|
+
.fi
|
95
|
+
.LP
|
96
|
+
.SH ENVIRONMENT
|
97
|
+
.LP
|
98
|
+
.TP
|
99
|
+
\fIHOME\fP
|
100
|
+
Alternate location for the user\[cq]s home directory\.
|
101
|
+
.LP
|
102
|
+
.TP
|
103
|
+
\fIXDG\[ru]CONFIG\[ru]HOME\fP
|
104
|
+
Alternate location for the \fB~/.config\fR directory\.
|
105
|
+
.LP
|
106
|
+
.TP
|
107
|
+
\fIXDG\[ru]DATA\[ru]HOME\fP
|
108
|
+
Alternate location for the \fB~/.local/share\fR directory\.
|
109
|
+
.LP
|
110
|
+
.SH FILES
|
111
|
+
.LP
|
112
|
+
.TP
|
113
|
+
\fB~/.local/share/ronin-db/database.sqlite3\fR
|
114
|
+
The default sqlite3 database file\.
|
115
|
+
.LP
|
116
|
+
.TP
|
117
|
+
\fB~/.config/ronin-db/database.yml\fR
|
118
|
+
Optional database configuration\.
|
88
119
|
.LP
|
89
120
|
.SH AUTHOR
|
90
121
|
.LP
|
data/man/ronin-db-add.1.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ronin-db-add 1 "
|
1
|
+
# ronin-db-add 1 "2023-02-01" Ronin DB "User Manuals"
|
2
2
|
|
3
3
|
## SYNOPSIS
|
4
4
|
|
@@ -6,7 +6,8 @@
|
|
6
6
|
|
7
7
|
## DESCRIPTION
|
8
8
|
|
9
|
-
|
9
|
+
Adds a pre-existing database to the `~/.config/ronin-db/database.yml`
|
10
|
+
configuration file.
|
10
11
|
|
11
12
|
## ARGUMENTS
|
12
13
|
|
@@ -52,19 +53,38 @@ Lists entries in the `~/.config/ronin-db/database.yml` configuration file.
|
|
52
53
|
`-h`, `--help`
|
53
54
|
Print help information.
|
54
55
|
|
55
|
-
##
|
56
|
+
## EXAMPLES
|
57
|
+
|
58
|
+
Add a sqlite3 database file:
|
59
|
+
|
60
|
+
$ ronin-db add other_db --sqlite3 path/to/db.sqlite3
|
61
|
+
|
62
|
+
Add a PostgeSQL database:
|
63
|
+
|
64
|
+
$ ronin-db add other_db --postgres --host example.com --port 5432 --username ronin --password s3r3t --database ronin_db
|
65
|
+
|
66
|
+
Add a MySQL database:
|
56
67
|
|
57
|
-
|
58
|
-
The `ronin-db` database(s) configuration file.
|
68
|
+
$ ronin-db add other_db --mysql2 --host example.com --port 3306 --username ronin --password s3r3t --database ronin_db
|
59
69
|
|
60
70
|
## ENVIRONMENT
|
61
71
|
|
62
|
-
HOME
|
63
|
-
|
64
|
-
|
72
|
+
*HOME*
|
73
|
+
Alternate location for the user's home directory.
|
74
|
+
|
75
|
+
*XDG_CONFIG_HOME*
|
76
|
+
Alternate location for the `~/.config` directory.
|
77
|
+
|
78
|
+
*XDG_DATA_HOME*
|
79
|
+
Alternate location for the `~/.local/share` directory.
|
80
|
+
|
81
|
+
## FILES
|
82
|
+
|
83
|
+
`~/.local/share/ronin-db/database.sqlite3`
|
84
|
+
The default sqlite3 database file.
|
65
85
|
|
66
|
-
|
67
|
-
|
86
|
+
`~/.config/ronin-db/database.yml`
|
87
|
+
Optional database configuration.
|
68
88
|
|
69
89
|
## AUTHOR
|
70
90
|
|
data/man/ronin-db-asn.1
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" Generated by kramdown-man 0.1.8
|
2
2
|
.\" https://github.com/postmodern/kramdown-man#readme
|
3
|
-
.TH ronin-db-asn 1 "
|
3
|
+
.TH ronin-db-asn 1 "2023-02-01" Ronin "User Manuals"
|
4
4
|
.LP
|
5
5
|
.SH SYNOPSIS
|
6
6
|
.LP
|
@@ -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
|
-
|
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
|
@@ -70,6 +78,30 @@ if not given\.
|
|
70
78
|
\fB-h\fR, \fB--help\fR
|
71
79
|
Print help information\.
|
72
80
|
.LP
|
81
|
+
.SH ENVIRONMENT
|
82
|
+
.LP
|
83
|
+
.TP
|
84
|
+
\fIHOME\fP
|
85
|
+
Alternate location for the user\[cq]s home directory\.
|
86
|
+
.LP
|
87
|
+
.TP
|
88
|
+
\fIXDG\[ru]CONFIG\[ru]HOME\fP
|
89
|
+
Alternate location for the \fB~/.config\fR directory\.
|
90
|
+
.LP
|
91
|
+
.TP
|
92
|
+
\fIXDG\[ru]DATA\[ru]HOME\fP
|
93
|
+
Alternate location for the \fB~/.local/share\fR directory\.
|
94
|
+
.LP
|
95
|
+
.SH FILES
|
96
|
+
.LP
|
97
|
+
.TP
|
98
|
+
\fB~/.local/share/ronin-db/database.sqlite3\fR
|
99
|
+
The default sqlite3 database file\.
|
100
|
+
.LP
|
101
|
+
.TP
|
102
|
+
\fB~/.config/ronin-db/database.yml\fR
|
103
|
+
Optional database configuration\.
|
104
|
+
.LP
|
73
105
|
.SH AUTHOR
|
74
106
|
.LP
|
75
107
|
.PP
|
data/man/ronin-db-asn.1.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ronin-db-asn 1 "
|
1
|
+
# ronin-db-asn 1 "2023-02-01" Ronin "User Manuals"
|
2
2
|
|
3
3
|
## SYNOPSIS
|
4
4
|
|
@@ -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
|
-
|
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
|
@@ -53,6 +56,25 @@ Queries or updates Autonomous System Numbers (ASNs) in the database.
|
|
53
56
|
`-h`, `--help`
|
54
57
|
Print help information.
|
55
58
|
|
59
|
+
## ENVIRONMENT
|
60
|
+
|
61
|
+
*HOME*
|
62
|
+
Alternate location for the user's home directory.
|
63
|
+
|
64
|
+
*XDG_CONFIG_HOME*
|
65
|
+
Alternate location for the `~/.config` directory.
|
66
|
+
|
67
|
+
*XDG_DATA_HOME*
|
68
|
+
Alternate location for the `~/.local/share` directory.
|
69
|
+
|
70
|
+
## FILES
|
71
|
+
|
72
|
+
`~/.local/share/ronin-db/database.sqlite3`
|
73
|
+
The default sqlite3 database file.
|
74
|
+
|
75
|
+
`~/.config/ronin-db/database.yml`
|
76
|
+
Optional database configuration.
|
77
|
+
|
56
78
|
## AUTHOR
|
57
79
|
|
58
80
|
Postmodern <postmodern.mod3@gmail.com>
|