<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is there any way to decode an encoded html values saved in a log file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399934#M171998</link>
    <description>&lt;P&gt;I want decode all the encoded html values present in an log file while indexing itself.&lt;BR /&gt;
Is there any way to do it ?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2019 09:41:58 GMT</pubDate>
    <dc:creator>Boopalan</dc:creator>
    <dc:date>2019-04-05T09:41:58Z</dc:date>
    <item>
      <title>Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399934#M171998</link>
      <description>&lt;P&gt;I want decode all the encoded html values present in an log file while indexing itself.&lt;BR /&gt;
Is there any way to do it ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 09:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399934#M171998</guid>
      <dc:creator>Boopalan</dc:creator>
      <dc:date>2019-04-05T09:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399935#M171999</link>
      <description>&lt;P&gt;Hey Splunk folks,&lt;BR /&gt;
Is there any possible way/ideas to do that?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 09:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399935#M171999</guid>
      <dc:creator>Boopalan</dc:creator>
      <dc:date>2019-04-08T09:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399936#M172000</link>
      <description>&lt;P&gt;@Boopalan any example from the log where html values are encoded? Which kind of encoding is in place? Also are these specific technology logs or are they custom logs? Please mock/anonymize any sensitive data.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 12:57:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399936#M172000</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-08T12:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399937#M172001</link>
      <description>&lt;P&gt;@niketnilay, PFB sample of encoded html values in the log file. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%[datetime] [Default: 0] [] [INFO ] [*] - &amp;amp;#xa;--  Start of getter Meods&amp;amp;#xa;retiremevice.io.ReturnCd&amp;amp;#x3a; 0&amp;amp;#xa;retiremevice.io.RtSCd&amp;amp;#x3a; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Apr 2019 13:50:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399937#M172001</guid>
      <dc:creator>Boopalan</dc:creator>
      <dc:date>2019-04-08T13:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399938#M172002</link>
      <description>&lt;P&gt;You could try and decode it at search time with the urldecode eval function:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/SearchReference/TextFunctions"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/SearchReference/TextFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 14:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399938#M172002</guid>
      <dc:creator>pkeenan87</dc:creator>
      <dc:date>2019-04-08T14:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399939#M172003</link>
      <description>&lt;P&gt;@pkeenan87, urldecode function is not working as expected. I tried doing that but that is working only for decoding values of url addresses not for an string containing ASCII encoded values in html.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 14:20:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399939#M172003</guid>
      <dc:creator>Boopalan</dc:creator>
      <dc:date>2019-04-08T14:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399940#M172004</link>
      <description>&lt;P&gt;@Boopalan, for the above text what is the expected decoded characters? I am not sure if this looks like either encoding or escaping of special characters. Would need to wait for others to comment. Or more details would help us assist you better!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 14:55:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399940#M172004</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-08T14:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399941#M172005</link>
      <description>&lt;P&gt;Urldecode decodes with the url encoding that starts with a precentage sign.  You can manipulate the data a bit to force it to work.  Using the most recent example by @Boopalan I got it to work, but I had to manually account for the HTML Encoded Line Feed character 
&lt;/P&gt;

&lt;P&gt;Run anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1
| eval data="- &amp;amp;#xa;--  Start of getter Meods&amp;amp;#xa;retiremevice.io.ReturnCd&amp;amp;#x3a; 0&amp;amp;#xa;retiremevice.io.RtSCd&amp;amp;#x3a;"
| eval test=data
| rex mode=sed field=test "s/&amp;amp;#xa;/\n/g"
| rex mode=sed field=test "s/&amp;amp;#x?([^\;]+);/%\1/g"
| eval test2=urldecode(test)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It makes it look like this when it runs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;- 
--  Start of getter Meods
retiremevice.io.ReturnCd: 0
retiremevice.io.RtSCd:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Apr 2019 15:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399941#M172005</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-04-08T15:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to decode an encoded html values saved in a log file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399942#M172006</link>
      <description>&lt;P&gt;urldecode works for decoding the values of URL addresses and strings &lt;BR /&gt;
Try the below examples:&lt;/P&gt;

&lt;P&gt;with url : &lt;BR /&gt;
| makeresults&lt;BR /&gt;&lt;BR /&gt;
| eval field1= "f%23has%2Bofh%20a"&lt;BR /&gt;
| eval field1 = urldecode(field1)&lt;/P&gt;

&lt;P&gt;with string:&lt;BR /&gt;
For example you already have field value then,&lt;BR /&gt;
| rex mode=sed field=field1 "s/ / /g" &lt;BR /&gt;
| eval a=urldecode(field1)&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 09:51:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-to-decode-an-encoded-html-values-saved-in-a-log/m-p/399942#M172006</guid>
      <dc:creator>sampathramtvnr</dc:creator>
      <dc:date>2019-12-17T09:51:05Z</dc:date>
    </item>
  </channel>
</rss>

