- Para que sea compatible con pyistaller --onefile haces el agregado que comenté antes:
Código
from tkinter import * raiz = Tk() raiz.title("CRACKME KEYGEN") ########################################### import sys if getattr(sys, 'frozen', False) : raiz.iconbitmap(sys._MEIPASS + '\\estrella.ico') else : raiz.iconbitmap('estrella.ico') ############################################ def generar(): user = vartxt1.get() sum = 0 largo = len(user) if (largo > 0xB): exit() userMAY = "" for i in range(largo): if (ord(user[i]) < 0x41): print ("CARACTER INVALIDO") exit() if (ord(user[i]) >= 0x5A): userMAY += chr(ord(user[i]) - 0X20) else: userMAY += chr(ord(user[i])) for i in range(len(userMAY)): sum += ord(userMAY[i]) xoreado = sum ^ 0x5678 TOTAL = xoreado ^ 0x1234 vartxt2.set(TOTAL) ventana = Frame( width=350, height=120 ) ventana.pack( padx=10, pady=10 ) vartxt1 = StringVar() txt1 = Entry( ventana, textvariable=vartxt1, width=25 ) txt1.grid( row=0, column=2, padx=20, pady=10 ) vartxt2 = StringVar() txt2 = Entry( ventana, textvariable=vartxt2, width=25 ) txt2.grid( row=2, column=2, padx=20, pady=10 ) txta = Label( ventana, text="NOMBRE :" ) txta.grid( row=0, column=0 ) txtb = Label( ventana, text="SERIAL :" ) txtb.grid( row=2, column=0 ) bgenerar = Button( ventana,command=generar, text="GENERAR", padx= 25, pady=5 ) bgenerar.grid( row=3, column=2 ) ventana.mainloop()
- Luego con pyinstaller:
Código
pyinstaller llaves.py -i cuadrado.ico --noconsole --onefile --add-data estrella.ico;.
Nombre: pepe
Serial: 17766
- Te podría recomendar también este libro en inglés, pero lo raro es que no está la orden iconbitmap
![:-\](https://foro.elhacker.net/Smileys/chef/undecided.gif)
-- Y por supuesto este otro buen libro en español, es muy práctico con muchos ejemplos: https://openlibra.com/es/book/download/doma-de-serpientes-para-ninos-edicion-windows