def __init__(self, top = None): """This class configures and populates the toplevel window. top is the toplevel containing window.""" _bgcolor = '#d9d9d9' _fgcolor = '#000000' _compcolor = '#d9d9d9' _ana1color = '#d9d9d9' _ana2color = '#d9d9d9' font10 = '-family {DejaVu Sans Mono} -size 12 -weight normal -slant roman -underline 0 -overstrike 0' self.style = ttk.Style() if sys.platform == 'win32': self.style.theme_use('winnative') self.style.configure('.', background=_bgcolor) self.style.configure('.', foreground=_fgcolor) self.style.map('.', background=[('selected', _compcolor), ('active', _ana2color)]) top.geometry('750x500+218+86') top.title('Unsign Backup') top.configure(highlightcolor='black') cmadir = open('cmadir.txt', 'r') CMA = cmadir.read() a = 0 self.Label1 = Label(top) self.Label1.place(relx=0.02, rely=0.02, height=18, width=96) self.Label1.configure(text='What Backup?') self.Label1.configure(width=96) self.backupList = ScrolledListBox(top) self.backupList.place(relx=0.01, rely=0.06, relheight=0.87, relwidth=0.97) self.backupList.configure(background='white') self.backupList.configure(font=font10) self.backupList.configure(highlightcolor='#d9d9d9') self.backupList.configure(selectbackground='#c4c4c4') self.backupList.configure(width=10) print 'Looking For Backups In: ' + CMA + '/' + unsign_support.getLoad() + '/' + defs.getAid(unsign_support.getAccount()) for root, dir, files in defs.walklevel(CMA + '/' + unsign_support.getLoad() + '/' + defs.getAid(unsign_support.getAccount()),0): for items in fnmatch.filter(dir, '*'): a += 1 if defs.isEncryptedApp(CMA + '/' + unsign_support.getLoad() + '/' + defs.getAid(unsign_support.getAccount()) + '/' + items): title = sfoParser.main(CMA + '/' + unsign_support.getLoad() + '/' + defs.getAid(unsign_support.getAccount()) + '/' + items + '/sce_sys/param.sfo') if pfs.isKeyKnown(items): self.backupList.insert(a, title + ' [PFS] (' + items + ')') else: self.backupList.insert(a, title + ' (' + items + ')') elif unsign_support.getLoad() == 'SYSTEM' and defs.isBackup(CMA + '/' + unsign_support.getLoad() + '/' + defs.getAid(unsign_support.getAccount()) + '/' + items + '/' + items): self.backupList.insert(a, items) self.Button1 = Button(top) self.Button1.place(relx=0.83, rely=0.94, height=26, width=117) self.Button1.configure(activebackground='#d9d9d9') if unsign_support.getLoad() != "SYSTEM": self.Button1.configure(command=lambda: unsign_support.goUnsign(defs.getTitleID(self.backupList.get(ACTIVE)), CMA, False,unsign_support.getLoad(), unsign_support.getAccount())) else: self.Button1.configure(command=lambda: unsign_support.goUnsign(self.backupList.get(ACTIVE), CMA, False,unsign_support.getLoad(), unsign_support.getAccount())) self.Button1.configure(text='Unsign & Extract') if unsign_support.getResign() == False: self.Button2 = Button(top) self.Button2.place(relx=0.01, rely=0.94, height=26, width=120) self.Button2.configure(activebackground='#d9d9d9') self.Button2.configure(command=lambda: unsign_support.goUnsign(defs.getTitleID(self.backupList.get(ACTIVE)), CMA, True,unsign_support.getLoad(), unsign_support.getAccount())) self.Button2.configure(text='Create .cmbackup')
def __init__(self, top=None): '''This class configures and populates the toplevel window. top is the toplevel containing window.''' _bgcolor = '#d9d9d9' # X11 color: 'gray85' _fgcolor = '#000000' # X11 color: 'black' _compcolor = '#d9d9d9' # X11 color: 'gray85' _ana1color = '#d9d9d9' # X11 color: 'gray85' _ana2color = '#d9d9d9' # X11 color: 'gray85' font10 = "-family {DejaVu Sans Mono} -size 12 -weight normal " \ "-slant roman -underline 0 -overstrike 0" self.style = ttk.Style() if sys.platform == "win32": self.style.theme_use('winnative') self.style.configure('.', background=_bgcolor) self.style.configure('.', foreground=_fgcolor) self.style.map('.', background=[('selected', _compcolor), ('active', _ana2color)]) top.geometry("750x500+218+86") top.title("Select Backup") top.configure(highlightcolor="black") CMA = defs.getCmaDir() a = 0 self.Label1 = Label(top) self.Label1.place(relx=0.02, rely=0.02, height=18, width=96) self.Label1.configure(text='''Patch: ''') self.Label1.configure(width=96) self.backupList = ScrolledListBox(top) self.backupList.place(relx=0.01, rely=0.06, relheight=0.87, relwidth=0.97) self.backupList.configure(background="white") self.backupList.configure(font=font10) self.backupList.configure(highlightcolor="#d9d9d9") self.backupList.configure(selectbackground="#c4c4c4") self.backupList.configure(width=10) print "Looking For Backups In: " + CMA + "/SYSTEM/" + defs.getAid( account) for root, dir, files in os.walk(CMA + "/SYSTEM/" + defs.getAid(account)): for items in fnmatch.filter(dir, "*"): a += 1 if defs.isBackup(CMA + "/SYSTEM/" + defs.getAid(account) + "/" + items + "/" + items): self.backupList.insert(a, items) self.Button1 = Button(top) self.Button1.place(relx=0.83, rely=0.94, height=26, width=117) self.Button1.configure(activebackground="#d9d9d9") self.Button1.configure( command=lambda: patch(self.backupList.get(ACTIVE))) self.Button1.configure(text='''Patch Whitelist''')
def __init__(self, top=None): """This class configures and populates the toplevel window. top is the toplevel containing window.""" _bgcolor = '#d9d9d9' _fgcolor = '#000000' _compcolor = '#d9d9d9' _ana1color = '#d9d9d9' _ana2color = '#d9d9d9' font10 = '-family {DejaVu Sans Mono} -size 12 -weight normal -slant roman -underline 0 -overstrike 0' self.style = ttk.Style() if sys.platform == 'win32': self.style.theme_use('winnative') self.style.configure('.', background=_bgcolor) self.style.configure('.', foreground=_fgcolor) self.style.map('.', background=[('selected', _compcolor), ('active', _ana2color)]) top.geometry('750x500+183+54') top.title('Sign Backup') top.configure(highlightcolor='black') cmadir = open('cmadir.txt', 'r') CMA = cmadir.read() self.Button2 = Button(top) self.Button2.place(relx=0.13, rely=0.94, height=26, width=107) self.Button2.configure(activebackground='#d9d9d9') if sign_support.getLoad() != "SYSTEM": self.Button2.configure(command=lambda: sign_support.delBkup( defs.getTitleID(self.backupList.get(ACTIVE)))) elif sign_support.getLoad() == "SYSTEM": self.Button2.configure(command=lambda: sign_support.delBkup( self.backupList.get(ACTIVE))) self.Button2.configure(text='Delete Backup') self.Button2.configure(width=107) self.Button3 = Button(top) self.Button3.place(relx=0.87, rely=0.94, height=26, width=87) self.Button3.configure(activebackground='#d9d9d9') if sign_support.getLoad() != "SYSTEM": self.Button3.configure(command=lambda: sign_support.sign( defs.getTitleID(self.backupList.get(ACTIVE)))) elif sign_support.getLoad() == "SYSTEM": self.Button3.configure( command=lambda: sign_support.sign(self.backupList.get(ACTIVE))) self.Button3.configure(text='Sign & Pack') self.Button3.configure(width=87) a = 0 self.backupList = ScrolledListBox(top) self.backupList.place(relx=0.01, rely=0.02, relheight=0.91, relwidth=0.97) self.backupList.configure(background='white') self.backupList.configure(font=font10) self.backupList.configure(highlightcolor='#d9d9d9') self.backupList.configure(selectbackground='#c4c4c4') self.backupList.configure(width=10) print 'Looking For Backups In: ' + CMA + '/EXTRACTED/' + sign_support.getLoad( ) for root, dir, files in defs.walklevel( CMA + '/EXTRACTED/' + sign_support.getLoad(), 0): for items in fnmatch.filter(dir, '*'): a += 1 if sign_support.getLoad() != 'SYSTEM' and defs.isApp( CMA + '/EXTRACTED/' + sign_support.getLoad() + '/' + items): title = sfoParser.main(CMA + '/EXTRACTED/' + sign_support.getLoad() + '/' + items + '/sce_sys/param.sfo') if pfs.isKeyKnown(items): self.backupList.insert( a, title + ' [PFS] (' + items + ')') else: self.backupList.insert(a, title + ' (' + items + ')') elif sign_support.getLoad() == 'SYSTEM' and defs.isBackup( CMA + '/EXTRACTED/' + sign_support.getLoad() + '/' + items): self.backupList.insert(a, items) self.Button4 = Button(top) self.Button4.place(relx=0.01, rely=0.94, height=26, width=87) self.Button4.configure(activebackground='#d9d9d9') if sign_support.getLoad() != "SYSTEM": self.Button4.configure(command=lambda: sign_support.expBkup( defs.getTitleID(self.backupList.get(ACTIVE)))) elif sign_support.getLoad() == 'SYSTEM': self.Button4.configure(command=lambda: sign_support.expBkup( self.backupList.get(ACTIVE))) self.Button4.configure(text='Edit Backup') self.Button4.configure(width=87) self.Button9 = Button(top) self.Button9.place(relx=0.28, rely=0.94, height=26, width=115) self.Button9.configure(activebackground='#d9d9d9') self.Button9.configure(command=sign_support.cmbackup) self.Button9.configure(text='Install .cmbackup') self.Button9.configure(width=107) if sign_support.getLoad() == "APP": self.pfsDecryptButton = Button(top) self.pfsDecryptButton.place(relx=0.75, rely=0.94, height=26, width=87) self.pfsDecryptButton.configure(activebackground='#d9d9d9') self.pfsDecryptButton.configure(command=lambda: pfdecrypt( defs.getTitleID(self.backupList.get(ACTIVE)))) self.pfsDecryptButton.configure(text='PFS Decrypt') self.pfsDecryptButton.configure(width=87)