Giter Club home page Giter Club logo

hash's Introduction

Hash

Hash is a terminal based password manager for everyone. If you spend most of your time in your terminal, Hash may be a good fit in your workflow.

Watch this video to understand the functionality of Hash.

hash-trailer-mp3.mp4

Motivation for this project

I always prefer email password based signups in websites. But managing password is a hassle for me. I have used Bitwarden password manager and it is great. But I want to access my passwords from my terminal. I don't want to click around with the mouse to get a single password. Therefore I created Hash.

Getting started

  1. Go to the GitHub release section and pick the binary for your operating system. All the binaries are statically linked. Hence, binaries are portable and don't depend on OS libraries.

  2. Rename the binary file to hash.

  3. Make sure that the downloaded binary is executable. If not, run chmod +x hash.

  4. After downloading, place the binary in your path. e.g, For Linux users, put the binary inside ~/.local/bin or ~/bin directory. For macOS, put the binary inside /usr/local/bin directory.

  5. Start using Hash by running hash in your terminal.

Tech Stack

  • This project is written in Golang.
  • The beautiful TUI (Terminal User Interface) is made using BubbleTea, Bubbles and Lipgloss.
  • Bcrypt (a hash function) is used to generate the Salt.
  • PBKDF2 (a key derivation function) is used to generate the Secret Key.
  • Nacl Secretbox is used to symmetrically encrypt the password.
  • All the password are Hex encoded before storing on the Database.
  • Sqlite is used to store the encrypted passwords.

Build this project in your machine

  1. Clone the repository
git clone https://github.com/hrishiksh/golang-oauth2-starter.git
  1. Download all the dependency
go mod download
go mod tidy
  1. Build binary
make build

**Note: ** As some part of this project uses CGO, native go cross compilation is not easy. To statically link the binary, I have used the Zig compiler. This is a tutorial on how to do so in your project.

hash's People

Contributors

hrishiksh avatar

Stargazers

Vitaliy Chernov avatar BeiXiao avatar Nikita Volkov avatar Mased avatar Shaiful Aiman Malik avatar Dhanush G avatar  avatar Serge avatar 8thgencore avatar Малышев Андрей avatar  avatar @karantin2020 avatar Mikhail Kricki avatar  avatar  avatar Max Dupley avatar  avatar Belbecek avatar  avatar Vinicius avatar  avatar mxxntype ༒ avatar  avatar Vadim avatar Max Inno avatar  avatar Simon Dräger avatar Anatoly avatar Sven Hohlfeld avatar Kapelius avatar hirak0 avatar Alex Kup avatar Abhishek Nair avatar Noskill avatar fallenull avatar Antares avatar Jonas mg avatar Vladislav Sorokin avatar  avatar cr0cus avatar Nikita Popov avatar  avatar Pavel Brilliant avatar vladk1m0 avatar Denis Korolev avatar Михаил Вестник avatar Amadi Jerry avatar netr avatar  avatar Lionel Tchami avatar EnriqueC avatar Vladimir Caraseni avatar Alex avatar TOMMY avatar Daniil Sozontov avatar Edson R C Júnior avatar  avatar  avatar David Wooldridge avatar Jeffery Oke-Samuel avatar Devansh Tiwari avatar Wes McNamee avatar Euan M avatar Weronika avatar Chinedum avatar Hayk Baghdasaryan avatar  avatar metacatdud avatar  avatar  avatar ccoVeille avatar Thomas Schlosser avatar Mert  avatar David Bariod avatar Ben Lee-Cohen avatar Clayton Kehoe avatar  avatar

Watchers

ccoVeille avatar  avatar krs avatar

hash's Issues

Bug in zero passwords, in press update

All passwords total 0
       
Caught panic:

runtime error: index out of range [0] with length 0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/usr/lib/go/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
	/usr/lib/go/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	/home/badwolf/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:478 +0x91
panic({0x23efa0?, 0xc0002b82d0?})
	/usr/lib/go/src/runtime/panic.go:770 +0x132
main.onPaswordListUpdate({_, _}, {0x4, {0xc00013cc40, 0x3c, 0x3c}, 0x0, {{0x0, 0x0}, {0x250044, ...}, ...}, ...})
	/home/badwolf/GitHub/hash/listpassword.go:65 +0x9d5
main.Model.Update({0x1, {0xc00013cc40, 0x3c, 0x3c}, 0x0, {{0x0, 0x0}, {0x250044, 0x2}, {0x253405, ...}, ...}, ...}, ...)
	/home/badwolf/GitHub/hash/tui.go:155 +0x174
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc0001496c0, {0x299ce8?, 0xc000129108?}, 0xc00010e180)
	/home/badwolf/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:411 +0x5e2
github.com/charmbracelet/bubbletea.(*Program).Run(0xc0001496c0)
	/home/badwolf/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543 +0x86b
main.main()
	/home/badwolf/GitHub/hash/main.go:39 +0x26a

Playback Steps:

  1. Enter the master password
  2. Log in with the master password (ctrl + ->)
  3. Press Update (ctrl + u)

Expected results:
Message: You don't have passwords
Or: Nothing happened

bitwarden CLI is available

hash/README.md

Line 11 in 6fe88aa

I always prefer email password based signups in websites. But managing password is a hassle for me. I have used [Bitwarden password manager](https://bitwarden.com/) and it is great. But I want to access my passwords from my terminal. I don't want to click around with the mouse to get a single password. Therefore I created Hash.

Following our discussion on reddit you could/should rephrase this

https://www.reddit.com/r/golang/comments/1cgmfws/comment/l1woir1

wording issue

hash/README.md

Line 32 in 6fe88aa

- All the password are [Hex encoded](https://pkg.go.dev/encoding/hex) before storing on the Database.

I think you are hex encoding password before encrypting them, you only mention "before storing them"

It could let people things password are only protected by an hex encoding.

Wording is a pain, I hope you get my point

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.