enotkrutoy's picture
Update app.py
d2944a1 verified
import sys
import os
# Добавляем папку GVA в путь поиска модулей
sys.path.append(os.path.join(os.path.dirname(__file__), 'GVA'))
import streamlit as st
from GVA.scanner import NetworkScanner
from GVA.dns_recon import DNSRecon
from GVA.geo import geo_ip_recon
from GVA.jwt import JWTAnalyzer
from GVA.menus import Menus
from GVA.packet_analysis import PacketAnalysis
from GVA.ai_models import NMAP_AI_MODEL, DNS_AI_MODEL, JWT_AI_MODEL
from GVA.assets import Assets
from GVA.subdomain import sub_enum
from GVA import gui
# Заголовок приложения
st.title("GPT Vulnerability Analyzer")
st.write("This application demonstrates how AI can be used for vulnerability analysis.")
# Форма для ввода параметров
st.sidebar.header("Settings")
api_key = st.sidebar.text_input("OpenAI API Key", type="password")
bard_key = st.sidebar.text_input("Bard API Key", type="password")
target = st.sidebar.text_input("Target IP/Hostname/Token")
output_loc = st.sidebar.text_input("Output Location for PCAP")
threads = st.sidebar.number_input("Number of Threads", min_value=1, max_value=1000, value=200)
profile_num = st.sidebar.text_input("Profile for NMAP Scan")
ai_set = st.sidebar.selectbox("AI of Choice", ["OpenAI", "Bard", "LLAMA"])
ai_set_args = st.sidebar.text_input("AI Set Arguments", value="")
llama_key = st.sidebar.text_input("LLAMA RunPod API Key", type="password")
llama_endpoint = st.sidebar.text_input("LLAMA RunPod Endpoint")
# Запуск анализа
if st.sidebar.button("Analyze"):
st.write("Starting analysis with the following parameters:")
st.write(f"API Key: {api_key}")
st.write(f"Bard Key: {bard_key}")
st.write(f"Target: {target}")
st.write(f"Output Location: {output_loc}")
st.write(f"Threads: {threads}")
st.write(f"Profile Number: {profile_num}")
st.write(f"AI Set: {ai_set}")
st.write(f"AI Set Arguments: {ai_set_args}")
st.write(f"LLAMA Key: {llama_key}")
st.write(f"LLAMA Endpoint: {llama_endpoint}")
# Здесь должен быть вызов вашей функции анализа
# results = run_analysis(api_key, bard_key, target, output_loc, threads, profile_num, ai_set, ai_set_args, llama_key, llama_endpoint)
# st.write(results)
st.success("Analysis complete!")
# Графический интерфейс (если нужно)
st.write("Launching GUI...")
gui.application()