Movatterモバイル変換


[0]ホーム

URL:


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

Uses python3.10, Debian, python-Nmap, OpenaAI, and flask framework to create a Nmap API that can do scans with a good speed online and is easy to deploy. This is a implementation for our college PCL project which is still under development and constantly updating.

License

NotificationsYou must be signed in to change notification settings

morpheuslord/Nmap-API

Uses python3.10, Debian, python-Nmap, and flask framework to create an Nmap API that can do scans with a good speed online and is easy to deploy.

This is an implementation for our college PCL project which is still under development and constantly updating.

API Reference

Get all items

  GET /api/p1/{auth_key}/{target}  GET /api/p2/{auth_key}/{target}  GET /api/p3/{auth_key}/{target}  GET /api/p4/{auth_key}/{target}  GET /api/p5/{auth_key}/{target}
ParameterTypeDescription
auth_keystringRequired. The API auth key gebe
targetstringRequired. The target Hostname and IP

Get item

  GET /api/p1/  GET /api/p2/  GET /api/p3/  GET /api/p4/  GET /api/p5/  GET /api/p6/  GET /api/p7/  GET /api/p8/  GET /api/p9/  GET /api/p10/  GET /api/p11/  GET /api/p12/  GET /api/p13/
ParameterReturn dataDescriptionNmap Command
p1jsonEffective Scan-Pn -sV -T4 -O -F
p2jsonSimple Scan-Pn -T4 -A -v
p3jsonLow Power Scan-Pn -sS -sU -T4 -A -v
p4jsonPartial Intense Scan-Pn -p- -T4 -A -v
p5jsonComplete Intense Scan-Pn -sS -sU -T4 -A -PE -PP -PY -g 53 --script=vuln
p6jsonComprehensive Service Version Detection-Pn -sV -p- -A
p7jsonAggressive Scan with OS Detection-Pn -sS -sV -O -T4 -A
p8jsonScript Scan for Common Vulnerabilities-Pn -sC
p9jsonIntense Scan, All TCP Ports-Pn -p 1-65535 -T4 -A -v
p10jsonUDP Scan-Pn -sU -T4
p11jsonService and Version Detection for Top Ports-Pn -sV --top-ports 100
p12jsonAggressive Scan with NSE Scripts for Vulnerabilities-Pn -sS -sV -T4 --script=default,discovery,vuln
p13jsonFast Scan for Common Ports-Pn -F

Auth and User management

  GET /register/<int:user_id>/<string:password>
ParameterTypeDescription
IDIntuser ID
PasswdStringUser Passwd

Improvements

Added GPT functionality with chunking module.The methodology is based on howLangchain GPT embeddings operate. Basically the operation goes like this:

Data -> Chunks_generator ─┐            ┌─> AI_Loop -> Data_Extraction -> Return_Data                          ├─> Chunk1  ─┤                          ├─> Chunk2  ─┤                          ├─> Chunk3  ─┤                          └─> Chunk N ─┘

AI code:

defAI(analize:str)->dict[str,any]:prompt=f"""        Do a NMAP scan analysis on the provided NMAP scan information        The NMAP output must return in a JSON format accorging to the provided        output format. The data must be accurate in regards towards a pentest report.        The data must follow the following rules:        1) The NMAP scans must be done from a pentester point of view        2) The final output must be minimal according to the format given.        3) The final output must be kept to a minimal.        4) If a value not found in the scan just mention an empty string.        5) Analyze everything even the smallest of data.        6) Completely analyze the data provided and give a confirm answer using the output format.        The output format:        {{            "critical score": [""],            "os information": [""],            "open ports": [""],            "open services": [""],            "vulnerable service": [""],            "found cve": [""]        }}        NMAP Data to be analyzed:{analize}    """messages= [{"content":prompt,"role":"assistant"}]response=openai.ChatCompletion.create(model=model_engine,messages=messages,max_tokens=2500,n=1,stop=None,    )response=response['choices'][0]['message']['content']ai_output= {"markdown":response    }returnai_output

Default_Key:e43d4newer updates are still in progress

About

Uses python3.10, Debian, python-Nmap, OpenaAI, and flask framework to create a Nmap API that can do scans with a good speed online and is easy to deploy. This is a implementation for our college PCL project which is still under development and constantly updating.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp