22 Commits

Author SHA1 Message Date
Pierre Carrier
c491c6f62c
support filtering without -b 2025-02-08 15:27:42 +01:00
Pierre Carrier
9adade7502
upgrade deps, clean up (#83) 2025-02-07 23:48:54 +01:00
Pierre Carrier
c52e483b8a
update github workflows (#70)
Maintenance.
2023-11-13 19:15:26 +01:00
Erica
642039d436
Features: Adding keys, removing keys and printing secrets (#69) 2023-08-14 07:02:25 -04:00
Dmitry Pyzhov
2ce9fbe9b4
Add ability to request only one code for storing it in a clipboard (#66) 2023-05-25 15:59:45 -04:00
M. J. Fromberger
687b44867e Update module dependencies.
- github.com/creachadair/otp to v0.4.0
- golang.org/x/crypto to v0.1.0
- Update go mod vendor
- Update gofmt (changes from 1.19)
- Update CI configuration.
- Fix CI status badge.

No functional changes.
2022-11-07 17:27:16 -05:00
Sharun
c8ef25b018 use filepath to join the path to the csv file
this ensures `\` on the path on windows
2022-06-15 22:43:46 +02:00
M. J. Fromberger
f5a1f722c0 Proposal: Extend configuration file format to support options.
This change is a follow-up to the discussion on #33, which proposes a
backward-compatible extension to the existing config file format to allow the
user to include otpauth URLs in addition to the standard format.

This is WIP, not ready to merge; it needs tests and a better story for the
progress indicator.
2021-03-11 07:15:38 -05:00
M. J. Fromberger
c57414b83b
Fix padding removal when decrypting a config file. (#36)
OpenSSL uses PKCS#5 padding, and the decryption code was not removing it
correctly. In some cases, this causes the last line of the decrypted config to
be mangled and produces invalid results.

To support this:

- Move config loading to gauth.LoadConfigFile.
- Inject a hook to read the user's password.
- Add unit tests that decryption doesn't corrupt the result.
- Update module dependencies.
- Update Go versions in CI, and fix some config-check warnings.
2020-10-26 18:42:15 -07:00
M. J. Fromberger
9d95eb95fd Consolidate and simplify the generation of codes.
Rework gauth.Code as gauth.Codes, which returns the previous, current, and next
strings in one step. Remove authCodeOrDie, since there is now only one decode
step to check.

The implementation now uses the bitbucket.org/creachadair/otp package, which
makes the code simpler and subsumes normalizeSecret.
2019-06-03 22:20:08 -07:00
M. J. Fromberger
3e14d15f54 Clean up output formatting code.
Instead of manually computing column sizes, use the tabwriter library package.
The output is the same, but requires less fiddly space manipulation.
2019-06-02 08:23:28 -07:00
M. J. Fromberger
87aa5234c1 Separate OTP generation into a library.
No functional changes are intended; the main package now imports the library
and uses it, but the implementation is unchanged.

Specific highlights:

- Change the names of the functions to avert stutter following the advice of
  Effective Go: https://golang.org/doc/effective_go.html#package-names

- Reorganize the helpers in main so control flow is easier to follow.

- Add documentation comments.
2019-06-01 18:07:27 -07:00
Carlos Tadeu Panato Junior
e16e5ca533 Better aligment (#17) 2019-06-02 00:03:23 +02:00
Kevin E Rad
64a70580db Adding windows support (#22) 2019-06-02 00:02:45 +02:00
Pierre Carrier
65ebfe1593 newline after terminal.ReadPassword
Closes issue #5.
2015-12-07 21:21:31 +00:00
Pierre Carrier
08c36af51e fix encryption
- moving to crypto/ssh/terminal, which should also work on Windows
  and be better maintained (code.google.com is going away)
- fix support for padding

Closes #2.
2015-12-03 18:21:57 +00:00
Pierre Carrier
bc0fc1991e fix for travis complaint 2014-02-26 20:12:10 -08:00
Pierre Carrier
88535c8fbe support for encryption 2013-11-21 19:17:19 -08:00
Pierre Carrier
efee605b1d move to CSV
Preserves order, easier to maintain, more Unixy, less error-prone.
Sorry if you have to migrate.
2013-11-14 03:18:38 -08:00
Pierre Carrier
5bc8ff087a Support for "irregular" secret lengths
I realized whilst turning 2FA for Dropbox that they use a secret length
that's not a multiplier of 8, which breaks Go's base32 decoder.
2013-11-14 02:29:27 -08:00
Pierre Carrier
0df57e2c2e gauth.go: header, progress bar 2013-11-14 01:17:19 -08:00
Pierre Carrier
c1e9da57d1 make it a local process... HTTP is too much pain
Adapting to my new workflow, yo.
2013-11-12 06:45:56 +00:00