Updated API Documentation (markdown)
parent
e398f33462
commit
7d5cea4f16
|
|
@ -34,10 +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, ::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)
|
||||
* `{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:
|
||||
|
||||
|
|
@ -99,14 +99,14 @@ The `add_manual_command` method is an alias for `add_manual_commands` and works
|
|||
#### execute(cmd, blocking=True, outfile=None, errfile=None)
|
||||
The `execute` method can be used by a ServiceScan 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.
|
||||
* {http_scheme} - A special marker which is either 'https' or 'http' depending on whether the service is secure or not.
|
||||
* {name} - The name of the service (e.g. 'http')
|
||||
* {nmap_extra} - Extra nmap options provided by the user at runtime. Defaults to: -vv --reason -Pn
|
||||
* {port} - The port that the service is running on (e.g. 80)
|
||||
* {protocol} - The protocol that the service is using (e.g. 'tcp')
|
||||
* {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.
|
||||
* `{http_scheme}` - A special marker which is either 'https' or 'http' depending on whether the service is secure or not.
|
||||
* `{name}` - The name of the service (e.g. 'http')
|
||||
* `{nmap_extra}` - Extra nmap options provided by the user at runtime. Defaults to: -vv --reason -Pn
|
||||
* `{port}` - The port that the service is running on (e.g. 80)
|
||||
* `{protocol}` - The protocol that the service is using (e.g. 'tcp')
|
||||
* `{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:
|
||||
|
||||
|
|
@ -122,4 +122,15 @@ This method returns a Process object, a CommandStreamReader object for stdout, a
|
|||
The `full_tag` method returns a string representation of the service protocol, port, name, and whether it is secure, separated by forward slashes (e.g. tcp/80/http/insecure)
|
||||
|
||||
#### tag()
|
||||
The `tag` method returns a string representation of the service protocol, port, and name, separated by forward slashes (e.g. tcp/80/http)
|
||||
The `tag` method returns a string representation of the service protocol, port, and name, separated by forward slashes (e.g. tcp/80/http)
|
||||
|
||||
## CommandStreamReader
|
||||
|
||||
### Methods
|
||||
|
||||
#### readline()
|
||||
The `readline` method returns a single line from the CommandStream, or `None` if the stream has ended. This method will block until it can return something.
|
||||
|
||||
#### readlines()
|
||||
The `readlines` method returns all lines from the CommandStream, or an empty list if the stream has ended. This method will block until it can return something.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue