diff --git a/README.md b/README.md index 6517471..825aff0 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,11 @@ keywordsConfig.json --> contains the keywords to track from Twitter API repliesConfig.json --> contains the replies ``` +Just need to configure: + +![echo-botnet](https://raw.githubusercontent.com/arnaucode/echo-botnet/master/configurationScreenshot.png "configurationScreenshot") + + configuration file example (botsConfig.json): ``` [{ diff --git a/build/echo-botnet b/build/echo-botnet index a6bf441..1b1640a 100755 Binary files a/build/echo-botnet and b/build/echo-botnet differ diff --git a/configurationScreenshot.png b/configurationScreenshot.png new file mode 100644 index 0000000..87f486a Binary files /dev/null and b/configurationScreenshot.png differ diff --git a/echo-botnet b/echo-botnet index a6bf441..1b1640a 100755 Binary files a/echo-botnet and b/echo-botnet differ diff --git a/readConfigTokensAndConnect.go b/readConfigTokensAndConnect.go index 60da68c..e962297 100644 --- a/readConfigTokensAndConnect.go +++ b/readConfigTokensAndConnect.go @@ -11,11 +11,11 @@ import ( //Config stores the data from json botsConfig.json file type Config struct { - Title string `json:"title"` - Consumer_key string `json:"consumer_key"` - Consumer_secret string `json:"consumer_secret"` - Access_token_key string `json:"access_token_key"` - Access_token_secret string `json:"access_token_secret"` + Title string `json:"title"` + ConsumerKey string `json:"consumer_key"` + ConsumerSecret string `json:"consumer_secret"` + AccessTokenKey string `json:"access_token_key"` + AccessTokenSecret string `json:"access_token_secret"` } //Botnet stores each bot configured @@ -38,8 +38,8 @@ func readConfigTokensAndConnect() (botnet Botnet) { fmt.Print("connecting to twitter api --> ") for i := 0; i < len(config); i++ { - configu := oauth1.NewConfig(config[i].Consumer_key, config[i].Consumer_secret) - token := oauth1.NewToken(config[i].Access_token_key, config[i].Access_token_secret) + configu := oauth1.NewConfig(config[i].ConsumerKey, config[i].ConsumerSecret) + token := oauth1.NewToken(config[i].AccessTokenKey, config[i].AccessTokenSecret) httpClient := configu.Client(oauth1.NoContext, token) // twitter client client := twitter.NewClient(httpClient) @@ -48,7 +48,7 @@ func readConfigTokensAndConnect() (botnet Botnet) { } botnet.Clients = clients - fmt.Println("connection successfull") + fmt.Println("connection successful") return botnet }