TRP Code Samples

Tutorial samples

Have you first read the step-by-step tutorial

If you have, then you know

  • how to set up a TRP environment
  • how to securely connect to a Trisul instance
  • exchange a basic message

Samples in Ruby

All these samples are written in Ruby, and use the trisulrp gem. These scripts can be easily adapted to other languages like Python or Java.

We have a new Github repo called trisul-samples containing all our scripts.
Name Description
flows_for_ip Print top 100 flows for an IP or host during the past 6 hours.This script contains detailed line by line comments, so start here
grep_flows Print a maximum of 100 flows which contain a payload matching a specified pattern
pcap_simple Retrieve all SMTP and DNS packets over the last 1 hour. This sample demonstrates the use of a Trisul Filter Format expression
cginfo Print information about all available counter groups
sessions Print top 100 flows by volume seen in an arbitrary time interval
alerts_query Print 100 alerts in last 6 hours of Priority 1, 2, 3