Skip to content

_block:xyz_ and _blocker_ to better manage command queue dependencies #52

@codingo

Description

@codingo

One of the problems with trying to automate a number of tasks is dependancies. The idea I have to work around this is _block:<name> and _blocker_.

This will work in the following manner:

Argument Description
_blocker_ All commands before this must be completed before any other items can be added into the queue
_block:_ All commands in a block are run and queued sequentially

Take the following runfile, as an example:

_block:file-creation_
mkdir _target_
mkdir _target_/output
mkdir _target_/output/scans
_block:file-creation_
_blocker_
nmap _target_ -oN _target_/output/scans/_target_-nmap

In this example, because the items in the _block_ are always loaded sequentially they shouldn't ever run out of order. Additionally, because we have a blocker before nmap, this item won't run until the block is finished.

Alternatively, we could have a command list like the following:

_block:nmap_
mkdir _target_
mkdir _target_/output
mkdir _target_/output/scans
nmap _target_ -oN _target_/output/scans/_target_-nmap
_block:nmap_
nikto --host _target_

In this example, the block would run the same as before, but assuming the thread count is high enough then nikto would begin to run immediately, passing results back to the terminal (whilst nmap and file creation happened in the background).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions