github.com/v2fly/v2ray-core/v4@v4.45.2/infra/control/love.go (about) 1 package control 2 3 import ( 4 "bufio" 5 "bytes" 6 "compress/gzip" 7 "encoding/base64" 8 "fmt" 9 10 "github.com/v2fly/v2ray-core/v4/common" 11 "github.com/v2fly/v2ray-core/v4/common/platform" 12 ) 13 14 const content = "H4sIAAAAAAAC/4SVMaskNwzH+/kUW6izcSthMGrcqLhVk0rdQS5cSMg7Xu4S0vizB8meZd57M3ta2GHX/ukvyZZmY2ZKDMzCzJyY5yOlxKII1omsf+qkBiiC6WhbYsbkjDAfySQsJqD3jtrD0EBM3sBHzG3kUsrglIQREXonpd47kYIi4AHmgI9Wcq2jlJITC6JZJ+v3ECYzBMAHyYm392yuY4zWsjACmHZSh6l3A0JETzGlWZqDsnArpTg62mhJONhOdO90p97V1BAnteoaOcuummtrrtuERQwUiJwP8a4KGKcyxdOCw1spOY+WHueFqmakAIgUSSuhwKNgobxKXSLbtg6r5cFmBiAeF6yCkYycmv+BiCIiW8ScHa3DgxAuZQbRhFNrLTFo96RBmx9jKWWG5nBsjyJzuIkftUblonppZU5t5LzwIks5L1a4lijagQxLokbIYwxfytNDC+XQqrWW9fzAunhqh5/Tg8PuaMw0d/Tcw3iDO81bHfWM/AnutMh2xqSUntMzd3wHDy9iHMQz8bmUZYvqedTJ5GgOnrNt7FIbSlwXE3wDI19n/KA38MsLaP4l89b5F8AV3ESOMIEhIBgezHBc0H6xV9KbaXwMvPcNvIHcC0C7UPZQx4JVTb35/AneSQq+bAYXsBmY7TCRupF2NTdVm/+ch22xa0pvRERKqt1oxj9DUbXzU84Gvj5hc5a81SlAUwMwgEs4T9+7sg9lb9h+908MWiKV8xtWciVTmnB3tivRjNerfXdxpfEBbq2NUvLMM5R9NLuyQg8nXT0PIh1xPd/wrcV49oJ6zbZaPlj2V87IY9T3F2XCOcW2MbZyZd49H+9m81E1N9SxlU+ff/1y+/f3719vf7788+Ugv/ffbMIH7ZNj0dsT4WMHHwLPu/Rp2O75uh99AK+N2xn7ZHq1OK6gczkN+9ngdOl1Qvki5xwSR8vFX6D+9vXA97B/+fr5rz9u/738uP328urP19vfP759e3n9Xs6jamvqlfJ/AAAA//+YAMZjDgkAAA==" 15 16 type LoveCommand struct{} 17 18 func (*LoveCommand) Name() string { 19 return "lovevictoria" 20 } 21 22 func (*LoveCommand) Hidden() bool { 23 return false 24 } 25 26 func (c *LoveCommand) Description() Description { 27 return Description{ 28 Short: "", 29 Usage: []string{""}, 30 } 31 } 32 33 func (*LoveCommand) Execute([]string) error { 34 c, err := base64.StdEncoding.DecodeString(content) 35 common.Must(err) 36 reader, err := gzip.NewReader(bytes.NewBuffer(c)) 37 common.Must(err) 38 b := make([]byte, 4096) 39 nBytes, _ := reader.Read(b) 40 41 bb := bytes.NewBuffer(b[:nBytes]) 42 scanner := bufio.NewScanner(bb) 43 for scanner.Scan() { 44 s := scanner.Text() 45 fmt.Print(s + platform.LineSeparator()) 46 } 47 48 return nil 49 } 50 51 func init() { 52 common.Must(RegisterCommand(&LoveCommand{})) 53 }