Skip to content

Commit

Permalink
be dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
MHaggis committed Aug 5, 2024
1 parent a2a553d commit c7f2559
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions bin/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -214,4 +224,4 @@ def handle_date(date_value, field_name):
return datetime.now().date()

if __name__ == "__main__":
main()
main()

0 comments on commit c7f2559

Please sign in to comment.