forked from Velocidex/velociraptor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LastSeenAt in client_create function (Velocidex#3459)
I discovered that the `last_seen_at` parameter of the client_create function doesn't seem to be implemented. This is my attempt to make it work but it's still not working. When I run ```sql SELECT client_create( hostname="windozer", client_id="C.COJPAN59O9KJ1", os="windows", first_seen_at=timestamp(epoch=now() - 3600), last_seen_at=timestamp(epoch=now()), mac_addresses=["b8:ee:65:7c:0d:ff"], labels=["lab","test"]) FROM scope() ``` it does return the client information with the correct `last_seen_at` value (which it didn't do before this change). But when I run ```sql SELECT client_info(client_id="C.COJPAN59O9KJ1") FROM scope() ``` then the `last_seen_at` value is 0. I've tried mirroring the code for `first_seen_at` but I can't see what else needs to change to make this work. ps. I might have messed up the protobuf stuff. I only needed the 1 change to vql.proto but when I ran `./make_proto.sh` it unexpectedly made a lot of changes to all the .pb.go files. --------- Co-authored-by: Mike Cohen <mike@velocidex.com>
- Loading branch information
1 parent
07986f9
commit 8c1fa9e
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters