Skip to content

Commit a68efa4

Browse files
committed
Add option to hide logo
1 parent a4888f4 commit a68efa4

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

main.go

+16-12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const BUFFERSIZE = 1024
1313
var oneGigabytePerSecond = 1000000 // expressed as kbps
1414

1515
type Flags struct {
16+
HideLogo bool
1617
Relay bool
1718
Debug bool
1819
Wait bool
@@ -29,19 +30,8 @@ type Flags struct {
2930
var version string
3031

3132
func main() {
32-
// fmt.Println(`
33-
// ,_
34-
// >' )
35-
// croc version ` + fmt.Sprintf("%5s", version) + ` ( ( \
36-
// || \
37-
// /^^^^\ ||
38-
// /^^\________/0 \ ||
39-
// ( ` + "`" + `~+++,,_||__,,++~^^^^^^^
40-
// ...V^V^V^V^V^V^\...............................
41-
42-
// `)
43-
fmt.Printf("croc version %s\n", version)
4433
flags := new(Flags)
34+
flag.BoolVar(&flags.HideLogo, "hidelogo", false, "run as relay")
4535
flag.BoolVar(&flags.Relay, "relay", false, "run as relay")
4636
flag.BoolVar(&flags.Debug, "debug", false, "debug mode")
4737
flag.BoolVar(&flags.Wait, "wait", false, "wait for code to be sent")
@@ -54,6 +44,20 @@ func main() {
5444
flag.BoolVar(&flags.DontEncrypt, "no-encrypt", false, "turn off encryption")
5545
flag.IntVar(&flags.NumberOfConnections, "threads", 4, "number of threads to use")
5646
flag.Parse()
47+
if !flags.HideLogo {
48+
fmt.Println(`
49+
,_
50+
>' )
51+
croc version ` + fmt.Sprintf("%5s", version) + ` ( ( \
52+
|| \
53+
/^^^^\ ||
54+
/^^\________/0 \ ||
55+
( ` + "`" + `~+++,,_||__,,++~^^^^^^^
56+
...V^V^V^V^V^V^\...............................
57+
58+
`)
59+
}
60+
fmt.Printf("croc version %s\n", version)
5761

5862
if flags.Relay {
5963
r := NewRelay(flags)

0 commit comments

Comments
 (0)