??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
àUdac @` sÞ d d l m Z m Z m Z e Z d Z d Z d d l Z d d l Z d d l
m Z m Z d d l
m Z d d l m Z d d l m Z m Z d d l m Z m Z m Z d d
l m Z d e e e f d „ ƒ YZ d S(
i ( t absolute_importt divisiont print_functions
name: nmap
plugin_type: inventory
version_added: "2.6"
short_description: Uses nmap to find hosts to target
description:
- Uses a YAML configuration file with a valid YAML extension.
extends_documentation_fragment:
- constructed
- inventory_cache
requirements:
- nmap CLI installed
options:
plugin:
description: token that ensures this is a source file for the 'nmap' plugin.
required: True
choices: ['nmap']
address:
description: Network IP or range of IPs to scan, you can use a simple range (10.2.2.15-25) or CIDR notation.
required: True
exclude:
description: list of addresses to exclude
type: list
ports:
description: Enable/disable scanning for open ports
type: boolean
default: True
ipv4:
description: use IPv4 type addresses
type: boolean
default: True
ipv6:
description: use IPv6 type addresses
type: boolean
default: True
notes:
- At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False.
- 'TODO: add OS fingerprinting'
sk
# inventory.config file in YAML format
plugin: nmap
strict: False
address: 192.168.0.0/24
N( t Popent PIPE( t constants( t AnsibleParserError( t to_nativet to_text( t BaseInventoryPlugint
Constructablet Cacheable( t get_bin_patht InventoryModulec B` sJ e Z d Z e j d ƒ Z e j d ƒ Z d „ Z d „ Z e d „ Z
RS( t nmaps7 ^Nmap scan report for ([\w,.,-]+) \(([\w,.,:,\[,\]]+)\)s ^(\d+)/(\w+)\s+(\w+)\s+(\w+)c C` s d | _ t t | ƒ j ƒ d S( N( t Nonet _nmapt superR
t __init__( t self( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/inventory/nmap.pyR G s c C` s\ t } t t | ƒ j | ƒ rX t j j | ƒ \ } } | sL | t j k rX t } qX n | S( N(
t FalseR R
t verify_filet ost patht splitextt Ct YAML_FILENAME_EXTENSIONSt True( R R t validt file_namet ext( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/inventory/nmap.pyR K s c C` så y t d t ƒ | _ Wn t k
r7 } t | ƒ ‚ n X| j d k rV t d ƒ ‚ n t t | ƒ j | | | d | ƒ| j | ƒ | j g } | j
d s® | j d ƒ n | j
d rÙ | j
d rÙ | j d ƒ nV | j
d r| j
d r| j d ƒ n+ | j
d r/| j
d r/t d
ƒ ‚ n | j
d ri| j d ƒ | j d
j | j
d ƒ ƒ n | j | j
d ƒ y,t
| d t d t ƒ} | j ƒ \ } } | j d k rÛt d | j t | ƒ f ƒ ‚ n d }
d } g } y t | d d ƒ}
Wn) t k
r.} t d t | ƒ ƒ ‚ n XxQ|
j ƒ D]C} | j j | ƒ } | r|
d k r| j j |
d | ƒ n | j d ƒ j d ƒ r©| j d ƒ }
n | j d ƒ }
| j d ƒ } |
d k r<| j j |
ƒ | j j |
d | ƒ g } q<q<n | j j | ƒ } |
d k r<| r<| j i | j d ƒ d 6| j d ƒ d 6| j d ƒ d 6| j d ƒ d 6ƒ q<q<q<W|
r¨| r¨| j j |
d | ƒ n Wn5 t k
rà} t d t | ƒ t | ƒ f ƒ ‚ n Xd S(! NR s8 nmap inventory plugin requires the nmap cli tool to workt cachet portss -sPt ipv4t ipv6s -4s -6s3 One of ipv4 or ipv6 must be enabled for this plugint excludes --excludet ,t addresst stdoutt stderri s Failed to run nmap, rc=%s: %st errorst surrogate_or_stricts( Invalid (non unicode) input returned: %si s
.in-addr.arpai t ipt portt protocoli t statei t services failed to parse %s: %s ( R R R t
ValueErrorR R R R
t parset _read_config_datat _optionst appendt joinR R t communicatet
returncodeR R t UnicodeErrort
splitlinest find_hostt matcht inventoryt set_variablet groupt endswitht add_hostt find_portt Exception( R R; t loaderR R t et cmdt pR&