Last active
October 25, 2019 06:36
-
-
Save hellwolf/19683984d3df156e9a2473513b9f8061 to your computer and use it in GitHub Desktop.
Estonian residents of the same birthday
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
YOUR_BIRTHDAY=YYMMDD;for a in 3 4;do | |
for i in `seq 9999`;do | |
kood=${a}${YOUR_BIRTHDAY}$(printf %04d $i) | |
# https://www.sk.ee/en/repository/ldap | |
found=$(ldapsearch -x -H ldaps://esteid.ldap.sk.ee -b c=EE "(serialNumber=PNOEE-$kood)" | sed -n 's/cn::\? \(.*\)$/\1/p' | uniq) | |
[ -z "${found%%*=}" ] && found=`echo $found|base64 -d`;[ ! -z "$found" ] && echo $kood $found; | |
done; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment