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
I'll be omitting syscalls with ellipsis. | |
The first thing that happens after you press enter is that bash resolves | |
curl to /usr/bin/curl and then forks(). The strace output is from the | |
forked process. | |
Fist execve() the /usr/bin/curl binary and pass an array of arguments to it. | |
execve("/usr/bin/curl", ["curl", "http://github.com"], [/* 8 vars */]) = 0 | |
... |
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
#!/usr/bin/env ruby | |
# | |
# Sensu Handler: mailer | |
# | |
# This handler formats alerts as mails and sends them off to a recipient, | |
# either defined in the check (optional) or default to a prefined value. | |
# | |
# Required: mailer.json that should have at least, mail_to and mail_from | |
# | |
# Optional: checks can contain, mail_to, mail_from, and mail_subject that |
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
vagrant@vagrant:~$ sudo /usr/share/bcc/tools/opensnoop | |
PID COMM FD ERR PATH | |
419 vmtoolsd 9 0 /etc/mtab | |
419 vmtoolsd 10 0 /proc/devices | |
419 vmtoolsd 10 0 /proc/net/dev | |
419 vmtoolsd 11 0 /proc/net/if_inet6 | |
419 vmtoolsd 11 0 /proc/net/if_inet6 | |
419 vmtoolsd 10 0 /proc/net/dev | |
419 vmtoolsd 11 0 /proc/net/if_inet6 | |
419 vmtoolsd 11 0 /proc/net/if_inet6 |
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
vagrant@vagrant:~$ sudo /usr/share/bcc/tools/execsnoop | |
PCOMM PID PPID RET ARGS | |
sshd 2196 893 0 /usr/sbin/sshd -D -R | |
sh 2198 2196 0 | |
env 2199 2198 0 /usr/bin/env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin run-parts --lsbsysinit /etc/update-motd.d | |
run-parts 2199 2198 0 /bin/run-parts --lsbsysinit /etc/update-motd.d | |
00-header 2200 2199 0 /etc/update-motd.d/00-header | |
uname 2201 2200 0 /bin/uname -o | |
uname 2202 2200 0 /bin/uname -r | |
uname 2203 2200 0 /bin/uname -m |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"math" | |
"net" | |
"sort" | |
"time" | |
) |
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
package main | |
import ( | |
"bufio" | |
"flag" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"strings" | |
"time" |
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
package routes | |
import ( | |
"fmt" | |
"net/http" | |
"path" | |
restful "github.com/emicklei/go-restful" | |
"github.com/emicklei/go-restful-openapi" | |
"github.com/grepory/storage/apis/meta" |
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
package storage | |
type Store struct { | |
client *clientv3.Cient | |
} | |
func (s *Store) Get(key string, out interface{}) { | |
resp, _ := s.client.Get(context.TODO(), key) | |
proto.Unmarshal(resp.Kvs[0].Value, out.(proto.Message)) | |
} |
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
syntax = "proto3"; | |
import "google/protobuf/timestamp.proto"; | |
import "github.com/gogo/protobuf/gogoproto/gogo.proto"; | |
package v2alpha1.rbac.sensu.io; | |
option go_package = "v2alpha1"; | |
option (gogoproto.populate_all) = true; |
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
package v2 | |
import ( | |
somepackage | |
) | |
type Scheme struct { | |
Group string | |
Version string | |
} |
NewerOlder