mirror of
https://github.com/arnaucube/echo-botnet.git
synced 2026-02-07 03:16:42 +01:00
update
This commit is contained in:
@@ -12,6 +12,11 @@ keywordsConfig.json --> contains the keywords to track from Twitter API
|
|||||||
repliesConfig.json --> contains the replies
|
repliesConfig.json --> contains the replies
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Just need to configure:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
configuration file example (botsConfig.json):
|
configuration file example (botsConfig.json):
|
||||||
```
|
```
|
||||||
[{
|
[{
|
||||||
|
|||||||
Binary file not shown.
BIN
configurationScreenshot.png
Normal file
BIN
configurationScreenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
echo-botnet
BIN
echo-botnet
Binary file not shown.
@@ -11,11 +11,11 @@ import (
|
|||||||
|
|
||||||
//Config stores the data from json botsConfig.json file
|
//Config stores the data from json botsConfig.json file
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Consumer_key string `json:"consumer_key"`
|
ConsumerKey string `json:"consumer_key"`
|
||||||
Consumer_secret string `json:"consumer_secret"`
|
ConsumerSecret string `json:"consumer_secret"`
|
||||||
Access_token_key string `json:"access_token_key"`
|
AccessTokenKey string `json:"access_token_key"`
|
||||||
Access_token_secret string `json:"access_token_secret"`
|
AccessTokenSecret string `json:"access_token_secret"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//Botnet stores each bot configured
|
//Botnet stores each bot configured
|
||||||
@@ -38,8 +38,8 @@ func readConfigTokensAndConnect() (botnet Botnet) {
|
|||||||
|
|
||||||
fmt.Print("connecting to twitter api --> ")
|
fmt.Print("connecting to twitter api --> ")
|
||||||
for i := 0; i < len(config); i++ {
|
for i := 0; i < len(config); i++ {
|
||||||
configu := oauth1.NewConfig(config[i].Consumer_key, config[i].Consumer_secret)
|
configu := oauth1.NewConfig(config[i].ConsumerKey, config[i].ConsumerSecret)
|
||||||
token := oauth1.NewToken(config[i].Access_token_key, config[i].Access_token_secret)
|
token := oauth1.NewToken(config[i].AccessTokenKey, config[i].AccessTokenSecret)
|
||||||
httpClient := configu.Client(oauth1.NoContext, token)
|
httpClient := configu.Client(oauth1.NoContext, token)
|
||||||
// twitter client
|
// twitter client
|
||||||
client := twitter.NewClient(httpClient)
|
client := twitter.NewClient(httpClient)
|
||||||
@@ -48,7 +48,7 @@ func readConfigTokensAndConnect() (botnet Botnet) {
|
|||||||
}
|
}
|
||||||
botnet.Clients = clients
|
botnet.Clients = clients
|
||||||
|
|
||||||
fmt.Println("connection successfull")
|
fmt.Println("connection successful")
|
||||||
|
|
||||||
return botnet
|
return botnet
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user