Exemple #1
0
def main():
    while True:
        try:
            generator_append.main()
            prompt = raw_input(config.generator_prompt).strip()
            command = prompt.split(' ', 1)[0].lower()
            if command == 'back':
                print config.inf + 'Returning...'
                return
            elif command == 'clear':
                clear.main()
            elif command == 'generate':
                generate.main()
            elif command in ('?', 'help'):
                help.main('generator', prompt)
            elif command == 'load_com':
                load_com.main(prompt)
            elif command == 'load_enc':
                load_enc.main(prompt)
            elif command in ('!', 'local'):
                local.main(prompt)
            elif command == 'more_com':
                more_com.main(prompt)
            elif command == 'more_enc':
                more_enc.main(prompt)
            elif command == 'python':
                python.main()
            elif command == 'quit':
                quit.main()
            elif command == 'reset':
                reset.main(prompt)
            elif command == 'set':
                set.main(prompt)
            elif command == 'show':
                show.main(prompt)
            elif command == 'unload_com':
                unload_com.main(prompt)
            elif command == 'unload_enc':
                unload_enc.main(prompt)
            elif not command:
                pass
            else:
                print config.neg + 'Invalid command, run "help" for help menu'
        except EOFError:
            try:
                time.sleep(2)
            except KeyboardInterrupt:
                quit.main()
        except KeyboardInterrupt:
            quit.main()
def main():
    while True:
        try:
            generator_append.main()
            prompt = raw_input('PyIris (Generator) > ').strip()
            command = prompt.split(' ', 1)[0]
            if command == 'back':
                print '[*]Returning...'
                return
            elif command == 'clear':
                clear.main()
            elif command == 'generate':
                generate.main()
            elif command in ('?', 'help'):
                help.main('generator', prompt)
            elif command == 'load':
                load.main(prompt)
            elif command in ('!', 'local'):
                local.main(prompt)
            elif command == 'more':
                more.main(prompt)
            elif command == 'python':
                python.main()
            elif command == 'quit':
                quit.main()
            elif command == 'reset':
                reset.main(prompt)
            elif command == 'set':
                set.main(prompt)
            elif command == 'show':
                show.main(prompt)
            elif command == 'unload':
                unload.main(prompt)
            elif not command:
                pass
            else:
                print '[-]Invalid command, run "help" for help menu'
        except EOFError:
            try:
                time.sleep(2)
            except KeyboardInterrupt:
                quit.main()
        except KeyboardInterrupt:
            quit.main()