From d0e92f148787bbf0214099a38ddff2ccda03292a Mon Sep 17 00:00:00 2001 From: "Corian (Cory) Kennedy" Date: Mon, 8 May 2023 09:57:23 -0500 Subject: [PATCH] Update sscGPT.py --- tools/sscGPT/sscGPT.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/sscGPT/sscGPT.py b/tools/sscGPT/sscGPT.py index 0d7cf10..8a235b9 100644 --- a/tools/sscGPT/sscGPT.py +++ b/tools/sscGPT/sscGPT.py @@ -53,7 +53,15 @@ "Authorization": "Token " + str(api_key), } +def file_browser(): + file = st.sidebar.file_uploader("Choose a file") + if file is not None: + content = file.read().decode("utf-8") + st.write(content) +if __name__ == "__main__": + + file_browser() def search_assets(query): data = {"query": query, "cursor": "initial", "size": 1000} response = requests.post(search_url, json=data, headers=headers).json() @@ -115,7 +123,7 @@ def parse_html_to_text(html_content): with logo_col: - asi_enpoints = ["All Assets", "LeakedCreds", "Prebuilt", "ASI Query from URL"] + asi_enpoints = ["All Assets", "LeakedCreds", "Prebuilt", "File Upload","ASI Query from URL"] search_type = st.selectbox("", asi_enpoints) @@ -300,6 +308,15 @@ def parse_html_to_text(html_content): with sscassetquery_col: st.warning("Search ASI for LeakedCreds") +elif search_type == "File Upload": + + sscassetlogo_col, sscassetquery_col = st.sidebar.columns([1, 10]) + + with sscassetlogo_col: + st.image("https://simpleicons.org/icons/securityscorecard.svg", width=50) + + with sscassetquery_col: + st.warning("Read File contents and search ASI for each line") with button_col: st.write("") st.write("")