ronin-db 0.1.0-java → 0.1.3-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.document +0 -1
  3. data/.github/workflows/ruby.yml +15 -1
  4. data/.rubocop.yml +16 -0
  5. data/ChangeLog.md +19 -1
  6. data/Gemfile +7 -3
  7. data/README.md +0 -1
  8. data/Rakefile +2 -3
  9. data/bin/ronin-db +6 -7
  10. data/lib/ronin/db/cli/command.rb +3 -0
  11. data/lib/ronin/db/cli/commands/asn.rb +1 -1
  12. data/lib/ronin/db/cli/commands/creds.rb +18 -18
  13. data/lib/ronin/db/cli/commands/migrate.rb +1 -1
  14. data/lib/ronin/db/cli/commands/urls.rb +6 -6
  15. data/lib/ronin/db/cli/resources_command.rb +0 -2
  16. data/lib/ronin/db/cli/uri_methods.rb +8 -3
  17. data/lib/ronin/db/cli.rb +5 -0
  18. data/lib/ronin/db/config_file.rb +14 -8
  19. data/lib/ronin/db/exceptions.rb +9 -0
  20. data/lib/ronin/db/version.rb +1 -1
  21. data/lib/ronin/db.rb +15 -1
  22. data/man/ronin-db-add.1 +45 -14
  23. data/man/ronin-db-add.1.md +30 -10
  24. data/man/ronin-db-asn.1 +37 -5
  25. data/man/ronin-db-asn.1.md +25 -3
  26. data/man/ronin-db-creds.1 +36 -18
  27. data/man/ronin-db-creds.1.md +27 -16
  28. data/man/ronin-db-edit.1 +21 -14
  29. data/man/ronin-db-edit.1.md +15 -10
  30. data/man/ronin-db-emails.1 +38 -20
  31. data/man/ronin-db-emails.1.md +28 -17
  32. data/man/ronin-db-hosts.1 +34 -16
  33. data/man/ronin-db-hosts.1.md +25 -14
  34. data/man/ronin-db-ips.1 +37 -19
  35. data/man/ronin-db-ips.1.md +28 -17
  36. data/man/ronin-db-irb.1 +30 -14
  37. data/man/ronin-db-irb.1.md +19 -10
  38. data/man/ronin-db-list.1 +21 -14
  39. data/man/ronin-db-list.1.md +15 -10
  40. data/man/ronin-db-migrate.1 +36 -3
  41. data/man/ronin-db-migrate.1.md +24 -1
  42. data/man/ronin-db-remove.1 +21 -14
  43. data/man/ronin-db-remove.1.md +15 -10
  44. data/man/ronin-db-urls.1 +39 -21
  45. data/man/ronin-db-urls.1.md +28 -17
  46. data/ronin-db.gemspec +4 -3
  47. metadata +4 -3
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
- .TH ronin-db-urls 1 "April 2012" Ronin "User Manuals"
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,28 +20,36 @@ 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
28
36
  Enable verbose output\.
29
37
  .LP
30
38
  .TP
31
- \fB--add\fR \fIUSER\fP:\fIPASSWORD\fP
32
- Adds the \fIUSER\fP and \fIPASSWORD\fP to the database\.
39
+ \fB--add\fR \fIVALUE\fP
40
+ Adds the URL to the database\.
33
41
  .LP
34
42
  .TP
35
43
  \fB--import\fR \fIFILE\fP
36
- Imports the credentials from the given \fIFILE\fP\.
44
+ Imports the URLs from the given \fIFILE\fP\.
37
45
  .LP
38
46
  .TP
39
47
  \fB--delete\fR \fIVALUE\fP
40
- Deletes a value from the database\.
48
+ Deletes the URL from the database\.
41
49
  .LP
42
50
  .TP
43
51
  \fB--delete-all\fR
44
- Deletes every value from the database\.
52
+ Deletes every URL from the database\.
45
53
  .LP
46
54
  .TP
47
55
  \fB--http\fR
@@ -63,31 +71,41 @@ 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
74
- .SH FILES
82
+ .TP
83
+ \fB-h\fR, \fB--help\fR
84
+ Print help information\.
85
+ .LP
86
+ .SH ENVIRONMENT
87
+ .LP
88
+ .TP
89
+ \fIHOME\fP
90
+ Alternate location for the user\[cq]s home directory\.
75
91
  .LP
76
92
  .TP
77
- \fI\[ti]\[sl]\.ronin\[sl]\fP
78
- Ronin configuration directory\.
93
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
94
+ Alternate location for the \fB~/.config\fR directory\.
79
95
  .LP
80
96
  .TP
81
- \fI\[ti]\[sl]\.ronin\[sl]database\.log\fP
82
- Database log\.
97
+ \fIXDG\[ru]DATA\[ru]HOME\fP
98
+ Alternate location for the \fB~/.local/share\fR directory\.
99
+ .LP
100
+ .SH FILES
83
101
  .LP
84
102
  .TP
85
- \fI\[ti]\[sl]\.ronin\[sl]database\.sqlite3\fP
86
- The default sqlite3 Database file\.
103
+ \fB~/.local/share/ronin-db/database.sqlite3\fR
104
+ The default sqlite3 database file\.
87
105
  .LP
88
106
  .TP
89
- \fI\[ti]\[sl]\.ronin\[sl]database\.yml\fP
90
- Optional Database configuration\.
107
+ \fB~/.config/ronin-db/database.yml\fR
108
+ Optional database configuration\.
91
109
  .LP
92
110
  .SH AUTHOR
93
111
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-db-urls 1 "April 2012" Ronin "User Manuals"
1
+ # ronin-db-urls 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -14,23 +14,26 @@ 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.
22
25
 
23
- `--add` *USER*:*PASSWORD*
24
- Adds the *USER* and *PASSWORD* to the database.
26
+ `--add` *VALUE*
27
+ Adds the URL to the database.
25
28
 
26
29
  `--import` *FILE*
27
- Imports the credentials from the given *FILE*.
30
+ Imports the URLs from the given *FILE*.
28
31
 
29
32
  `--delete` *VALUE*
30
- Deletes a value from the database.
33
+ Deletes the URL from the database.
31
34
 
32
35
  `--delete-all`
33
- Deletes every value from the database.
36
+ Deletes every URL from the database.
34
37
 
35
38
  `--http`
36
39
  Searches for `http://` URLs.
@@ -53,19 +56,27 @@ Manages URLs.
53
56
  `-Q`, `--with-query-value` *VALUE* [...]
54
57
  Searches for URLs containing the query-param VALUE.
55
58
 
56
- ## FILES
59
+ `-h`, `--help`
60
+ Print help information.
61
+
62
+ ## ENVIRONMENT
57
63
 
58
- *~/.ronin/*
59
- Ronin configuration directory.
64
+ *HOME*
65
+ Alternate location for the user's home directory.
60
66
 
61
- *~/.ronin/database.log*
62
- Database log.
67
+ *XDG_CONFIG_HOME*
68
+ Alternate location for the `~/.config` directory.
69
+
70
+ *XDG_DATA_HOME*
71
+ Alternate location for the `~/.local/share` directory.
72
+
73
+ ## FILES
63
74
 
64
- *~/.ronin/database.sqlite3*
65
- The default sqlite3 Database file.
75
+ `~/.local/share/ronin-db/database.sqlite3`
76
+ The default sqlite3 database file.
66
77
 
67
- *~/.ronin/database.yml*
68
- Optional Database configuration.
78
+ `~/.config/ronin-db/database.yml`
79
+ Optional database configuration.
69
80
 
70
81
  ## AUTHOR
71
82
 
data/ronin-db.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'yaml'
4
4
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.homepage = gemspec['homepage']
23
23
  gem.metadata = gemspec['metadata'] if gemspec['metadata']
24
24
 
25
- glob = lambda { |patterns| gem.files & Dir[*patterns] }
25
+ glob = ->(patterns) { gem.files & Dir[*patterns] }
26
26
 
27
27
  gem.files = `git ls-files`.split($/)
28
28
  gem.files = glob[gemspec['files']] if gemspec['files']
@@ -33,6 +33,7 @@ Gem::Specification.new do |gem|
33
33
  gem.executables = gemspec.fetch('executables') do
34
34
  glob['bin/*'].map { |path| File.basename(path) }
35
35
  end
36
+
36
37
  gem.default_executable = gem.executables.first if Gem::VERSION < '1.7.'
37
38
 
38
39
  gem.extensions = glob[gemspec['extensions'] || 'ext/**/extconf.rb']
@@ -47,7 +48,7 @@ Gem::Specification.new do |gem|
47
48
  gem.required_rubygems_version = gemspec['required_rubygems_version']
48
49
  gem.post_install_message = gemspec['post_install_message']
49
50
 
50
- split = lambda { |string| string.split(/,\s*/) }
51
+ split = ->(string) { string.split(/,\s*/) }
51
52
 
52
53
  if RUBY_PLATFORM =~ /java/
53
54
  gem.platform = Gem::Platform.new("java")
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.0
4
+ version: 0.1.3
5
5
  platform: java
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-01 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
  requirement: !ruby/object:Gem::Requirement
@@ -99,6 +99,7 @@ files:
99
99
  - ".github/workflows/ruby.yml"
100
100
  - ".gitignore"
101
101
  - ".rspec"
102
+ - ".rubocop.yml"
102
103
  - ".ruby-version"
103
104
  - ".yardopts"
104
105
  - COPYING.txt
@@ -183,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
184
  - !ruby/object:Gem::Version
184
185
  version: '0'
185
186
  requirements: []
186
- rubygems_version: 3.3.25
187
+ rubygems_version: 3.3.26
187
188
  signing_key:
188
189
  specification_version: 4
189
190
  summary: A common database library for managing and querying security data