iankronquist / beeswax

A Next Generation Honeypot for a 2016 Oregon State Senior Project
MIT License
67 stars 6 forks source link

Write filesystem access subcomponent of monitor #2

Closed iankronquist closed 8 years ago

iankronquist commented 8 years ago

Write a program in Go which uses the inotify syscalls to monitor changes to a given directory and print them to stdout in some structured format like json. I envision something like this:

$ ./fsmonitor some/dir/or/something
{
   "path": "/file/which/changed",
   "type": "file",
   "modification": "contents-change"
},
{
   "path": "/symlink/which/changed",
   "type": "symlink",
   "modification": "removed"
}

Links which may be useful: https://golang.org/pkg/syscall/ https://gobyexample.com/json https://godoc.org/golang.org/x/exp/inotify http://man7.org/linux/man-pages/man7/inotify.7.html Section 19.2 of the The Linux Programming Interface may be useful.

iankronquist commented 8 years ago

Fixed by #4.