Skip to main content
Glama

Nmap-MCP

by tri2703
nmap_scanner.cpython-312.pyc3.18 kB
� ��h��8�ddlZddlZddlmZmZGd�d�Zy)�N)� TARGET_IP� OUTPUT_DIRc��eZdZd�Zd�Zy)� NmapScannerc�b�tj�|_t|_t |_y)N)�nmap� PortScanner�nmr�targetr� output_dir)�selfs �D:\Nmap-MCP\src\nmap_scanner.py�__init__zNmapScanner.__init__s ���"�"�$����� �$���c �~�td|j�d��|jj|jd��g}|jj �D�]3}d|�d|j|j ��d�}|d|j|j ��d �z }|j|j�D]r}|d |�d �z }|j||j�}t|�D]9}|j|||}|d |�d |d �d|jdd��d �z }�;�td|j|vr4|dz }|j|dD]}|d|d�d|d�d|d�d �z }�|j|���6tj|jd��tjj!|jd�} t#| d�5} | j%d j!|��ddd�td| ���d j!|�S#1swY�(xYw)uLThực hiện quét TCP SYN, phát hiện dịch vụ và hệ điều hànhu Đang quét z...z-sS -sV -O -p 1-1000)� argumentszHost: z (z) zState: � z Protocol: zPort: z State: �statez Service: �name�unknown�osclassz OS Details: zType: �typez | Vendor: �vendorz | OS Family: �osfamilyT)�exist_okzscan_results.txt�wNu+Kết quả quét đã được lưu tại )�printr r �scan� all_hosts�hostnamer� all_protocols�keys�sorted�get�append�os�makedirsr �path�join�open�write) r �result�host� host_info�proto�ports�port� port_infor� output_file�fs r� scan_networkzNmapScanner.scan_network sO�� � �T�[�[�M��-�.� ��� � �T�[�[�,B� �C����G�G�%�%�'� %�D� ���b������)?�)?�)A�(B�#�F�I� �7�4�7�7�4�=�#6�#6�#8�"9��<� <�I������4�4�6� }���z�%���3�3� ����� �e�,�1�1�3��"�5�M�}�D� $���� �e� 4�T� :�I��6�$��y��7�9K�8L�K�Xa�Xe�Xe�fl�nw�Xx�Wy�y{�!|�|�I�}� }��D�G�G�D�M�)��_�,� �#�w�w�t�}�Y�7��G��6�'�&�/�):�+�g�h�FW�EX�Xf�gn�oy�gz�f{�{}�!~�~�I�� �M�M�)� $�! %�& � � �D�O�O�d�3��g�g�l�l�4�?�?�4F�G� � �+�s� #� '�q� �G�G�D�I�I�f�%� &� '� �;�K�=�I�J��y�y�� � �  '� '�s �+!H3�3H<N)�__name__� __module__� __qualname__rr5�rrrrs ��%� !rr)rr&�configrrrr9rr�<module>r;s�� � �(�%!�%!r

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tri2703/MCP-NMAP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server