I hereby claim:
- I am valerytschopp on github.
- I am valerytschopp (https://keybase.io/valerytschopp) on keybase.
- I have a public key whose fingerprint is A419 0452 3FCC ADA7 3DE7 6F58 06F6 7280 1420 ABD2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# | |
# Copyright (c) 2017 SWITCH http://www.switch.ch | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
#!/bin/bash | |
read -s -p "Password: " password | |
echo | |
hash=$(echo -n $password | sha1sum | awk '{print toupper($1)}') | |
prefix=${hash:0:5} | |
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix) | |
while IFS=':' read -ra line | |
do | |
hash_line="$prefix${line[0]}" | |
count=$(echo ${line[1]}|tr -d '\r') |