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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.document +0 -1
  3. data/.github/workflows/ruby.yml +14 -0
  4. data/.rubocop.yml +16 -0
  5. data/ChangeLog.md +14 -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 +2 -1
  19. data/lib/ronin/db/version.rb +1 -1
  20. data/lib/ronin/db.rb +6 -1
  21. data/man/ronin-db-add.1 +43 -12
  22. data/man/ronin-db-add.1.md +30 -10
  23. data/man/ronin-db-asn.1 +35 -3
  24. data/man/ronin-db-asn.1.md +25 -3
  25. data/man/ronin-db-creds.1 +34 -16
  26. data/man/ronin-db-creds.1.md +27 -16
  27. data/man/ronin-db-edit.1 +19 -12
  28. data/man/ronin-db-edit.1.md +15 -10
  29. data/man/ronin-db-emails.1 +35 -17
  30. data/man/ronin-db-emails.1.md +28 -17
  31. data/man/ronin-db-hosts.1 +32 -14
  32. data/man/ronin-db-hosts.1.md +25 -14
  33. data/man/ronin-db-ips.1 +35 -17
  34. data/man/ronin-db-ips.1.md +28 -17
  35. data/man/ronin-db-irb.1 +28 -12
  36. data/man/ronin-db-irb.1.md +19 -10
  37. data/man/ronin-db-list.1 +19 -12
  38. data/man/ronin-db-list.1.md +15 -10
  39. data/man/ronin-db-migrate.1 +34 -1
  40. data/man/ronin-db-migrate.1.md +24 -1
  41. data/man/ronin-db-remove.1 +19 -12
  42. data/man/ronin-db-remove.1.md +15 -10
  43. data/man/ronin-db-urls.1 +35 -17
  44. data/man/ronin-db-urls.1.md +28 -17
  45. data/ronin-db.gemspec +4 -3
  46. metadata +4 -3
@@ -1,4 +1,4 @@
1
- # ronin-db-ips 1 "April 2012" Ronin "User Manuals"
1
+ # ronin-db-ips 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -14,23 +14,26 @@ 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.
22
25
 
23
- `--add` *USER*:*PASSWORD*
24
- Adds the *USER* and *PASSWORD* to the database.
26
+ `--add` *VALUE*
27
+ Adds the IP address to the database.
25
28
 
26
29
  `--import` *FILE*
27
- Imports the credentials from the given *FILE*.
30
+ Imports the IP addresses from the given *FILE*.
28
31
 
29
32
  `--delete` *VALUE*
30
- Deletes a value from the database.
33
+ Deletes a IP address from the database.
31
34
 
32
35
  `--delete-all`
33
- Deletes every value from the database.
36
+ Deletes every IP address from the database.
34
37
 
35
38
  `-4`, `--v4`
36
39
  Searches for IPv4 addresses.
@@ -47,19 +50,27 @@ Manages IP addresses.
47
50
  `-I`, `--with-host` *HOST*
48
51
  Searches for IP addresses associated with the *HOST*.
49
52
 
50
- ## FILES
53
+ `-h`, `--help`
54
+ Print help information.
55
+
56
+ ## ENVIRONMENT
51
57
 
52
- *~/.ronin/*
53
- Ronin configuration directory.
58
+ *HOME*
59
+ Alternate location for the user's home directory.
54
60
 
55
- *~/.ronin/database.log*
56
- Database log.
61
+ *XDG_CONFIG_HOME*
62
+ Alternate location for the `~/.config` directory.
63
+
64
+ *XDG_DATA_HOME*
65
+ Alternate location for the `~/.local/share` directory.
66
+
67
+ ## FILES
57
68
 
58
- *~/.ronin/database.sqlite3*
59
- The default sqlite3 Database file.
69
+ `~/.local/share/ronin-db/database.sqlite3`
70
+ The default sqlite3 database file.
60
71
 
61
- *~/.ronin/database.yml*
62
- Optional Database configuration.
72
+ `~/.config/ronin-db/database.yml`
73
+ Optional database configuration.
63
74
 
64
75
  ## AUTHOR
65
76
 
data/man/ronin-db-irb.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-irb 1 "2022-01-01" Ronin DB "User Manuals"
3
+ .TH ronin-db-irb 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -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\.
@@ -31,22 +40,29 @@ Causes the Ruby shell to not connect to a database on startup\.
31
40
  \fB-h\fR, \fB--help\fR
32
41
  Print help information\.
33
42
  .LP
34
- .SH FILES
43
+ .SH ENVIRONMENT
35
44
  .LP
36
45
  .TP
37
- \fI\[ti]\[sl]\.config\[sl]ronin\-db\[sl]database\.yml\fP
38
- The \fBronin-db\fR database(s) configuration file\.
46
+ \fIHOME\fP
47
+ Alternate location for the user\[cq]s home directory\.
39
48
  .LP
40
- .SH ENVIRONMENT
49
+ .TP
50
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
51
+ Alternate location for the \fB~/.config\fR directory\.
41
52
  .LP
42
- .PP
43
- HOME
44
- Specifies the home directory of the user\. Ronin will search for the
45
- \fI\[ti]\[sl]\.config\[sl]ronin\-db\fP cache directory within the home directory\.
53
+ .TP
54
+ \fIXDG\[ru]DATA\[ru]HOME\fP
55
+ Alternate location for the \fB~/.local/share\fR directory\.
46
56
  .LP
47
- .PP
48
- XDG\[ru]CONFIG\[ru]HOME
49
- Specifies the cache directory to use\. Defaults to \fI\[Do]HOME\[sl]\.config\fP\.
57
+ .SH FILES
58
+ .LP
59
+ .TP
60
+ \fB~/.local/share/ronin-db/database.sqlite3\fR
61
+ The default sqlite3 database file\.
62
+ .LP
63
+ .TP
64
+ \fB~/.config/ronin-db/database.yml\fR
65
+ Optional database configuration\.
50
66
  .LP
51
67
  .SH AUTHOR
52
68
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-db-irb 1 "2022-01-01" Ronin DB "User Manuals"
1
+ # ronin-db-irb 1 "2023-02-01" Ronin DB "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -17,25 +17,34 @@ 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
 
23
27
  `-h`, `--help`
24
28
  Print help information.
25
29
 
26
- ## FILES
30
+ ## ENVIRONMENT
27
31
 
28
- *~/.config/ronin-db/database.yml*
29
- The `ronin-db` database(s) configuration file.
32
+ *HOME*
33
+ Alternate location for the user's home directory.
30
34
 
31
- ## ENVIRONMENT
35
+ *XDG_CONFIG_HOME*
36
+ Alternate location for the `~/.config` directory.
37
+
38
+ *XDG_DATA_HOME*
39
+ Alternate location for the `~/.local/share` directory.
40
+
41
+ ## FILES
32
42
 
33
- HOME
34
- Specifies the home directory of the user. Ronin will search for the
35
- *~/.config/ronin-db* cache directory within the home directory.
43
+ `~/.local/share/ronin-db/database.sqlite3`
44
+ The default sqlite3 database file.
36
45
 
37
- XDG_CONFIG_HOME
38
- Specifies the cache directory to use. Defaults to *$HOME/.config*.
46
+ `~/.config/ronin-db/database.yml`
47
+ Optional database configuration.
39
48
 
40
49
  ## AUTHOR
41
50
 
data/man/ronin-db-list.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-list 1 "2022-01-01" Ronin DB "User Manuals"
3
+ .TH ronin-db-list 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -28,22 +28,29 @@ Enables verbose output\.
28
28
  \fB-h\fR, \fB--help\fR
29
29
  Print help information\.
30
30
  .LP
31
- .SH FILES
31
+ .SH ENVIRONMENT
32
32
  .LP
33
33
  .TP
34
- \fI\[ti]\[sl]\.config\[sl]ronin\-db\[sl]database\.yml\fP
35
- The \fBronin-db\fR database(s) configuration file\.
34
+ \fIHOME\fP
35
+ Alternate location for the user\[cq]s home directory\.
36
36
  .LP
37
- .SH ENVIRONMENT
37
+ .TP
38
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
39
+ Alternate location for the \fB~/.config\fR directory\.
38
40
  .LP
39
- .PP
40
- HOME
41
- Specifies the home directory of the user\. Ronin will search for the
42
- \fI\[ti]\[sl]\.config\[sl]ronin\-db\fP cache directory within the home directory\.
41
+ .TP
42
+ \fIXDG\[ru]DATA\[ru]HOME\fP
43
+ Alternate location for the \fB~/.local/share\fR directory\.
43
44
  .LP
44
- .PP
45
- XDG\[ru]CONFIG\[ru]HOME
46
- Specifies the cache directory to use\. Defaults to \fI\[Do]HOME\[sl]\.config\fP\.
45
+ .SH FILES
46
+ .LP
47
+ .TP
48
+ \fB~/.local/share/ronin-db/database.sqlite3\fR
49
+ The default sqlite3 database file\.
50
+ .LP
51
+ .TP
52
+ \fB~/.config/ronin-db/database.yml\fR
53
+ Optional database configuration\.
47
54
  .LP
48
55
  .SH AUTHOR
49
56
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-db-list 1 "2022-01-01" Ronin DB "User Manuals"
1
+ # ronin-db-list 1 "2023-02-01" Ronin DB "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -21,19 +21,24 @@ Lists entries in the `~/.config/ronin-db/database.yml` configuration file.
21
21
  `-h`, `--help`
22
22
  Print help information.
23
23
 
24
- ## FILES
24
+ ## ENVIRONMENT
25
25
 
26
- *~/.config/ronin-db/database.yml*
27
- The `ronin-db` database(s) configuration file.
26
+ *HOME*
27
+ Alternate location for the user's home directory.
28
28
 
29
- ## ENVIRONMENT
29
+ *XDG_CONFIG_HOME*
30
+ Alternate location for the `~/.config` directory.
31
+
32
+ *XDG_DATA_HOME*
33
+ Alternate location for the `~/.local/share` directory.
34
+
35
+ ## FILES
30
36
 
31
- HOME
32
- Specifies the home directory of the user. Ronin will search for the
33
- *~/.config/ronin-db* cache directory within the home directory.
37
+ `~/.local/share/ronin-db/database.sqlite3`
38
+ The default sqlite3 database file.
34
39
 
35
- XDG_CONFIG_HOME
36
- Specifies the cache directory to use. Defaults to *$HOME/.config*.
40
+ `~/.config/ronin-db/database.yml`
41
+ Optional database configuration.
37
42
 
38
43
  ## AUTHOR
39
44
 
@@ -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-migrate 1 "2022-01-01" Ronin DB "User Manuals"
3
+ .TH ronin-db-migrate 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -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\.
@@ -31,6 +40,30 @@ Causes the Ruby shell to not connect to a database on startup\.
31
40
  \fB-h\fR, \fB--help\fR
32
41
  Print help information\.
33
42
  .LP
43
+ .SH ENVIRONMENT
44
+ .LP
45
+ .TP
46
+ \fIHOME\fP
47
+ Alternate location for the user\[cq]s home directory\.
48
+ .LP
49
+ .TP
50
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
51
+ Alternate location for the \fB~/.config\fR directory\.
52
+ .LP
53
+ .TP
54
+ \fIXDG\[ru]DATA\[ru]HOME\fP
55
+ Alternate location for the \fB~/.local/share\fR directory\.
56
+ .LP
57
+ .SH FILES
58
+ .LP
59
+ .TP
60
+ \fB~/.local/share/ronin-db/database.sqlite3\fR
61
+ The default sqlite3 database file\.
62
+ .LP
63
+ .TP
64
+ \fB~/.config/ronin-db/database.yml\fR
65
+ Optional database configuration\.
66
+ .LP
34
67
  .SH AUTHOR
35
68
  .LP
36
69
  .PP
@@ -1,4 +1,4 @@
1
- # ronin-db-migrate 1 "2022-01-01" Ronin DB "User Manuals"
1
+ # ronin-db-migrate 1 "2023-02-01" Ronin DB "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -17,12 +17,35 @@ 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
 
23
27
  `-h`, `--help`
24
28
  Print help information.
25
29
 
30
+ ## ENVIRONMENT
31
+
32
+ *HOME*
33
+ Alternate location for the user's home directory.
34
+
35
+ *XDG_CONFIG_HOME*
36
+ Alternate location for the `~/.config` directory.
37
+
38
+ *XDG_DATA_HOME*
39
+ Alternate location for the `~/.local/share` directory.
40
+
41
+ ## FILES
42
+
43
+ `~/.local/share/ronin-db/database.sqlite3`
44
+ The default sqlite3 database file.
45
+
46
+ `~/.config/ronin-db/database.yml`
47
+ Optional database configuration.
48
+
26
49
  ## AUTHOR
27
50
 
28
51
  Postmodern <postmodern.mod3@gmail.com>
@@ -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-remove 1 "2022-01-01" Ronin DB "User Manuals"
3
+ .TH ronin-db-remove 1 "2023-02-01" Ronin DB "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -25,22 +25,29 @@ The database entry to remove\.
25
25
  \fB-h\fR, \fB--help\fR
26
26
  Print help information\.
27
27
  .LP
28
- .SH FILES
28
+ .SH ENVIRONMENT
29
29
  .LP
30
30
  .TP
31
- \fI\[ti]\[sl]\.config\[sl]ronin\-db\[sl]database\.yml\fP
32
- The \fBronin-db\fR database(s) configuration file\.
31
+ \fIHOME\fP
32
+ Alternate location for the user\[cq]s home directory\.
33
33
  .LP
34
- .SH ENVIRONMENT
34
+ .TP
35
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
36
+ Alternate location for the \fB~/.config\fR directory\.
35
37
  .LP
36
- .PP
37
- HOME
38
- Specifies the home directory of the user\. Ronin will search for the
39
- \fI\[ti]\[sl]\.config\[sl]ronin\-db\fP cache directory within the home directory\.
38
+ .TP
39
+ \fIXDG\[ru]DATA\[ru]HOME\fP
40
+ Alternate location for the \fB~/.local/share\fR directory\.
40
41
  .LP
41
- .PP
42
- XDG\[ru]CONFIG\[ru]HOME
43
- Specifies the cache directory to use\. Defaults to \fI\[Do]HOME\[sl]\.config\fP\.
42
+ .SH FILES
43
+ .LP
44
+ .TP
45
+ \fB~/.local/share/ronin-db/database.sqlite3\fR
46
+ The default sqlite3 database file\.
47
+ .LP
48
+ .TP
49
+ \fB~/.config/ronin-db/database.yml\fR
50
+ Optional database configuration\.
44
51
  .LP
45
52
  .SH AUTHOR
46
53
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-db-remove 1 "2022-01-01" Ronin DB "User Manuals"
1
+ # ronin-db-remove 1 "2023-02-01" Ronin DB "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -19,19 +19,24 @@ configuration file.
19
19
  `-h`, `--help`
20
20
  Print help information.
21
21
 
22
- ## FILES
22
+ ## ENVIRONMENT
23
23
 
24
- *~/.config/ronin-db/database.yml*
25
- The `ronin-db` database(s) configuration file.
24
+ *HOME*
25
+ Alternate location for the user's home directory.
26
26
 
27
- ## ENVIRONMENT
27
+ *XDG_CONFIG_HOME*
28
+ Alternate location for the `~/.config` directory.
29
+
30
+ *XDG_DATA_HOME*
31
+ Alternate location for the `~/.local/share` directory.
32
+
33
+ ## FILES
28
34
 
29
- HOME
30
- Specifies the home directory of the user. Ronin will search for the
31
- *~/.config/ronin-db* cache directory within the home directory.
35
+ `~/.local/share/ronin-db/database.sqlite3`
36
+ The default sqlite3 database file.
32
37
 
33
- XDG_CONFIG_HOME
34
- Specifies the cache directory to use. Defaults to *$HOME/.config*.
38
+ `~/.config/ronin-db/database.yml`
39
+ Optional database configuration.
35
40
 
36
41
  ## AUTHOR
37
42
 
data/man/ronin-db-urls.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-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
@@ -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
@@ -71,23 +79,33 @@ Searches for URLs containing the query\-param NAME\.
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
75
87
  .LP
76
88
  .TP
77
- \fI\[ti]\[sl]\.ronin\[sl]\fP
78
- Ronin configuration directory\.
89
+ \fIHOME\fP
90
+ Alternate location for the user\[cq]s home directory\.
79
91
  .LP
80
92
  .TP
81
- \fI\[ti]\[sl]\.ronin\[sl]database\.log\fP
82
- Database log\.
93
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
94
+ Alternate location for the \fB~/.config\fR directory\.
95
+ .LP
96
+ .TP
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")