talus.cmds package¶
Submodules¶
talus.cmds.code module¶
-
class
talus.cmds.code.
CodeCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The Talus code command processor
-
command_name
= 'code'¶
-
do_create
(args)[source]¶ Create new code in the repository. This will create the code in the talus repository, as well as in the database.
code create NAME -t or -c
-t,–tool Create a tool-c,–component Create a component
-
do_list
(args)[source]¶ List existing code in Talus. By default it will list both components and tools. Note that -t and -c are mutually exclusive
code list [-t or -c]
-t,–tools List tools (default=False)-c,–components List components (default=False)
Examples:
List all components defined in Talus
code list -t component
-
talus.cmds.images module¶
-
class
talus.cmds.images.
ImageCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The Talus images command processor
-
command_name
= 'image'¶
-
do_configure
(args)[source]¶ Configure an existing image in talus
configure ID_OR_NAME [-v PATH_TO_VAGRANTFILE] [-i]
id_or_name The ID or name of the image that is to be configured (required)-i,–interactive To interact with the imported image for setup (default: False) -v,–vagrantfile The path to the vagrantfile that should be used to configure the image (default=None)
Examples:
To configure an image named “Windows 7 x64 Test”, using a vagrantfile found at ~/vagrantfiles/UpdateIE with no interaction:
configure “Windows 7 x64 Test” –vagrantfile ~/vagrantfiles/UpdateIE
-
do_create
(args)[source]¶ Create a new image in talus using an existing base image. Anything not explicitly specified will be inherited from the base image, except for the name, which is required.
create -n NAME -b BASEID_NAME [-d DESC] [-t TAG1,TAG2,..] [-u USER] [-p PASS] [-o OSID] [-i]
-o,–os ID or name of the operating system model-b,–base ID or name of the base image -n,–name The name of the resulting image (default: basename(FILE))
-d,–desc A description of the image (default: “”) -t,–tags Tags associated with the image (default: [])-v,–vagrantfile A vagrant file that will be used to congfigure the image -i,–interactive To interact with the imported image for setup (default: False)
Examples:
To create a new image based on the image with id 222222222222222222222222 and adding a new description and allowing for manual user setup:
image create -b 222222222222222222222222 -d “some new description” -i
-
do_delete
(args)[source]¶ Attempt to delete the specified image. This may fail if the image is the base image for another image.
delete id_or_name
id_or_name The ID or name of the image that is to be deleted
-
do_import
(args)[source]¶ Import an image into Talus
import FILE -n NAME -o OSID [-d DESC] [-t TAG1,TAG2,..] [-u USER] [-p PASS] [-i]
- FILE The file to import
- -o,–os ID or name of the operating system model
- -n,–name The name of the resulting image (default: basename(FILE))
- -d,–desc A description of the image (default: “”) -t,–tags Tags associated with the image (default: [])
-f,–file-id The id of an already-uploaded file (NOT A NORMAL USE CASE)
-u,–username The username to be used in the image (default: user) -p,–password The password to be used in the image (default: password)
-i,–interactive To interact with the imported image for setup (default: False)
Examples:
To import an image from VMWare at
~/images/win7pro.vmdk
named “win 7 pro test” and to be given a chance to perform some manual setup/checks:image import ~/images/win7pro.vmdk -n “win 7 pro test” -i -o “win7pro” -t windows7,x64,IE8
-
talus.cmds.jobs module¶
-
class
talus.cmds.jobs.
JobCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The Talus job command processor
-
command_name
= 'job'¶
-
do_create
(args)[source]¶ Create a new job in Talus
job create TASK_NAME_OR_ID -i IMAGE [-n NAME] [-p PARAMS] [-q QUEUE] [–priority (0-100)] [–network]
-n,–name The name of the job (defaults to name of the task + timestamp)--priority - The priority for the job (0-100, defaults to 50)
--network The network for the image (‘all’ or ‘whitelist’). Whitelist values may also be a ‘whitelist:<domain_or_ip>,<domain_or_ip>’ to add domains
to the whitelist. Not specifying additional whitelist hosts results in a host-only network filter, plus talus-essential hosts.
-q,–queue The queue the job should be inserted into (default: jobs) -i,–image The image the job should run in (name or id)
- -l,–limit The limit for the task. What the limit means is defined by how the tool
- reports progress. If the tool does not report progress, then the limit means the number of total VMs to run.
-p,–params Params for the task (defaults to the default params of the task)
-f,–params-file The file that contains the params of the job
Examples:
To run the task “CalcFuzzer” while only updating the
chars
parameter:job create “CalcFuzzer” -p ‘{“chars”: “013579+-()/*“}’
-
talus.cmds.oses module¶
-
class
talus.cmds.oses.
OsCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The Talus code command processor
-
command_name
= 'os'¶
-
do_create
(args)[source]¶ Create a new operating system model in Talus
create -n NAME [–type TYPE] [-t TAG1,TAG2,..] [-v VERSION]
-n,–name The name of the new OS model (required, no default) -t,–type The type of the OS mdoel (default: “windows”) -a,–arch The architecture of the OS (default: “x64”)-v,–version The version of the new OS model (default: “”)
Examples:
To create a new operating system model for an x64 Windows 7 OS:
os create -n “Windows 7 x64” -t windows -v 7 -a x64
-
talus.cmds.results module¶
-
class
talus.cmds.results.
ResultCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The talus result command processor
-
command_name
= 'result'¶
-
do_list
(args)[source]¶ List results in talus for a specific job. Fields to be searched for must be turned into parameter format (E.g.
--search-item "some value"
format would search for a result with the fieldsearch_item
equalingsome value
).result list –search-item “search value” [–search-item2 “search value2” ...]
-
talus.cmds.slaves module¶
-
class
talus.cmds.slaves.
SlaveCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The Talus slave command processor
-
command_name
= 'slave'¶
-
talus.cmds.tasks module¶
-
class
talus.cmds.tasks.
TaskCmd
(talus_host=None, talus_client=None)[source]¶ Bases:
talus.cmds.TalusCmdBase
The Talus task command processor
-
command_name
= 'task'¶
-
do_create
(args)[source]¶ Create a new task in Talus
create -n NAME -t TOOL_ID_OR_NAME -p PARAMS -l LIMIT
-n,–name The name of the new task (required, no default) -t,–tool The name or id of the tool to be run by the task (required, no default)- -l,–limit The limit for the task. What the limit means is defined by how the tool
- reports progress. If the tool does not report progress, then the limit
- means the number of total VMs to run.
-p,–params The params of the task
-v,–version The version the task should be pinned at, else the current HEAD (default=None)
-f,–params-file The file that contains the params of the task
To create a new task that uses the tool “BrowserFuzzer”:
task create -n “IE Fuzzer” -t “BrowserFuzzer” -p “{...json params...}”To create a new task that also uses the “BrowserFuzzer” tool but reads in the params from a file:
task create -n “IE Fuzzer” -t “BrowserFuzzer” -f ie_fuzz_params.json
-
Module contents¶
-
class
talus.cmds.
TalusCmd
(talus_host=None, talus_client=None, one_shot=False)[source]¶ Bases:
talus.cmds.TalusCmdBase
The main talus command. This is what is invoked when dropping into a shell or when run from the command line
-
command_name
= '<ROOT>'¶
-
do_code
(args)¶ The Talus code command processor
-
do_image
(args)¶ The Talus images command processor
-
do_job
(args)¶ The Talus job command processor
-
do_os
(args)¶ The Talus code command processor
-
do_result
(args)¶ The talus result command processor
-
do_slave
(args)¶ The Talus slave command processor
-
do_task
(args)¶ The Talus task command processor
-