Splunk Search

How to convert ASCII characters to their Hex values?

datorres
Explorer

There are plenty of answers to the question of how to convert Hex into ASCII using a combination of rex/replace and urldecode.

However, I am looking to do the opposite. I have binary data in a field and I would like to convert it to hex values.

Sample data:

����$P/�Dl ������E��4K@��v���3>n� �

I do not simply want to strip this data because I actually would like to do something with it once it's been converted.

I also would like to do it preferably using an eval statement so I can create a field calculation based on this.

Any thoughts or ideas?

0 Karma

woodcock
Esteemed Legend

It is too late; it went in wrong. Fix incoming data like this:
https://docs.splunk.com/Documentation/Splunk/latest/Data/Configurecharactersetencoding

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...