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:
parent
e8d5afe1fa
commit
389ecf6e60
1 changed files with 16 additions and 12 deletions
28
main.go
28
main.go
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue