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
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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