1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +02:00

Add option to hide logo

This commit is contained in:
Zack Scholl 2017-12-14 16:32:22 -07:00
parent e8d5afe1fa
commit 389ecf6e60

28
main.go
View file

@ -13,6 +13,7 @@ const BUFFERSIZE = 1024
var oneGigabytePerSecond = 1000000 // expressed as kbps
type Flags struct {
HideLogo bool
Relay bool
Debug bool
Wait bool
@ -29,19 +30,8 @@ type Flags struct {
var version string
func main() {
// fmt.Println(`
// ,_
// >' )
// croc version ` + fmt.Sprintf("%5s", version) + ` ( ( \
// || \
// /^^^^\ ||
// /^^\________/0 \ ||
// ( ` + "`" + `~+++,,_||__,,++~^^^^^^^
// ...V^V^V^V^V^V^\...............................
// `)
fmt.Printf("croc version %s\n", version)
flags := new(Flags)
flag.BoolVar(&flags.HideLogo, "hidelogo", false, "run as relay")
flag.BoolVar(&flags.Relay, "relay", false, "run as relay")
flag.BoolVar(&flags.Debug, "debug", false, "debug mode")
flag.BoolVar(&flags.Wait, "wait", false, "wait for code to be sent")
@ -54,6 +44,20 @@ func main() {
flag.BoolVar(&flags.DontEncrypt, "no-encrypt", false, "turn off encryption")
flag.IntVar(&flags.NumberOfConnections, "threads", 4, "number of threads to use")
flag.Parse()
if !flags.HideLogo {
fmt.Println(`
,_
>' )
croc version ` + fmt.Sprintf("%5s", version) + ` ( ( \
|| \
/^^^^\ ||
/^^\________/0 \ ||
( ` + "`" + `~+++,,_||__,,++~^^^^^^^
...V^V^V^V^V^V^\...............................
`)
}
fmt.Printf("croc version %s\n", version)
if flags.Relay {
r := NewRelay(flags)