Updated API Documentation (markdown)

Tib3rius 2022-05-08 00:38:42 -04:00
parent 587605e6bc
commit f8fb812d0a
1 changed files with 12 additions and 4 deletions

@ -9,11 +9,17 @@ Target objects are created by AutoRecon from the list of targets given by the us
### Attributes
#### address
The `address` attribute returns a string representation of the target address (e.g. "127.0.0.1").
The `address` attribute returns a string representation of the target address in the form provided by the user (e.g. "127.0.0.1", "example.com"). Note that despite the name, this may not necessarily be an IP address.
#### basedir
The `basedir` attribute returns a string representation of the full (absolute) path to the target's results directory (e.g. /home/kali/results/127.0.0.1). No trailing slash is used.
#### ip
The `ip` attribute returns a string representation of the target IP address (e.g. "127.0.0.1"). If a hostname was provided, AutoRecon will resolve the hostname to an IP address (first trying IPv4, then IPv6).
#### ipversion
The `ipversion` attribute returns either "IPv4" or "IPv6", depending on the version of the target's IP address.
#### ports
The `ports` attribute returns a dictionary containing two keys: 'tcp' and 'udp'. These point to a string representation of a port list that is compatible with the -p argument in Nmap.
@ -24,7 +30,7 @@ The `reportdir` attribute returns a string representation of the full (absolute)
The `scandir` attribute returns a string representation of the full (absolute) path to the target's scans directory (e.g. /home/kali/results/127.0.0.1/scans). No trailing slash is used.
#### type
The `type` attribute returns either 'IPv4' or 'IPv6' depending on whether the target should be treated as an IPv4 or IPv6 address.
The `type` attribute returns either "ip" or "hostname", depending on whether the target address is an IP (either IPv4 or IPv6) or a hostname.
### Methods
@ -34,8 +40,10 @@ The `add_service` method can be used by a PortScan plugin to report a new servic
#### execute(cmd, blocking=True, outfile=None, errfile=None)
The `execute` method can be used by a PortScan plugin to execute a command in a /bin/bash shell. The `cmd` argument should be a string representation of the command you wish to execute. The following markers can be used within the string, and will get automatically converted to their correct values by AutoRecon:
* `{address}` - The address of the target (e.g. 127.0.0.1, ::1)
* `{addressv6}` - Despite its name, this still represents the address of the target if it is IPv4. The difference is the IPv6 address will be represented as [::1] which is a common format for several tools.
* `{address}` - The address of the target (e.g. 127.0.0.1, ::1, example.com).
* `{addressv6}` - Despite its name, this still represents the address of the target if it is IPv4 or a hostname. The difference is the IPv6 address will be represented as [::1] which is a common format for several tools.
* `{ipaddress}` - The IP address of the target (e.g. 127.0.0.1, ::1). If the target is a hostname, the resolved IP will be used.
* `{ipaddressv6}` - Despite its name, this still represents the IP address of the target if it is IPv4. The difference is the IPv6 address will be represented as [::1] which is a common format for several tools.
* `{nmap_extra}` - Extra nmap options provided by the user at runtime. Defaults to: -vv --reason -Pn
* `{scandir}` - The full path to the target's scans directory (e.g. /home/kali/results/127.0.0.1/scans)