Skip to content

use go to executive osqueryi to get the data, the default osqueryd with port is not that easy to use

License

Notifications You must be signed in to change notification settings

leitu/go-osquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goquery

use go to executive osqueryi to get the data

##Requirement

###Run

go run main.go
go install
goquery

###Page

http://localhost:8080/tables

###Curl

curl -i -H "Content-Type: application/json" -X POST \
      -d '{ "user":"leitu", "sql": "SELECT version  FROM kernel_info"}'\
      http://localhost:8080/query

###Results

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Date: Tue, 01 Mar 2016 08:12:31 GMT
Content-Length: 27

[
  {"version":"15.3.0"}
]

You also can use command way to get the data directly

 go run query-kernel.go
{"version":"15.3.0"}

##ToDo

  • SQL section to default value.
  • move query-kernel.go to cli way

About

use go to executive osqueryi to get the data, the default osqueryd with port is not that easy to use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages