diff --git a/Gemfile.lock b/Gemfile.lock index a650490..b88faac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - pass-station (1.4.0) + pass-station (2.0.0) docopt (~> 0.6) paint (~> 2.3) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c502e14..1150112 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -5,6 +5,9 @@ - Fanciness: - Colored help message - Add examples and project links to help message +- Documentation: + - Rework the publishing process + - Use syntax highlight for shell commands without output - Chore: - Add support for Ruby 3.2, 3.3, 3.4 - **Breaking change**: Drop support for Ruby 2.6, 2.7, 3.0 diff --git a/docs/pages/documentation.md b/docs/pages/documentation.md index e25cd07..c8b6fe3 100644 --- a/docs/pages/documentation.md +++ b/docs/pages/documentation.md @@ -6,9 +6,9 @@ See [Usage](pages/usage.md?id=cli). ### Serve locally -```plaintext -$ npm i docsify-cli -g -$ docsify serve docs +```bash +npm i docsify-cli -g +docsify serve docs ``` ## Library doc @@ -23,14 +23,14 @@ You can consult it online [here](https://noraj.github.io/pass-station/yard/). For developers who only want to use the library. -```plaintext -$ bundle exec yard doc +```bash +bundle exec yard doc ``` ### Building locally: for project developer For developers who want to participate to development of the project. -```plaintext -$ bundle exec yard doc --yardopts .yardopts-dev +```bash +bundle exec yard doc --yardopts .yardopts-dev ``` diff --git a/docs/pages/install.md b/docs/pages/install.md index 388459b..d2b34cd 100644 --- a/docs/pages/install.md +++ b/docs/pages/install.md @@ -4,8 +4,8 @@ ### Install from rubygems.org -```plaintext -$ gem install pass-station +```bash +gem install pass-station ``` Gem: [pass-station](https://rubygems.org/gems/pass-station) @@ -14,41 +14,33 @@ Gem: [pass-station](https://rubygems.org/gems/pass-station) From the repository: -```plaintext -# pacman -S pass-station +```bash +pacman -S pass-station ``` PKGBUILD: [pass-station](https://github.com/BlackArch/blackarch/blob/master/packages/pass-station/PKGBUILD) -### Install from Pentoo - -From the repository: - -```plaintext -# emerge TODO/pass-station -``` - ## Development It's better to use [rbenv](https://github.com/rbenv/rbenv) or [asdf](https://github.com/asdf-vm/asdf) to have latests version of ruby and to avoid trashing your system ruby. ### Install from rubygems.org -```plaintext -$ gem install --development pass-station +```bash +gem install --development pass-station ``` ### Build from git Just replace `x.x.x` with the gem version you see after `gem build`. -```plaintext -$ git clone https://github.com/noraj/pass-station.git pass-station -$ cd pass-station -$ gem install bundler -$ bundler install -$ gem build pass-station.gemspec -$ gem install pass-station-x.x.x.gem +```bash +git clone https://github.com/noraj/pass-station.git pass-station +cd pass-station +gem install bundler +bundler install +gem build pass-station.gemspec +gem install pass-station-x.x.x.gem ``` Note: if an automatic install is needed you can get the version with `$ gem build pass-station.gemspec | grep Version | cut -d' ' -f4`. @@ -57,13 +49,13 @@ Note: if an automatic install is needed you can get the version with `$ gem buil From local file: -```plaintext -$ irb -Ilib -rpass_station +```bash +irb -Ilib -rpass_station ``` Same for the CLI tool: -```plaintext -$ ruby -Ilib -rpass_station bin/pass-station +```bash +ruby -Ilib -rpass_station bin/pass-station ``` diff --git a/docs/pages/publishing.md b/docs/pages/publishing.md index 92f71c5..8dee6ca 100644 --- a/docs/pages/publishing.md +++ b/docs/pages/publishing.md @@ -1,39 +1,49 @@ # Publishing -## On Rubygems.org +Change version in `lib/pass_station/version.rb`. -```plaintext -$ git tag -a vx.x.x -$ git push --follow-tags -$ gem push pass-station-x.x.x.gem +Be sure all tests pass! + +```bash +bundle exec rake test ``` -See https://guides.rubygems.org/publishing/. +Ensure there is no linting offence. + +```bash +bundle exec rubocop +``` -On new release don't forget to rebuild the library documentation: +Check if new upstream data is available. -```plaintext -$ bundle exec yard doc +```bash +pass-station update --check ``` -And to be sure all tests pass! +If so, update data: -```plaintext -$ rake +```bash +pass-station update --force data/ ``` -## On BlackArch +And reflect the integrity hash in `PassStation::DB::UPSTREAM_DATABASE` in `lib/pass_station/source.rb`. -BA process +```bash +sha256sum data/*.csv +``` -On new release don't forget to rebuild the library documentation: +Don't forget to rebuild the library documentation to reflect, new code, new version, etc.: -```plaintext -$ bundle exec yard doc +```bash +bundle exec yard doc ``` -And to be sure all tests pass! +```bash +git tag -a vx.x.x +git push --follow-tags -```plaintext -$ rake +bundle exec rake build +gem push pkg/pass-station-x.x.x.gem ``` + +See https://guides.rubygems.org/publishing/. diff --git a/docs/pages/quick-start.md b/docs/pages/quick-start.md index e60230d..3f96436 100644 --- a/docs/pages/quick-start.md +++ b/docs/pages/quick-start.md @@ -2,8 +2,8 @@ ## Quick install -```plaintext -$ gem install pass-station +```bash +gem install pass-station ``` See [Installation](/pages/install) diff --git a/docs/yard/PassStation.html b/docs/yard/PassStation.html index a3ab8e9..ad12789 100644 --- a/docs/yard/PassStation.html +++ b/docs/yard/PassStation.html @@ -6,7 +6,7 @@ Module: PassStation - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -136,9 +136,9 @@

Constants included diff --git a/docs/yard/PassStation/DB.html b/docs/yard/PassStation/DB.html index b42af9d..ae1f932 100644 --- a/docs/yard/PassStation/DB.html +++ b/docs/yard/PassStation/DB.html @@ -6,7 +6,7 @@ Class: PassStation::DB - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -130,7 +130,7 @@

}, DEFAULT_CREDENTIALS_CHEAT_SHEET: { URL: 'https://raw.githubusercontent.com/ihebski/DefaultCreds-cheat-sheet/main/DefaultCreds-Cheat-Sheet.csv', - HASH: 'f03f3ed77a8a932b1b2891fbec705d42b1eec4911fb76ccf36cde9e79a385556', + HASH: '6494a05090e14c438c9fa110f1566b3b7b9e2518bd0b8c42255f0dd3f7dff77b', FILENAME: 'DefaultCreds-Cheat-Sheet.csv', COLUMNS: { productvendor: 'Product/Vendor', @@ -140,7 +140,7 @@

}, MANY_PASSWORDS: { URL: 'https://raw.githubusercontent.com/many-passwords/many-passwords/main/passwords.csv', - HASH: '293ce4411446c702aeda977b9a446ff42d045d980be0b5287a848b5bd7d39402', + HASH: '5eb85093f03dcc6a377fe7263e0629574088892dc283d5f53f93d1db80c7287a', FILENAME: 'many-passwords.csv', COLUMNS: { vendor: 'Vendor', @@ -747,7 +747,7 @@

— -

password database filename. Default to +

password database filename. Default to
DefaultCreds-Cheat-Sheet.csv.

@@ -899,7 +899,7 @@

def check_for_update ret_vals = [] - UPSTREAM_DATABASE[:MAPPING].each do |_k, v| + UPSTREAM_DATABASE[:MAPPING].each_value do |v| file = download_file(UPSTREAM_DATABASE[v][:URL], Dir.mktmpdir) # Same hash = no update ret_vals << !check_hash(file, UPSTREAM_DATABASE[v][:HASH]) @@ -974,7 +974,7 @@

— -

if the hash of the file matched the one provided (true) +

if the hash of the file matched the one provided (true)
or not (false).

@@ -1058,7 +1058,7 @@

— -

the destination path (may +

the destination path (may
overwrite existing file).

@@ -1100,7 +1100,7 @@

- —

the SHA256 hash to check, if the file + —

the SHA256 hash to check, if the file
already exist and the hash matches then the download will be skipped.

@@ -1206,7 +1206,7 @@

— -

the destination path (may +

the destination path (may
overwrite existing file).

@@ -1246,7 +1246,7 @@

- —

the SHA256 hash to check, if the file + —

the SHA256 hash to check, if the file
already exist and the hash matches then the download will be skipped.

@@ -1426,7 +1426,7 @@

— -

the file path where the fiel will be +

the file path where the fiel will be
written to disk

@@ -1507,8 +1507,8 @@

-

Highlight (colorize) a searched term in the input -When used with the search command, it will ignore in which column the +

Highlight (colorize) a searched term in the input
+When used with the search command, it will ignore in which column the
search was made, and will instead colorize in every columns.

@@ -1907,7 +1907,7 @@

— -

table of CSV::Row, each row contains multiple +

table of CSV::Row, each row contains multiple
attributes (columns depends on the database source, see UPSTREAM_DATABASE)

@@ -1987,7 +1987,7 @@

— -

the column to search in: column name (columns depends on the database source, see +

the column to search in: column name (columns depends on the database source, see
UPSTREAM_DATABASE) or :all (all columns)

@@ -2006,7 +2006,7 @@

— -

table of CSV::Row, each row contains multiple +

table of CSV::Row, each row contains multiple
attributes (columns depends on the database source, see UPSTREAM_DATABASE)

@@ -2059,9 +2059,9 @@

diff --git a/docs/yard/PassStation/Output.html b/docs/yard/PassStation/Output.html index 7c6cdd4..8f61ae2 100644 --- a/docs/yard/PassStation/Output.html +++ b/docs/yard/PassStation/Output.html @@ -6,7 +6,7 @@ Module: PassStation::Output - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -85,7 +85,7 @@

Overview

-

Output handling module containing all formatter engines +

Output handling module containing all formatter engines
Meant to be used by the CLI binary but could be re-used in many other ways

@@ -116,9 +116,9 @@

Overview

diff --git a/docs/yard/PassStation/Output/Csv.html b/docs/yard/PassStation/Output/Csv.html index cf0a850..3e27746 100644 --- a/docs/yard/PassStation/Output/Csv.html +++ b/docs/yard/PassStation/Output/Csv.html @@ -6,7 +6,7 @@ Class: PassStation::Output::Csv - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -237,9 +237,9 @@

diff --git a/docs/yard/PassStation/Output/Json.html b/docs/yard/PassStation/Output/Json.html index f85d645..6130df2 100644 --- a/docs/yard/PassStation/Output/Json.html +++ b/docs/yard/PassStation/Output/Json.html @@ -6,7 +6,7 @@ Class: PassStation::Output::Json - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -204,8 +204,8 @@

— -

the formatted JSON ready to be printed (only -one element on the array, keep an array for compatibility with +

the formatted JSON ready to be printed (only
+one element on the array, keep an array for compatibility with
DB#highlight_found and homogeneity with other formatters)

@@ -239,9 +239,9 @@

diff --git a/docs/yard/PassStation/Output/PrettyTable.html b/docs/yard/PassStation/Output/PrettyTable.html index f013ce2..6f14ecc 100644 --- a/docs/yard/PassStation/Output/PrettyTable.html +++ b/docs/yard/PassStation/Output/PrettyTable.html @@ -6,7 +6,7 @@ Class: PassStation::Output::PrettyTable - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -715,9 +715,9 @@

diff --git a/docs/yard/PassStation/Output/Table.html b/docs/yard/PassStation/Output/Table.html index b1c11d6..5ac18de 100644 --- a/docs/yard/PassStation/Output/Table.html +++ b/docs/yard/PassStation/Output/Table.html @@ -6,7 +6,7 @@ Class: PassStation::Output::Table - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -474,7 +474,7 @@

-

Correct colsizes to be at least of the size of the headers (case when +

Correct colsizes to be at least of the size of the headers (case when
values are shorter than headers and breaks the table display)

@@ -922,9 +922,9 @@

diff --git a/docs/yard/PassStation/Output/Yaml.html b/docs/yard/PassStation/Output/Yaml.html index 88601d8..a25c3d5 100644 --- a/docs/yard/PassStation/Output/Yaml.html +++ b/docs/yard/PassStation/Output/Yaml.html @@ -6,7 +6,7 @@ Class: PassStation::Output::Yaml - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -204,8 +204,8 @@

— -

the formatted YAML ready to be printed (only -one element on the array, keep an array for compatibility with +

the formatted YAML ready to be printed (only
+one element on the array, keep an array for compatibility with
DB#highlight_found and homogeneity with other formatters)

@@ -239,9 +239,9 @@

diff --git a/docs/yard/Version.html b/docs/yard/Version.html index ee7910d..0203a66 100644 --- a/docs/yard/Version.html +++ b/docs/yard/Version.html @@ -6,7 +6,7 @@ Module: Version - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -100,7 +100,7 @@

VERSION =
-
'1.4.0'
+
'2.0.0'
@@ -116,9 +116,9 @@

diff --git a/docs/yard/_index.html b/docs/yard/_index.html index 61a21b6..4908131 100644 --- a/docs/yard/_index.html +++ b/docs/yard/_index.html @@ -4,7 +4,7 @@ - Documentation by YARD 0.9.28 + Documentation by YARD 0.9.36 @@ -52,7 +52,7 @@

-

Documentation by YARD 0.9.28

+

Documentation by YARD 0.9.36

Alphabetic Index

@@ -213,9 +213,9 @@

Namespace Listing A-Z

diff --git a/docs/yard/file.LICENSE.html b/docs/yard/file.LICENSE.html index 417fc88..8dff7e5 100644 --- a/docs/yard/file.LICENSE.html +++ b/docs/yard/file.LICENSE.html @@ -6,7 +6,7 @@ File: LICENSE - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -58,29 +58,29 @@

MIT License

-

Copyright (c) 2021 Alexandre ZANNI +

Copyright (c) 2021-2023 Alexandre ZANNI
Copyright (c) 2021 Alexandre ZANNI at SEC-IT

-

Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is +

Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

-

The above copyright notice and this permission notice shall be included in all +

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

-

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

diff --git a/docs/yard/file.README.html b/docs/yard/file.README.html index 98d38ef..e6e6b40 100644 --- a/docs/yard/file.README.html +++ b/docs/yard/file.README.html @@ -6,7 +6,7 @@ File: README - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -57,13 +57,13 @@

-

Pass Station

-

Gem Version -GitHub tag (latest SemVer) -GitHub forks -GitHub stars -GitHub license -Rawsec's CyberSecurity Inventory

+

Pass Station

+

Gem Version
+GitHub tag (latest SemVer)
+GitHub forks
+GitHub stars
+GitHub license
+Rawsec's CyberSecurity Inventory

Packaging status

logo

@@ -73,26 +73,27 @@

asciicast

Library

library example

-

Features

+

Features

-

Installation

+

Installation

$ gem install pass-station
 

Check the installation page on the documentation to discover more methods.

-

Documentation

+

Documentation

Homepage / Documentation: https://noraj.github.io/pass-station/

-

Author

-

Made by Alexandre ZANNI (@noraj).

+

Author

+

Made by Alexandre ZANNI (@noraj). Forked from sec-it/pass-station.

diff --git a/docs/yard/frames.html b/docs/yard/frames.html index a65e936..53734c2 100644 --- a/docs/yard/frames.html +++ b/docs/yard/frames.html @@ -2,13 +2,18 @@ - Documentation by YARD 0.9.28 + Documentation by YARD 0.9.36
-

Pass Station

-

Gem Version -GitHub tag (latest SemVer) -GitHub forks -GitHub stars -GitHub license -Rawsec's CyberSecurity Inventory

+

Pass Station

+

Gem Version
+GitHub tag (latest SemVer)
+GitHub forks
+GitHub stars
+GitHub license
+Rawsec's CyberSecurity Inventory

Packaging status

logo

@@ -73,26 +73,27 @@

asciicast

Library

library example

-

Features

+

Features

-

Installation

+

Installation

$ gem install pass-station
 

Check the installation page on the documentation to discover more methods.

-

Documentation

+

Documentation

Homepage / Documentation: https://noraj.github.io/pass-station/

-

Author

-

Made by Alexandre ZANNI (@noraj).

+

Author

+

Made by Alexandre ZANNI (@noraj). Forked from sec-it/pass-station.

diff --git a/docs/yard/top-level-namespace.html b/docs/yard/top-level-namespace.html index 3a6fad9..a268820 100644 --- a/docs/yard/top-level-namespace.html +++ b/docs/yard/top-level-namespace.html @@ -6,7 +6,7 @@ Top Level Namespace - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.36 @@ -100,9 +100,9 @@

Defined Under Namespace

diff --git a/lib/pass_station/version.rb b/lib/pass_station/version.rb index 46bd4a5..2fa7b3b 100644 --- a/lib/pass_station/version.rb +++ b/lib/pass_station/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Version - VERSION = '1.4.0' + VERSION = '2.0.0' end