arnaucube
arnaucube/flock-botnetPublic Self-hosted repository
flock-botnet/main.go
main.goRaw
 1package main
 2
 3import (
 4	"bufio"
 5	"fmt"
 6	"os"
 7	"strings"
 8)
 9
10const version = "0.1-dev"
11
12func main() {
13	c.Yellow("twFlock")
14	fmt.Println("---------------")
15	c.Cyan("twFlock initialized")
16	c.Purple("https://github.com/arnaucode/twFlock")
17	fmt.Println("version " + version)
18	fmt.Println("Reading flockConfig.json file")
19	flock := readConfigTokensAndConnect()
20	fmt.Println("---------------")
21	newcommand := bufio.NewReader(os.Stdin)
22	fmt.Print("Please select command number")
23	options := `
24	1 - Tweet from flock of bots
25	0 - Exit script
26option to select: `
27	for {
28		fmt.Print(options)
29
30		option, _ := newcommand.ReadString('\n')
31		option = strings.TrimSpace(option)
32
33		switch option {
34		case "1":
35			fmt.Println("selected 1 - Tweet from flock of bots")
36			optionTweetFromFlock(flock)
37			break
38		case "0":
39			fmt.Println("selected 0 - exit script")
40			os.Exit(3)
41			break
42		default:
43			fmt.Println("Invalid option")
44			break
45		}
46	}
47}