Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base64 functions missing #4563

Closed
zwass opened this issue Jun 14, 2018 · 2 comments
Closed

Base64 functions missing #4563

zwass opened this issue Jun 14, 2018 · 2 comments

Comments

@zwass
Copy link
Member

zwass commented Jun 14, 2018

What version of osquery are you using? What operating system. Be specific.

You can run this query to get the necessary details:

osqueryd -S --line 'SELECT oi.version as osquery_version, os.version AS os_version, os.build AS os_build, os.platform AS os_platform FROM os_version AS os JOIN osquery_info as oi;'
osquery_version = 3.2.6
     os_version = 10.13.5
       os_build = 17F77
    os_platform = darwin

What have you already tried?

$ osqueryd -S 'SELECT base64("foo")'
Error: no such function: base64
$ osqueryd -S 'SELECT unbase64("Zm9v")'
Error: no such function: unbase64

What did you expect to see?

Working base64 functions (as noted in https://osquery.readthedocs.io/en/stable/introduction/sql/#sql-additions).

What did you see instead?

Errors that the functions are not defined.

@akindyakov
Copy link
Contributor

Thank you @zwass for the question!

There is a mistake in documentation I think. You can find this functions under slightly different names:

osquery> select to_base64("long phrase");
+--------------------------+
| to_base64("long phrase") |
+--------------------------+
| bG9uZyBwaHJhc2U=         |
+--------------------------+
osquery> select from_base64(to_base64("long phrase"));
+---------------------------------------+
| from_base64(to_base64("long phrase")) |
+---------------------------------------+
| long phrase                           |
+---------------------------------------+

@zwass
Copy link
Member Author

zwass commented Jun 15, 2018

Awesome, thanks for fixing that.

@zwass zwass closed this as completed Jun 15, 2018
trizt pushed a commit to trizt/osquery that referenced this issue May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants