Skip to content

Instantly share code, notes, and snippets.

@xenithorb
Created January 17, 2019 17:39
Show Gist options
  • Save xenithorb/0114200c02a8bc9952d829b99623f9f7 to your computer and use it in GitHub Desktop.
Save xenithorb/0114200c02a8bc9952d829b99623f9f7 to your computer and use it in GitHub Desktop.

Revisions

  1. xenithorb created this gist Jan 17, 2019.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    while read -r line; do hash=$( awk -F'","' '{printf "%s", $4}' <<< "$line" | sha1sum | cut -d' ' -f1 ); hash=${hash^^}; if (curl -s "https://api.pwnedpasswords.com/range/${hash:0:5}" | grep -q "${hash:5}" ); then echo "$line"; fi; sleep 1; done < <( { tr -d '\n' < output.csv | sed -r -e 's|"(xenith_keepass)|\n"\1|g' -e 's|,,|,"",|g'; echo; } | tail -n+2)