MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _parse_options

Method _parse_options

lib/utils/tui.py:59–80  ·  view source on GitHub ↗

Parse command line options into tabs and fields

(self)

Source from the content-addressed store, hash-verified

57 self._parse_options()
58
59 def _parse_options(self):
60 """Parse command line options into tabs and fields"""
61 for group in self.parser.option_groups:
62 tab_data = {
63 'title': group.title,
64 'description': group.get_description() if hasattr(group, 'get_description') and group.get_description() else "",
65 'options': []
66 }
67
68 for option in group.option_list:
69 field_data = {
70 'dest': option.dest,
71 'label': self._format_option_strings(option),
72 'help': option.help if option.help else "",
73 'type': option.type if hasattr(option, 'type') and option.type else 'bool',
74 'value': '',
75 'default': defaults.get(option.dest) if defaults.get(option.dest) else None
76 }
77 tab_data['options'].append(field_data)
78 self.fields[(group.title, option.dest)] = field_data
79
80 self.tabs.append(tab_data)
81
82 def _format_option_strings(self, option):
83 """Format option strings for display"""

Callers 1

__init__Method · 0.95

Calls 3

getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected