Splunk SOAR (f.k.a. Phantom)

How can I update function in Phantom to handle potential phish email message (getting body parsing error)?

brandylee1993
Explorer

When parsing the email message body for inclusion in the ticket in Jira, parsing fails on special characters or non-ASCII text. How can I update function in Phantom to properly handle the message body in cases where the error is being thrown. 

<error in expanding custom_function_1:custom_function:C1_email>

 

Labels (1)
0 Karma
1 Solution

phanTom
SplunkTrust
SplunkTrust

@brandylee1993 I hope you found your answer,  but just in-case and for any others viewing this question, the handling of non-ascii needs to be handled with python `.decode()`:

<value>.decode("UTF-8")

The variable will be the field/data that likely contains the non-ascii text. I have seen this a lot with Phishing use cases and have had to use the .decode() a few times to get around it. 

If this helped, please pop a like below.

View solution in original post

phanTom
SplunkTrust
SplunkTrust

@brandylee1993 I hope you found your answer,  but just in-case and for any others viewing this question, the handling of non-ascii needs to be handled with python `.decode()`:

<value>.decode("UTF-8")

The variable will be the field/data that likely contains the non-ascii text. I have seen this a lot with Phishing use cases and have had to use the .decode() a few times to get around it. 

If this helped, please pop a like below.

Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...