Module p4lantir.widgets.app_ui
Module content
- class p4lantir.widgets.app_ui.PacketScreen(data: bytes)[source]
Bases:
ModalScreenShowed modal to display the hexdump of a data
- BINDINGS: ClassVar[list[BindingType]] = [('escape', 'app.pop_screen', 'Exit')]
A list of key bindings.
- compose() Iterable[Widget][source]
Called by Textual to create child widgets.
This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].
Note that you don’t typically need to explicitly call this method.
- can_focus: bool = False
Widget may receive focus.
- can_focus_children: bool = True
Widget’s children may receive focus.
- class p4lantir.widgets.app_ui.MitmApp(driver_class: Type[Driver] | None = None, css_path: str | PurePath | List[str | PurePath] | None = None, watch_css: bool = False, ansi_color: bool = False)[source]
Bases:
AppMain UI of the app
- BINDINGS: ClassVar[list[BindingType]] = [('ctrl+e', 'clear_action', 'Clear Screen'), ('b', 'block_mode', 'Block packets'), ('d', 'drop_mode', 'Drop packet'), ('s', 'see_mode', 'See packet'), ('f', 'forward_mode', 'Forward packet'), ('c', 'close_mode', 'Close connections'), ('b', 'unblock_mode', 'Unblock packets')]
The default key bindings.
- logger = None
- rich_log_handler = None
- block_event = None
- drop_event = None
- forward_event = None
- close_event = None
- message_queue
Create a reactive attribute.
- Args:
default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. recompose: Compose the widget again when the attribute changes. bindings: Refresh bindings when the reactive changes. toggle_class: An optional TCSS classname(s) to toggle based on the truthiness of the value.
- block_mode = False
- compose() Iterable[Widget][source]
Yield child widgets for a container.
This method should be implemented in a subclass.