Skip to main content

suricata-prettifier

Python package to format and syntax highlight Suricata rules, or: put lipstick on a pig!

With a command-line tool, take terse, stuffy Suricata rules like this:

alert tcp $HOME_NET any -> 94.242.238.242 6565 (msg:"EmergingThreats:Indicator-2405101"; flow:to_server,established; flags:S; reference:url,doc.emergingthreats.net/bin/view/Main/BotCC; reference:url,www.shadowserver.org; threshold: type limit, track by_src, seconds 360, count 1; classtype:trojan-activity; flowbits:set,ET.Evil; flowbits:set,ET.BotccIP; sid: 533; rev:4991;)

And give them the makeover they deserve

This signature treated herself

alert tcp $HOME_NET any -> 94.242.238.242 6565 ( \
  msg: "EmergingThreats:Indicator-2405101"; \
  flow: to_server,established; \
  flags: S; \
  reference: url,doc.emergingthreats.net/bin/view/Main/BotCC; \
  reference: url,www.shadowserver.org; \
  threshold: type limit, track by_src, seconds 360, count 1; \
  classtype: trojan-activity; \
  flowbits: set,ET.Evil; \
  flowbits: set,ET.BotccIP; \
  sid: 533; \
  rev: 4991; \
)

Note: options with line continuations are tested working with Suricata 4.0.4.

Installation

pip install suricata-prettifier

Usage

Highlight and format right in your console. Wow.

prettify-suricata input.rules

Use it to generate sweet posts for your LiveJournal (Netscape Navigator required to view)

prettify-suricata -f html input.rules input.formatted.html style=vim full=True 

Read from stdin and write to stdou to create your own pipe dream

head -n 50 input.rules | prettify-suricata -f html - - style=vim full=True | tee input.formatted.html

Metadata

Release files for suricata-prettifier 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suricata-prettifier 0.0.2
File Size Uploaded Provenance Actions
suricata-prettifier-0.0.2.tar.gz 4.5 kB Without provenance Details for suricata-prettifier-0.0.2.tar.gz

Release files / suricata-prettifier-0.0.2.tar.gz

Download URL suricata-prettifier-0.0.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f49bb098242b6dbdc1a773e2f35116881e9411259c22c35d1e0059103e52ae1c
BLAKE2b-256 checksum
How to use checksums
8c1e954e95a5208e5b2bb6aecba5b1648c2262b0700c5526c6749941694ef962
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for suricata-prettifier 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page