Skip to content

Commit

Permalink
Remove trailing endline before hashing passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
jes authored Feb 24, 2018
1 parent dda1614 commit c52b97c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion passpwn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ set -eou pipefail
# Takes in a pass entry (example: Email/zx2c4.com) and outputs the entries
# tested and any compromises to stderr.
function check_password() {
sha1=$(pass "${1}" | head -n 1 | sha1sum | tr '[:lower:]' '[:upper:]' | awk -F' ' '{ print $1 }')
password=$(pass "${1}" | head -n 1)
sha1=$(echo -n "${password}" | sha1sum | tr '[:lower:]' '[:upper:]' | awk -F' ' '{ print $1 }')
short=${sha1:0:5}

echo "${sha1} | ${entry}"
Expand Down

0 comments on commit c52b97c

Please sign in to comment.