Key-Checker/main.go

219 lines
6.9 KiB
Go
Raw Permalink Normal View History

2021-07-18 09:15:59 +00:00
package main
import (
"fmt"
2021-07-26 14:25:45 +00:00
b "github.com/daffainfo/Key-Checker/controllers"
2021-07-18 09:15:59 +00:00
)
2021-07-20 02:34:22 +00:00
const (
red string = "\033[31m"
green string = "\033[32m"
yellow string = "\033[33m"
blue string = "\033[34m"
purple string = "\033[35m"
cyan string = "\033[36m"
white string = "\033[97m"
)
2021-07-18 09:15:59 +00:00
2021-07-20 02:34:22 +00:00
var (
input_key = ""
input_key2 = ""
)
func show_banner() {
fmt.Printf(cyan + `
2021-07-18 09:15:59 +00:00
__ __ ________ __
/ //_/__ __ __ / ____/ /_ ___ _____/ /_____ _____
/ ,< / _ \/ / / /_____/ / / __ \/ _ \/ ___/ //_/ _ \/ ___/
/ /| / __/ /_/ /_____/ /___/ / / / __/ /__/ ,< / __/ /
/_/ |_\___/\__, / \____/_/ /_/\___/\___/_/|_|\___/_/
/____/
2021-07-20 02:34:22 +00:00
Author = Muhammad Daffa
Version = 1.0.0
2021-07-30 01:01:21 +00:00
2021-07-20 02:34:22 +00:00
` + white)
}
func ask_singlekey(choose_arr string) string {
fmt.Printf(blue+"\nYou choose %s checker", choose_arr)
fmt.Printf("\nInput your %s:%s\n", choose_arr, white)
fmt.Scan(&input_key)
return input_key
}
func ask_secondkey(choose_arr string, question1 string, question2 string) (string, string) {
fmt.Printf(blue+"\nYou choose %s checker", choose_arr)
fmt.Printf("\nInput your %s:%s\n", question1, white)
fmt.Scan(&input_key)
2021-07-30 01:01:21 +00:00
fmt.Printf("%s\nInput your %s:%s\n", blue, question2, white)
2021-07-20 02:34:22 +00:00
fmt.Scan(&input_key2)
return input_key, input_key2
}
func main() {
var choose int
2021-07-26 16:57:27 +00:00
listname := []string{
"Amplitude API Key",
"Asana Access token",
"Bing Maps API Key",
"Bit.ly Access token",
2021-07-30 01:01:21 +00:00
"Block.io API Key",
2021-07-26 16:57:27 +00:00
"Branch.IO Key and Secret",
"BrowserStack Access Key",
"Buildkite Access token",
"ButterCMS API Key",
2021-07-30 01:01:21 +00:00
"Calendarific API Key",
2021-07-26 16:57:27 +00:00
"Calendly API Key",
"CircleCI Access Token",
2021-07-30 01:01:21 +00:00
"Coinmarketcap API Key",
"Covalent API Key",
"Cryptocompare API Key",
2021-07-26 16:57:27 +00:00
"DataDog API key",
2021-07-30 01:01:21 +00:00
"EAN-Search Access Token",
2021-07-26 16:57:27 +00:00
"Facebook Access Token",
2021-07-30 01:01:21 +00:00
"Fungenerator API Key",
2021-07-26 16:57:27 +00:00
"Github Token",
"Heroku API Key",
2021-07-30 01:01:21 +00:00
"Holiday API Key",
2021-07-26 16:57:27 +00:00
"Hubspot API Key",
"Ipstack API Key",
"Iterable API Key",
"Jumpcloud API key",
2021-07-30 01:01:21 +00:00
"Localytics API and Secret key",
2021-07-26 16:57:27 +00:00
"Lokalise API Key",
"Loqate API key",
"MailGun API Key",
"Mapbox API Key",
"Pagerduty API token",
"Pendo Integration Key",
"PivotalTracker API Token",
"Razorpay API key and secret key",
"SauceLabs Username and access Key",
"SendGrid API Token",
"Spotify Access Token",
"Stripe Live Token",
"Travis CI API token",
"Twilio Account_sid and Auth token",
"Visual Studio App Center API Token",
"WPEngine API Key",
2021-07-30 01:01:21 +00:00
"WakaTime API Key",
"Youtube API Key",
2021-07-26 16:57:27 +00:00
"Zendesk Access token"}
2021-07-18 09:15:59 +00:00
2021-07-20 02:34:22 +00:00
show_banner()
2021-07-26 16:57:27 +00:00
for i, checkers := range listname {
fmt.Printf(green+"%d. %s%s\n", i+1, checkers, white)
}
2021-07-18 09:15:59 +00:00
2021-07-30 01:01:21 +00:00
fmt.Printf("%s\nChoose checkers: %s", green, white)
2021-07-18 13:34:05 +00:00
fmt.Scan(&choose)
2021-07-18 09:15:59 +00:00
if choose == 1 {
2021-07-26 16:57:27 +00:00
q1, q2 := ask_secondkey(listname[0], "Amplitude Key", "Amplitude Secret")
2021-07-20 02:34:22 +00:00
fmt.Println(b.Amplitude(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 2 {
2021-07-26 16:57:27 +00:00
fmt.Println(b.Asana(ask_singlekey(listname[1])))
2021-07-19 03:50:31 +00:00
} else if choose == 3 {
2021-07-26 16:57:27 +00:00
fmt.Println(b.Bing(ask_singlekey(listname[2])))
2021-07-19 03:50:31 +00:00
} else if choose == 4 {
2021-07-26 16:57:27 +00:00
fmt.Println(b.Bitly(ask_singlekey(listname[3])))
2021-07-19 03:50:31 +00:00
} else if choose == 5 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Block(ask_singlekey(listname[4])))
2021-07-19 03:50:31 +00:00
} else if choose == 6 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[5], "Branch Key", "Branch Secret")
fmt.Println(b.Branch(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 7 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[6], "BrowserStack Username", "BrowserStack Key")
fmt.Println(b.Browserstack(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 8 {
2021-07-26 16:57:27 +00:00
fmt.Println(b.Buildkite(ask_singlekey(listname[7])))
2021-07-19 03:50:31 +00:00
} else if choose == 9 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.ButterCMS(ask_singlekey(listname[8])))
2021-07-19 03:50:31 +00:00
} else if choose == 10 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Calendarific(ask_singlekey(listname[9])))
2021-07-19 03:50:31 +00:00
} else if choose == 11 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Calendly(ask_singlekey(listname[10])))
2021-07-19 03:50:31 +00:00
} else if choose == 12 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Circleci(ask_singlekey(listname[11])))
2021-07-19 03:50:31 +00:00
} else if choose == 13 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Coinmarketcap(ask_singlekey(listname[12])))
2021-07-19 03:50:31 +00:00
} else if choose == 14 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Covalent(ask_singlekey(listname[13])))
2021-07-19 03:50:31 +00:00
} else if choose == 15 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Cryptocompare(ask_singlekey(listname[14])))
2021-07-19 03:50:31 +00:00
} else if choose == 16 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[15], "Datadog API key", "Datadog Application key")
fmt.Println(b.Datadog(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 17 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Ean_search(ask_singlekey(listname[16])))
2021-07-19 03:50:31 +00:00
} else if choose == 18 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Facebook(ask_singlekey(listname[17])))
2021-07-19 03:50:31 +00:00
} else if choose == 19 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Fungenerator(ask_singlekey(listname[18])))
2021-07-19 03:50:31 +00:00
} else if choose == 20 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[19], "Github Username", "Github Access Token")
fmt.Println(b.Github(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 21 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Heroku(ask_singlekey(listname[20])))
2021-07-19 03:50:31 +00:00
} else if choose == 22 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Holiday(ask_singlekey(listname[21])))
2021-07-19 03:50:31 +00:00
} else if choose == 23 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Hubspot(ask_singlekey(listname[22])))
2021-07-19 03:50:31 +00:00
} else if choose == 24 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Ipstack(ask_singlekey(listname[23])))
2021-07-19 03:50:31 +00:00
} else if choose == 25 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Iterable(ask_singlekey(listname[24])))
2021-07-19 03:50:31 +00:00
} else if choose == 26 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Jumpcloud(ask_singlekey(listname[25])))
2021-07-19 03:50:31 +00:00
} else if choose == 27 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[26], "Localytics API Key", "Localytics Secret Key")
fmt.Println(b.Localytics(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 28 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Lokalise(ask_singlekey(listname[27])))
2021-07-19 03:50:31 +00:00
} else if choose == 29 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Loqate(ask_singlekey(listname[28])))
2021-07-19 03:50:31 +00:00
} else if choose == 30 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Mailgun(ask_singlekey(listname[29])))
2021-07-19 03:50:31 +00:00
} else if choose == 31 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Mapbox(ask_singlekey(listname[30])))
2021-07-19 03:50:31 +00:00
} else if choose == 32 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Pagerduty(ask_singlekey(listname[31])))
2021-07-19 03:50:31 +00:00
} else if choose == 33 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Pendo(ask_singlekey(listname[32])))
2021-07-19 03:50:31 +00:00
} else if choose == 34 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Pivotaltracker(ask_singlekey(listname[33])))
2021-07-19 03:50:31 +00:00
} else if choose == 35 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[34], "Razor Key", "Github Razor Secret")
fmt.Println(b.Razorpay(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 36 {
2021-07-30 01:01:21 +00:00
q1, q2 := ask_secondkey(listname[35], "SauceLabs Username", "Access Token")
fmt.Println(b.Sauce_labs(q1, q2))
2021-07-19 03:50:31 +00:00
} else if choose == 37 {
2021-07-30 01:01:21 +00:00
fmt.Println(b.Sendgrid(ask_singlekey(listname[36])))
} else if choose == 38 {
fmt.Println(b.Spotify(ask_singlekey(listname[37])))
} else if choose == 39 {
fmt.Println(b.Stripe(ask_singlekey(listname[38])))
} else if choose == 40 {
fmt.Println(b.Travis(ask_singlekey(listname[39])))
} else if choose == 41 {
q1, q2 := ask_secondkey(listname[40], "Twilio SID", "Twilio Token")
fmt.Println(b.Twilio(q1, q2))
} else if choose == 42 {
fmt.Println(b.Appcenter(ask_singlekey(listname[41])))
} else if choose == 43 {
fmt.Println(b.Youtube(ask_singlekey(listname[42])))
} else if choose == 44 {
2021-07-30 13:21:50 +00:00
fmt.Println(b.Wakatime(ask_singlekey(listname[43])))
2021-07-30 01:01:21 +00:00
} else if choose == 45 {
2021-07-30 13:21:50 +00:00
q1, q2 := ask_secondkey(listname[44], "WPEngine Account", "WPEngine Key")
2021-07-30 01:01:21 +00:00
fmt.Println(b.WPEngine(q1, q2))
} else if choose == 46 {
2021-07-30 13:21:50 +00:00
q1, q2 := ask_secondkey(listname[45], "Zendesk Subdomain", "Zendesk Token")
2021-07-20 02:34:22 +00:00
fmt.Println(b.Zendesk(q1, q2))
2021-07-18 09:15:59 +00:00
}
}