social-engineer-toolkit/src/qrcode/qrgenerator.py
hatRiot 5e84239dbc Removed double pause and fixed output string for QRGenerator
* src/core/set.py
  -- Removed a double pause after QR generation
* src/qrcode/qrgenerator.py
  -- Removed extraneous formatting ([*])
2013-12-02 23:38:19 -07:00

17 lines
615 B
Python

from src.qrcode.qrcode import *
from src.core.setcore import *
import os
# generate the qrcode and save it definition
def gen_qrcode(url):
# generate the qrcode
qr = QRCode(5, QRErrorCorrectLevel.L)
qr.addData(url)
qr.make()
im = qr.makeImage()
time.sleep(1)
if os.path.isfile(setdir + "/reports/qrcode_attack.png"): os.remove(setdir + "/reports/qrcode_attack.png")
# save the image out
im.save(setdir + "/reports/qrcode_attack.png", format='png')
# print that its been successful
print_status("QRCode has been generated under %s/reports/qrcode_attack.png!" % (setdir))