Last active
May 6, 2026 11:13
-
-
Save m-rey/cc079826a1b3d33fca174f6559fb01c9 to your computer and use it in GitHub Desktop.
an intentionally very much cursed "one-liner" that returns the name of the bank of any given German IBAN number, without submitting the IBAN to any online service. It instead downloads the public BLZ list and checks against it offline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "DE89 3704 0044 0532 0130 00" | { read iban; tmp=$(mktemp); url=$(curl -fsSL "https://www.bundesbank.de/de/aufgaben/unbarer-zahlungsverkehr/serviceangebot/bankleitzahlen/download-bankleitzahlen-602592" | grep -oP '(?<=href=")[^"]*blz-aktuell-txt-data\.txt' | head -1 | sed 's|^/|https://www.bundesbank.de/|'); curl -fsSL "$url" -o "$tmp" && awk -b -v blz="$(echo "$iban" | tr -d ' ' | cut -c5-12)" 'substr($0,1,8)==blz{print substr($0,10,58); exit}' "$tmp" | xargs; rm -f "$tmp"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment