def complete_filtercmd(text, line, begidx, endidx): strs = [ k for k, v in pappyproxy.context.Filter._filter_functions.iteritems() ] strs += [ k for k, v in pappyproxy.context.Filter._async_filter_functions.iteritems() ] return autocomplete_startswith(text, strs)
def complete_stop_int_macro(text, line, begidx, endidx): global int_macro_dict global loaded_int_macros running = [] not_running = [] for macro in loaded_int_macros: if macro.name in [m.name for m in active_intercepting_macros()]: running.append(macro) else: not_running.append(macro) strs = [] for m in running: strs.append(macro.name) strs.append(macro.file_name) if macro.short_name: strs.append(macro.short_name) return autocomplete_startswith(text, strs)
def complete_run_int_macro(text, line, begidx, endidx): global int_macro_dict global loaded_int_macros running = [] not_running = [] for macro in loaded_int_macros: if macro.name in [m.name for k, m in active_intercepting_macros().iteritems()]: running.append(macro) else: not_running.append(macro) strs = [] for m in not_running: strs.append(macro.name) strs.append(macro.file_name) if macro.short_name: strs.append(macro.short_name) return autocomplete_startswith(text, strs)
def complete_filtercmd(text, line, begidx, endidx): strs = [k for k, v in pappyproxy.context.Filter._filter_functions.iteritems()] strs += [k for k, v in pappyproxy.context.Filter._async_filter_functions.iteritems()] return autocomplete_startswith(text, strs)
def complete_run_macro(text, line, begidx, endidx): global macro_dict strs = [k for k, v in macro_dict.iteritems()] return autocomplete_startswith(text, strs)