Using the Template
Download the Template
In the BrazenCloud portal, navigate to the Actions section using the left navigation bar.
In the Actions list find template:python and click it the download button on the right:

All Actions are packaged as zip file, and the template is no different. Make sure and save the Action.zip file that the portal requests to download. Then go ahead and extract it.
Inside of the Action folder you will see several files as well as folders for both linux and windows. For informiation about all of the components of an action, see the Components page. You can complete this tutorial before doing so.
You can refer to the README.txt for detailed instructions on how the Action is structured and how to modify it.
Modify the Template
With the template in hand, the easiest way to create another Action is to simply update the existing script.
Inside of the linux folder, you'll see a sample script called: netstat.py and another called run.sh.
If you also look inside of the manifest.txt, you'll see the following commands:
COPY . .
RUN_WIN windows\run.bat
RUN_LIN linux/run.shNotice that for Linux, it runs the run.sh file. If we take a look there, we'll see that ultimately it calls the netstat.py script after checking for an installed version of Python.
...
$pythonCMD netstat.py >> ../results/results.jsonSo if you rename the sample script, make sure to also update the run.sh file.
For instance, if you write a Python script and name it: your_script.py, you'll want to do two things:
Copy your script file and paste it into the
linuxfolderChange
run.shto reference your script, as shown below
...
$pythonCMD your_script.py >> ../results/results.jsonNext Steps
Now that you have your Action written, it is time to publish it:
Build and PublishFor a more advanced and in depth take on Actions:
OverviewLast updated