Query Commands
Everything the screens do can also be done from a query. A query is handier when you pull a list of web servers out of other data and register them in one go, or aggregate the result history into a report. The full options and output fields of each command are under Extension Commands.
| Command | Purpose | Permission |
|---|---|---|
php2shell-targets | List registered targets | Logged-in user |
php2shell-results | List the scan result history | Logged-in user |
php2shell-add-target-batch | Register the URL in each input row as a target | Administrator |
php2shell-delete-target-batch | Delete the target matching the URL in each input row | Administrator |
php2shell-scan | Scan one URL on the spot | Logged-in user |
php2shell-scan-batch | Scan the URL in each input row on the spot | Logged-in user |
Listing targets - php2shell-targets
Show only the targets whose latest verdict is vulnerable.
Filter with status, verdict and keyword; the rows carry the same information as the screen list.
Aggregating the result history - php2shell-results
Count the vulnerable results of the last 7 days per PHP version.
Set the period with duration (e.g. 7d, 12h) or with from and to (yyyyMMddHHmmss). To see the
results of a single scan, pass its scan GUID in scan.
Registering targets in bulk - php2shell-add-target-batch
Register the url field of each input row as a target. probe=t also probes each new target as it is
added.
If the URL is in another field, name it with field. The add_result field tells a new registration
(added) from a duplicate (skipped) or a malformed URL (invalid).
Deleting targets in bulk - php2shell-delete-target-batch
Clean up unreachable targets. Their result history is deleted along with them.
Scanning on the spot - php2shell-scan, php2shell-scan-batch
Scan without registering a target. The result is not stored; it comes back only as query output.
insecure=t skips TLS verification for internal assets with self-signed certificates. Cancelling the
query cuts the request in flight and stops at once.
authorized to test.