# decode

This is example from WPNinja Summit 2022 session "Throwing KQL like a shuriken". Presented by Gianni Castaldi and Alex Verboon&#x20;

####

```
DeviceProcessEvents
| extend EncodedString = extract(@" -[eE][^xXrR]\S* ([a-zA-Z0-9]*={0,2})", 1, ProcessCommandLine)
| where isnotempty(EncodedString)

DeviceProcessEvents
| extend EncodedString = extract(@" -[eE][^xXrR]\S* ([a-zA-Z0-9]*={0,2})", 1, ProcessCommandLine)
| where isnotempty(EncodedString)
| where strlen(EncodedString) >= 4
| extend DecodedString = base64_decode_tostring(EncodedString)
| where isnotempty(DecodedString)
| extend DecodedString = replace_string(DecodedString, "\x00", "")
| project-reorder Timestamp, DecodedString
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sandyzeng.gitbook.io/kql/kql-quick-guide/need-to-learn-later/decode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
