From c7f25596d1826c8719a498216920a91248d931b8 Mon Sep 17 00:00:00 2001 From: The Haag <5632822+MHaggis@users.noreply.github.com> Date: Sun, 4 Aug 2024 19:37:54 -0600 Subject: [PATCH] be dynamic --- bin/streamlit.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/streamlit.py b/bin/streamlit.py index 82c62139..c8bc46c4 100644 --- a/bin/streamlit.py +++ b/bin/streamlit.py @@ -113,9 +113,19 @@ def main(): default=valid_supported_os, key="supported_os") + # Get the capabilities from the template + template_capabilities = template.get('Details', {}).get('Capabilities', []) + + # Create a set of all unique capabilities (from template and some common ones) + all_capabilities = set(template_capabilities + [ + 'File Transfer', 'File System Access', 'Remote Control', + 'GUI Support', 'Command line Support', 'Remote monitoring and management', + 'Remote desktop', 'Remote shell open' + ]) + capabilities = st.multiselect("Capabilities", - options=['File Transfer', 'File System Access', 'Remote Control', 'GUI Support', 'Command line Support'], - default=template.get('Details', {}).get('Capabilities', []), + options=sorted(list(all_capabilities)), + default=template_capabilities, key="capabilities") vulnerabilities = st.text_area("Vulnerabilities (one per line)", value='\n'.join(template.get('Details', {}).get('Vulnerabilities', [])), key="vulnerabilities") @@ -214,4 +224,4 @@ def handle_date(date_value, field_name): return datetime.now().date() if __name__ == "__main__": - main() + main() \ No newline at end of file