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 @@
password database filename. Default to +
password database filename. Default to
DefaultCreds-Cheat-Sheet.csv
.
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
).
the destination path (may +
the destination path (may
overwrite existing file).
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.
the destination path (may +
the destination path (may
overwrite existing file).
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.
the file path where the fiel will be +
the file path where the fiel will be
written to disk
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.
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)
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)
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)
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
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)
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)
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)
'1.4.0'
'2.0.0'
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.
@@ -73,26 +73,27 @@Library
-Features
+Features
-
- CLI and library
- Powerful search feature: fields, switches, regexp, highlight
- Output: simple table, pretty table, JSON, YAML, CSV
+- 2 sources: DefaultCreds-cheat-sheet, Many passwords
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.
@@ -73,26 +73,27 @@Library
-Features
+Features
-
- CLI and library
- Powerful search feature: fields, switches, regexp, highlight
- Output: simple table, pretty table, JSON, YAML, CSV
+- 2 sources: DefaultCreds-cheat-sheet, Many passwords
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.