From 79a25c0d4515179e5cabe7f7b52779fad7aaa192 Mon Sep 17 00:00:00 2001 From: Tib3rius <48113936+Tib3rius@users.noreply.github.com> Date: Sun, 29 Aug 2021 23:46:58 -0400 Subject: [PATCH] Updated API Documentation (markdown) --- API-Documentation.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/API-Documentation.md b/API-Documentation.md index c6471f9..4dcea27 100644 --- a/API-Documentation.md +++ b/API-Documentation.md @@ -14,12 +14,18 @@ The `address` attribute returns a string representation of the target address (e #### 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. +#### 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. + #### reportdir The `reportdir` attribute returns a string representation of the full (absolute) path to the target's report directory (e.g. /home/kali/results/127.0.0.1/report). No trailing slash is used. #### scandir 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. + ### Methods #### add_service(service) @@ -28,9 +34,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) -* {scandir} - The full path to the target's scans directory (e.g. /home/kali/results/127.0.0.1/scans) +* {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. * {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) The optional `blocking` argument can be used to make the `execute` method return immediately, rather than waiting until the command has finished. This is useful if you want to process lines of output live. However, if you do this, you should always run the following command on the process object before returning: