def main(): """ Main function """ try: filename = sys.argv[1] except: filename = easygui.fileopenbox() try: ole = olefile.OleFileIO(filename) listdir = ole.listdir() streams = [] for direntry in listdir: #print direntry streams.append('/'.join(direntry)) streams.append(ABOUT) streams.append(QUIT) stream = True while stream is not None: msg = "Select a stream, or press Esc to exit" title = "olebrowse" stream = easygui.choicebox(msg, title, streams) if stream is None or stream == QUIT: break if stream == ABOUT: about() else: browse_stream(ole, stream) except: easygui.exceptionbox()
def main(): """ Main function """ try: filename = sys.argv[1] except: filename = easygui.fileopenbox() try: ole = olefile.OleFileIO(filename) listdir = ole.listdir() streams = [] for direntry in listdir: #print direntry streams.append('/'.join(direntry)) streams.append(ABOUT) streams.append(QUIT) stream = True while stream is not None: msg ="Select a stream, or press Esc to exit" title = "olebrowse" stream = easygui.choicebox(msg, title, streams) if stream is None or stream == QUIT: break if stream == ABOUT: about() else: browse_stream(ole, stream) except: easygui.exceptionbox()
def main(): try: filename = sys.argv[1] except: filename = easygui.fileopenbox() if filename: try: hexview_file(filename, msg='File: %s' % filename) except: easygui.exceptionbox(msg='Error:', title='ezhexviewer')