---
title: Exporting and comparing rules from log and packet decoders
description: Ever wondered if there was an easier method to compare or export all the application, correlation and network rules from your log and packet decoders
---

- [Home](https://mydev.netwitness.com/home)
- Integrations 
    - [Netwitness Platform Integrations](https://mydev.netwitness.com/netwitnessplatformintegrations)
    - [Third Party Integrations](https://mydev.netwitness.com/thirdpartyintegrations)
- [Knowledge Center](https://mydev.netwitness.com/knowledge-base)
- Community 
    - [Blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
    - Discussions
- Customers 
    - [Manage Products and Licenses](https://mydev.netwitness.com/nwportal)
    - Downloads
- Partners 
    - [Partner Program](https://mydev.netwitness.com/partner)
    - [Partner Resources](https://mydev.netwitness.com/partnerresources)
    - [Submit a New Deal Registration](https://mydev.netwitness.com/dealregistration)
    - [Become a Partner](https://mydev.netwitness.com/becomeapartner)
    - [Update Your Partner Locator Profile](https://www.netwitness.com/partner-locator/?utm_source=pardotnewsletter&utm_medium=email&utm_campaign=partner_march)
    - [NetWitness LinkedIn Partner Hub](https://linkedin.com/showcase/netwitnesspartners/)
- Education 
    - [Instructor Led Training Schedule](https://mydev.netwitness.com/instructorledtrainingschedule)
    - [NetWitness Training Catalog](https://mydev.netwitness.com/netwitnesstrainingcatalog)
    - [Security Awareness Training](https://mydev.netwitness.com/securityawarenesstraining)
    - [New Product Readiness](https://mydev.netwitness.com/newproductreadiness)
    - [On-Demand Virtual Labs](https://mydev.netwitness.com/ondemandvirtuallabs)
    - [Additional Training Information](https://mydev.netwitness.com/additionaltraininginformation)
    - [Frequently Asked Questions](https://mydev.netwitness.com/educationfaq)
    - [Contact NetWitness Education Team](https://mydev.netwitness.com/contact-netwitness-education-team)
- Support 
    - [Contact Support](https://mydev.netwitness.com/contact-support)
    - [Create a New Case](https://mydev.netwitness.com/create-support-case)
    - [View My Cases](https://mydev.netwitness.com/viewmycase)
    - [Product Version Life Cycle](https://mydev.netwitness.com/product-version-life-cycle)
    - [Warranty & Replacement Parts](https://mydev.netwitness.com/warranty-and-replacement-parts)
    - [Community Support Forum](https://mydev.netwitness.com/community-support-forum)
    - [Technical Support Guide](https://mydev.netwitness.com/technical-support-guide)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

# Exporting and comparing rules from log and packet decoders

- Home
 */*- [Netwitness blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
*/*- exporting and comparing rules from log and packet decoders

 9 Aug, 2016

**Author:** EricPartington

Ever wondered if there was an easier method to compare or export all the application, correlation and network rules from your log and packet decoders to see if they were all deployed the same or to keep as an archive ?

Using the magical REST interface, that can be achieved with a python script which is included here.  The script takes as input a csv of the devices to read from that include the ip or hostname, the username and password as well as a device type and friendly name to use in the output.  Script is designed to be run from the SA server and will reach out to the decoders and log decoders defined in the csv as long as firewall ports in your environment allow access.

you can pipe the output to a file to capture the results and archive or split into individual csv files for comparison or archival or just use the md5 of each of the outputs to compare and see if they are the same.

I have a number of folders on my SA server for different scripts this one lives in rsa-rule-dump

depending if the python environment variable is set for you

\[UPDATE 2016-08-12\]

Added and moved output around to get the hash, line count and any warnings about rules that are order dependent to each section.

```

```

python rsa-rules-dump.py devices-rsa.csv

```

```

 \[94m################################################################## \[0m  
 \[94m# Checking for 200 http status codes - which are good \[0m  
 \[94m# application rules http status code = 200 \[0m  
 \[94m# network rules http status code = 200 \[0m  
 \[94m# correlation rules http status code = 200 \[0m  
 \[94m################################################################## \[0m  
 \[95m# [http://ldecoder1:50102](http://ldecoder1:50102/) decoder  
 \[0m  
#HASH-RULE-APPLICATION,[http://ldecoder1:50102,3bb54113e830814a2c979b49ffe71f41](https://community.rsa.com/external-link.jspa?url=http%3A%2F%2Fldecoder1%3A50102%2C3bb54113e830814a2c979b49ffe71f41)

#CONTENT-RULE-APPLICATION

name=encryption:success rule="ec.theme='encryption' && ec.outcome='Success'" alert=alert.id order=1 type=application uuid=01d6dcde-c6c1-4e9f-a7e5-009c06f2a19a pushFrom="ldecoder1.cancirc.ca Log Decoder"  
name=nw05415 rule="reference.id='7045' && service.name begins 'wce','psexe','pwdump','cachedump','gsecdump'" alert=alert.id order=2 type=application uuid=5ac784a4-7af4-4f43-afba-bbd46a7de516  
name=nw30060 rule="reference.id='528','540','4624' && logon.type='3' && process='NtLmSsp' && user.dst!='ANONYMOUS LOGON' && NOT(user.dst ends '$')" alert=alert.id order=3 type=application uuid=96dd09e0-3413-4c74-9bda-f4532f1ecf39  
name=threatstream rule=alert\\='threatstream' alert=threat.source order=4 type=application pushFrom="ldecoder1.cancirc.ca Log Decoder"  
name=nw110150 rule="alias.host ends '.box.com', '.boxcloud.com', '.box.net', '.dropbox.com', '.dropboxstatic.c

om', 'github.com', '.icloud.com'" alert=alert.id order=5 type=application uuid=f26f78fc-f172-4352-94ef-37e9995de746 pushFrom="ldecoder1.cancirc.ca Log Decod

```

```

\# HASH-RULE-APPLICATION,[http://pdecoder:50104,cfed6704667382464b1ba6f21cd0579b](https://community.rsa.com/external-link.jspa?url=http%3A%2F%2Fpdecoder%3A50104%2Ccfed6704667382464b1ba6f21cd0579b)  
\# COUNT-RULE-APPLICATION,[http://pdecoder:50104,496](https://community.rsa.com/external-link.jspa?url=http%3A%2F%2Fpdecoder%3A50104%2C496)  
 \[91m# !!WARNING: Check that dependent alerts are above these rules: \['nw110055', 'nw20055'\]  
name=nw110055 rule="alert.id = 'nw12525' && size \> 5242880 && streams =2 && ip.src = 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 && ip.dst != 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" alert=alert.id order=32 type=application  
name=nw20055 rule="alert.id = 'nw02550','nw02520', 'nw02560','nw02555' && filetype begins 'fp\_'" alert=alert.id order=49 type=application uuid=4f98a661-4b7c-4126-8149-acfda64ac677

 Topic:

[0 Comment](https://mydev.netwitness.com/netwitness-security-llc-blog/exportingandcomparingrulesfromlogandpacketdecoders#comments-listing)

###### CATEGORIES

- All
- [Blog](https://mydev.netwitness.com/netwitness-security-llc-blog/tag/blog)

##### RECENT POST

[Netwitness Platform Integration with AWS Application Load Balancer Access logs](https://mydev.netwitness.com/netwitness-security-llc-blog/netwitnessplatformintegrationwithawsapplicationloadbalanceraccesslogs)

 23 Jul, 2024

[The Sky Is Crying: The Wake of the 19 JUL 2024 CrowdStrike Content Update for Microsoft Windows and We Should Take Away From It](https://mydev.netwitness.com/netwitness-security-llc-blog/715124)

 20 Jul, 2024

[DDoS using BotNet Use Case](https://mydev.netwitness.com/netwitness-security-llc-blog/ddosusingbotnetusecase)

 7 May, 2024

[NetWitness Platform](https://www.netwitness.com/)

[Acceptable Use Policy](https://www.netwitness.com/wp-content/uploads/Acceptable-Use-Policy-092022.pdf) [Privacy Statement](https://www.netwitness.com/wp-content/uploads/NetWitness-Privacy-Statement-07292024.pdf)

![NetWitness Logo](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/netwitness-logo-RGB-white%201.png)

[![LinkedIn](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/linkedin.png)](https://www.linkedin.com/company/netwitness-platform/) [![YouTube](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/Youtube.jpg)](https://www.youtube.com/@netwitness)

© 2026 NetWitness LLC. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "EricPartington",
    "url" : "https://mydev.netwitness.com/netwitness-security-llc-blog/author/ericpartington"
  },
  "dateModified" : "2026-03-20T11:01:31.652Z",
  "datePublished" : "2016-08-09T04:00:00.000Z",
  "headline" : "Exporting and comparing rules from log and packet decoders",
  "mainEntityOfPage" : {
    "@id" : "https://mydev.netwitness.com/netwitness-security-llc-blog/exportingandcomparingrulesfromlogandpacketdecoders",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://mydev.netwitness.com/hubfs/netwitness-logo-CMYK.jpg"
    }
  }
}
```