Created
January 26, 2016 13:35
-
-
Save blackdev1l/2e7ee6d43dc7cbbc1fe4 to your computer and use it in GitHub Desktop.
tars merda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net/http" | |
"os" | |
) | |
const APIURL = "https://api.telegram.org/bot" | |
var ( | |
token string | |
chat string | |
) | |
func send(s string) { | |
http.Get(APIURL + token + "/sendMessage?chat_id=" + chat + "&text=" + "!unset " + s) | |
} | |
func main() { | |
token = os.Args[1] | |
chat = os.Args[2] | |
file, _ := os.Open("sets.txt") | |
scanner := bufio.NewScanner(file) | |
for scanner.Scan() { | |
fmt.Println("unsetting " + scanner.Text()) | |
send(scanner.Text()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment