Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 389b27a

Browse files
authored
Update app.py
1 parent dd9a526 commit 389b27a

File tree

1 file changed

+22
-15
lines changed
  • app.py

1 file changed

+22
-15
lines changed

app.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,28 @@ def chunk_output(scan_output: dict,
227227
def AI(analize: str) -> dict[str, Any]:
228228
# Prompt about what the query is all about
229229
prompt = f"""
230-
Do a vulnerability analysis report on the following JSON data and
231-
follow the following rules:
232-
1) Calculate the criticality score.
233-
2) Return all the open ports within the open_ports list.
234-
3) Return all the closed ports within the closed_ports list.
235-
4) Return all the filtered ports within the filtered_ports list.
236-
5) Analyze the scores based on the CVE score or the ports opened
237-
output format: {{
238-
"open_ports": [],
239-
"closed_ports": [],
240-
"filtered_ports": [],
241-
"criticality_score": ""
242-
}}
243-
244-
data = {analize}
230+
Do a NMAP scan analysis on the provided NMAP scan information
231+
The NMAP output must return in a JSON format accorging to the provided
232+
output format. The data must be accurate in regards towards a pentest report.
233+
The data must follow the following rules:
234+
1) The NMAP scans must be done from a pentester point of view
235+
2) The final output must be minimal according to the format given.
236+
3) The final output must be kept to a minimal.
237+
4) If a value not found in the scan just mention an empty string.
238+
5) Analyze everything even the smallest of data.
239+
6) Completely analyze the data provided and give a confirm answer using the output format.
240+
241+
The output format:
242+
{{
243+
"critical score": [""],
244+
"os information": [""],
245+
"open ports": [""],
246+
"open services": [""],
247+
"vulnerable service": [""],
248+
"found cve": [""]
249+
}}
250+
251+
NMAP Data to be analyzed: {data}
245252
"""
246253
try:
247254
# A structure for the request

0 commit comments

Comments
(0)