Skip to content

Instantly share code, notes, and snippets.

View danifr's full-sized avatar
🐧

Daniel Fernández danifr

🐧
View GitHub Profile
@danifr
danifr / yubikey-reset.sh
Created March 19, 2020 12:50 — forked from pkirkovsky/yubikey-reset.sh
Utility for resetting a Yubikey to factory defaults using gpg-connect-agent. This will wipe out any stored keys and reset PINs to default values.
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
@danifr
danifr / README-fail2ban-keycloak.md
Last active April 11, 2022 15:00 — forked from drmalex07/README-fail2ban-keycloak.md
Use fail2ban to block brute-force attacks to keycloak server. #keycloak #fail2ban #brute-force-attack #centos7 #nginx

Tested on Centos 7. Deployent: Keycloak with an Nginx proxy_pass

Add regular-expression filter under /etc/fail2ban/filter.d/keycloak.conf:

[INCLUDES]

before = common.conf

[Definition]
pm uninstall -k --user 0 com.google.android.apps.tachyon &&
pm uninstall -k --user 0 com.google.android.music &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.sheets &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.slides &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.docs &&
pm uninstall -k --user 0 com.google.android.videos &&
pm uninstall -k --user 0 com.android.gallery3d &&
pm uninstall -k --user 0 com.android.calendar &&
pm uninstall -k --user 0 com.evernote &&
pm uninstall -k --user 0 com.evernote.promohelper &&