Sign Up

Using Scripts

Trickest scripts represent the implementation of custom commands, allowing users to create scripts to automate any sort of task and bring the whole workflow together.

Scripts templates

All scripts in the scripts library available in both Trickest Library page and Workflow Builder page (Left Sidebar) were created pragmatically - what we saw as the most common use cases. Every script is fully customizable - users can delete commands entirely and write anything.

The inside structure of the script node is shown below. While writing commands, these paths must be respected to successfully fit the script node in the workflow.

📦 node // any script node
 ┣ 📂 in/ // contains all input files and/or folders
 ┗ 📂 out/ // contains all output files and/or folders 

Modifying script

In the example below, we have a use-case of tools gathering subdomains for a given domain. We want to merge all results, get unique ones, and output them in a single file. To do that, we drag recursively-cat-all script, add uniq in the command, and voila, we have all results in one place. With script node output, the workflow can be developed further.

GIF of adding recursively-cat-all node from the library and connecting it with amass and subfinder nodes in the workflow editor, and adding that script in the terminal of Trickest

Filtering the results in more detail

If you want subdomains containing e.g. _admin,_ simply add new `| grep 'admin'` before `| tee out/output.txt .`

Writing script from scratch

The example below is the showcase of composing random commands and writing to out/output.txt. Although we can use any script for this (because the command is entirely replaceable), we'll find a custom-script (completely empty). The output of this node can be forwarded further in the workflow simply by connecting its file output to the next node input.

GIF of adding the custom-script node in the workflow editor and editing the script in the Trickest terminal in the bottom bar

Unlimited possibilities

The example above is trivial, and it's only proof of flexibility - with well-crafted Bash command, anything can be achieved, including various dana generation, cleaning, filtering or manipulation, integration or communication with external services etc.

Python Scripts

Most script templates are written as shell scripts, but you can also use Python3 through the python-script script node.

Screenshot of python-script node in the workflow editor with opened terminal in Trickest available for editing the script

Python Script

Pre-installed Libraries

  • requests
  • bs4
  • pandas
  • oyaml
  • scapy

How to install libraries?

You can use the pip.main() function to manage the installed libraries.

import pip
pip.main(['install', 'package-name'])
# or just os.system('pip install package-name')