Add context timeout to scanners
This commit is contained in:
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.abyssale.com/ready", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.abyssale.com/ready", nil)
|
||||
req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://exchange-rates.abstractapi.com/v1/live/?api_key=%s&base=USD", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://exchange-rates.abstractapi.com/v1/live/?api_key=%s&base=USD", resMatch), nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.abuseipdb.com/api/v2/check?ipAddress=118.25.6.39", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.abuseipdb.com/api/v2/check?ipAddress=118.25.6.39", nil)
|
||||
req.Header.Add("Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "http://dataservice.accuweather.com/locations/v1/cities/autocomplete?apikey="+resMatch+"&q=----&language=en-us", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "http://dataservice.accuweather.com/locations/v1/cities/autocomplete?apikey="+resMatch+"&q=----&language=en-us", nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://io.adafruit.com/api/v2/ladybugtest/feeds/?x-aio-key="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://io.adafruit.com/api/v2/ladybugtest/feeds/?x-aio-key="+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://stock.adobe.io/Rest/Media/1/Search/Files?locale=en_US%2526search_parameters%255Bwords%255D=kittens", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://stock.adobe.io/Rest/Media/1/Search/Files?locale=en_US%2526search_parameters%255Bwords%255D=kittens", nil)
|
||||
req.Header.Add("x-api-key", resMatch)
|
||||
req.Header.Add("x-product", resIdMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.adzuna.com/v1/api/jobs/gb/search/1?app_id=%s&app_key=%s", resIdMatch, resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.adzuna.com/v1/api/jobs/gb/search/1?app_id=%s&app_key=%s", resIdMatch, resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.agora.io/dev/v1/projects", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.agora.io/dev/v1/projects", nil)
|
||||
req.SetBasicAuth(resSecret, resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
payload := strings.NewReader(`{"environment":"production","username":"john","email":"john@smith.com","repository":"https://github.com/airbrake/airbrake","revision":"38748467ea579e7ae64f7815452307c9d05e05c5","version":"v2.0"}`)
|
||||
|
||||
req, _ := http.NewRequest("POST", "https://api.airbrake.io/api/v4/projects/"+resIdMatch+"/deploys?key="+resMatch, payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.airbrake.io/api/v4/projects/"+resIdMatch+"/deploys?key="+resMatch, payload)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.airbrake.io/api/v4/projects?key="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.airbrake.io/api/v4/projects?key="+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://go.urbanairship.com/api/schedules", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://go.urbanairship.com/api/schedules", nil)
|
||||
req.Header.Add("Accept", "application/vnd.urbanairship+json; version=3")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.airtable.com/v0/"+appRes+"/Projects", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.airtable.com/v0/"+appRes+"/Projects", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", keyRes))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("http://api.airvisual.com/v2/countries?key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("http://api.airvisual.com/v2/countries?key=%s", resMatch), nil)
|
||||
req.Header.Add("Accept", "application/vnd.airvisual+json; version=3")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:", resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://nitro.alconost.com/api/v1/account", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://nitro.alconost.com/api/v1/account", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.alegra.com/api/v1/users", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.alegra.com/api/v1/users", nil)
|
||||
req.SetBasicAuth(userPatMatch, tokenPatMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
timeout := 10 * time.Second
|
||||
client.Timeout = timeout
|
||||
req, _ := http.NewRequest("GET", "https://api.aletheiaapi.com/StockData?symbol=msft&summary=true", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.aletheiaapi.com/StockData?symbol=msft&summary=true", nil)
|
||||
req.Header.Add("Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://"+resIdMatch+"-dsn.algolia.net/1/keys", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resIdMatch+"-dsn.algolia.net/1/keys", nil)
|
||||
req.Header.Add("X-Algolia-Application-Id", resIdMatch)
|
||||
req.Header.Add("X-Algolia-API-Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://otx.alienvault.com/api/v1/users/me", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://otx.alienvault.com/api/v1/users/me", nil)
|
||||
req.Header.Add("X-OTX-API-KEY", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://apiv2.allsportsapi.com/football/?met=Countries&APIkey="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://apiv2.allsportsapi.com/football/?met=Countries&APIkey="+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
payload := strings.NewReader("grant_type=client_credentials&client_id=" + resMatch + "&client_secret=" + resSecret)
|
||||
|
||||
req, _ := http.NewRequest("POST", "https://test.api.amadeus.com/v1/security/oauth2/token", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://test.api.amadeus.com/v1/security/oauth2/token", payload)
|
||||
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.ambeedata.com/latest/by-lat-lng?lat=12&lng=77", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.ambeedata.com/latest/by-lat-lng?lat=12&lng=77", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("x-api-key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
payload := strings.NewReader("api_key=" + resMatch + "&identification=%5B%7B%22user_id%22%3A%22datamonster%40gmail.com%22%2C%20%22user_properties%22%3A%7B%22Age%22%3A%2235%22%7D%2C%20%22groups%22%3A%7B%22company_id%22%3A%221234%22%7D%2C%20%22country%22%3A%22United%20States%22%7D%5D")
|
||||
req, _ := http.NewRequest("POST", "https://api.amplitude.com/identify", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.amplitude.com/identify", payload)
|
||||
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/%s/apis/by-name?apiName=%s", orgRes, ""), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/%s/apis/by-name?apiName=%s", orgRes, ""), nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://app.apacta.com/api/v1/time_entries?api_key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://app.apacta.com/api/v1/time_entries?api_key=%s", resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.api2cart.com/v1.1/account.cart.list.json?api_key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.api2cart.com/v1.1/account.cart.list.json?api_key=%s", resMatch), nil)
|
||||
req.Header.Add("Accept", "application/json")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://unify.apideck.com/vault/consumers", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://unify.apideck.com/vault/consumers", nil)
|
||||
req.Header.Add("x-apideck-app-id", resIdMatch)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.apiflash.com/v1/urltoimage?url=%s&access_key=%s", resUrlMatch, resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apiflash.com/v1/urltoimage?url=%s&access_key=%s", resUrlMatch, resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:%s", resMatch, resToken)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://api.apifonica.com/v2/accounts", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apifonica.com/v2/accounts", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.apify.com/v2/acts?token="+resMatch+"&my=true&offset=10&limit=99&desc=true", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apify.com/v2/acts?token="+resMatch+"&my=true&offset=10&limit=99&desc=true", nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -61,7 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
timeout := 10 * time.Second
|
||||
client.Timeout = timeout
|
||||
req, _ := http.NewRequest("GET", "https://www.apimatic.io/api/code-generations", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.apimatic.io/api/code-generations", nil)
|
||||
req.SetBasicAuth(userPatMatch, passPatMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.apiscience.com/v1/monitors", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.apiscience.com/v1/monitors", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.apollo.io/v1/account_stages?api_key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apollo.io/v1/account_stages?api_key=%s", resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -68,7 +68,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
Raw: []byte(resMatch),
|
||||
}
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.appcues.com/v2/accounts/%s/flows", resIdMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.appcues.com/v2/accounts/%s/flows", resIdMatch), nil)
|
||||
req.SetBasicAuth(resUserMatch, resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:", resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://api.appfollow.io/test", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.appfollow.io/test", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
payload := strings.NewReader(`{"html":"<html><body><h1>Hello World</h1></body></html>","filename":"HelloWorld.pdf"}`)
|
||||
req, _ := http.NewRequest("POST", fmt.Sprintf("https://www.appsynergy.com/api?action=HTML2PDF&apiKey=%s", resMatch), payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("https://www.appsynergy.com/api?action=HTML2PDF&apiKey=%s", resMatch), payload)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.apptivo.com/app/dao/v6/leads?a=getConfigData&apiKey=%s&accessKey=%s", resMatch, resIdMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.apptivo.com/app/dao/v6/leads?a=getConfigData&apiKey=%s&accessKey=%s", resMatch, resIdMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
bodyBytes, err := ioutil.ReadAll(res.Body)
|
||||
|
||||
@@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://"+resURLMatch+"/artifactory/api/storageinfo", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+resURLMatch+"/artifactory/api/storageinfo", nil)
|
||||
|
||||
req.Header.Add("X-JFrog-Art-Api", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("POST", "https://api.artsy.net/api/tokens/xapp_token?client_id="+resIdMatch+"&client_secret="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.artsy.net/api/tokens/xapp_token?client_id="+resIdMatch+"&client_secret="+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://app.asana.com/api/1.0/users/me", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.asana.com/api/1.0/users/me", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://app.asana.com/api/1.0/users/me", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.asana.com/api/1.0/users/me", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.assemblyai.com/v2/transcript", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.assemblyai.com/v2/transcript", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.audd.io/setCallbackUrl/?api_token=%s&url=https://yourwebsite.com/callbacks_handler/", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.audd.io/setCallbackUrl/?api_token=%s&url=https://yourwebsite.com/callbacks_handler/", resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
bodyBytes, err := ioutil.ReadAll(res.Body)
|
||||
|
||||
@@ -68,7 +68,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
curl -H "Authorization: Bearer $token" https://domain/api/v2/users
|
||||
*/
|
||||
|
||||
req, _ := http.NewRequest("GET", "https://"+domainRes+"/api/v2/users", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://"+domainRes+"/api/v2/users", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", managementApiTokenRes))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -82,7 +82,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
data.Set("code", "AUTHORIZATION_CODE")
|
||||
data.Set("redirect_uri", "undefined")
|
||||
|
||||
req, _ := http.NewRequest(http.MethodPost, "https://"+domainRes+"/oauth/token", strings.NewReader(data.Encode())) // URL-encoded payload
|
||||
req, _ := http.NewRequestWithContext(ctx, http.MethodPost, "https://"+domainRes+"/oauth/token", strings.NewReader(data.Encode())) // URL-encoded payload
|
||||
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
payload := strings.NewReader(fmt.Sprintf(`grant_type=client_credentials&client_id=%s&client_secret=%s`, resMatch, resSecret))
|
||||
req, _ := http.NewRequest("POST", "https://developer.api.autodesk.com/authentication/v1/authenticate", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://developer.api.autodesk.com/authentication/v1/authenticate", payload)
|
||||
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.autoklose.com/api/campaigns/?api_token=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://api.autoklose.com/api/campaigns/?api_token=%s", resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
bodyBytes, err := ioutil.ReadAll(res.Body)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api2.autopilothq.com/v1/account", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api2.autopilothq.com/v1/account", nil)
|
||||
req.Header.Add("autopilotapikey", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
timeout := 10 * time.Second
|
||||
client.Timeout = timeout
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("http://api.aviationstack.com/v1/flights?access_key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("http://api.aviationstack.com/v1/flights?access_key=%s", resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://axonaut.com/api/v2/companies?type=all&sort=id", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://axonaut.com/api/v2/companies?type=all&sort=id", nil)
|
||||
req.Header.Add("userApiKey", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
Raw: []byte(resMatch),
|
||||
}
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.aylien.com/news/stories", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.aylien.com/news/stories", nil)
|
||||
req.Header.Add("X-AYLIEN-NewsAPI-Application-ID", resIdMatch)
|
||||
req.Header.Add("X-AYLIEN-NewsAPI-Application-Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://app.ayrshare.com/api/analytics/links", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.ayrshare.com/api/analytics/links", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.bannerbear.com/v2/auth", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.bannerbear.com/v2/auth", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.baremetrics.com/v1/account", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.baremetrics.com/v1/account", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -56,7 +56,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
payload := &bytes.Buffer{}
|
||||
writer := multipart.NewWriter(payload)
|
||||
_ = writer.WriteField("name", "\"My Form\"")
|
||||
req, _ := http.NewRequest("POST", "https://api.base-api.io/v1/forms", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.base-api.io/v1/forms", payload)
|
||||
req.Header.Set("Content-Type", writer.FormDataContentType())
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.getbeamer.com/v0/url", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.getbeamer.com/v0/url", nil)
|
||||
req.Header.Add("Beamer-Api-Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -55,7 +55,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
data := fmt.Sprintf("%s:X", resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
payload := strings.NewReader(`{"service": "custom_field.list"}`)
|
||||
req, _ := http.NewRequest("POST", "https://beebole-apps.com/api/v2", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://beebole-apps.com/api/v2", payload)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://besttime.app/api/v1/keys/"+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://besttime.app/api/v1/keys/"+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://%s.billomat.net/api/v2/clients/myself", resId), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s.billomat.net/api/v2/clients/myself", resId), nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("X-BillomatApiKey", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:", resMatch)
|
||||
baseToken := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://cloud.bitbar.com/api/me", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://cloud.bitbar.com/api/me", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", baseToken))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
Raw: []byte(resMatch),
|
||||
}
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://apiv2.bitcoinaverage.com/websocket/get_ticket", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://apiv2.bitcoinaverage.com/websocket/get_ticket", nil)
|
||||
req.Header.Add("x-ba-key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api-ssl.bitly.com/v4/user", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api-ssl.bitly.com/v4/user", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -72,7 +72,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
signature := getBitmexSignature(timestamp, resSecretMatch, action, path, payload.Encode())
|
||||
|
||||
req, _ := http.NewRequest(action, "https://www.bitmex.com"+path, strings.NewReader(payload.Encode()))
|
||||
req, _ := http.NewRequestWithContext(ctx, action, "https://www.bitmex.com"+path, strings.NewReader(payload.Encode()))
|
||||
req.Header.Add("api-expires", timestamp)
|
||||
req.Header.Add("api-key", resMatch)
|
||||
req.Header.Add("api-signature", signature)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.idbus.com/v3/stops", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.idbus.com/v3/stops", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.runscope.com/account", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.runscope.com/account", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://blitapp.com/api/apps/all", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://blitapp.com/api/apps/all", nil)
|
||||
req.Header.Add("API-Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://www.googleapis.com/blogger/v3/blogs/2399953?key="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.googleapis.com/blogger/v3/blogs/2399953?key="+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.bombbomb.com/v2/lists/", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.bombbomb.com/v2/lists/", nil)
|
||||
req.Header.Add("Authorization", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
payload := strings.NewReader(`{
|
||||
"domain": "www.example.com"
|
||||
}`)
|
||||
req, _ := http.NewRequest("POST", "https://api.brandfetch.io/v1/color", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.brandfetch.io/v1/color", payload)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("x-api-key", fmt.Sprintf("%s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.browshot.com/api/v1/instance/list?key="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.browshot.com/api/v1/instance/list?key="+resMatch, nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://www.buddyns.com/api/v2/zone/", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.buddyns.com/api/v2/zone/", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Token %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:x", resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://www.bugherd.com/api_v2/projects.json", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.bugherd.com/api_v2/projects.json", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.bugsnag.com/user/organizations?admin", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.bugsnag.com/user/organizations?admin", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("token %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.buildkite.com/v2/user", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.buildkite.com/v2/user", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://prod-api.bulbul.io/view_all_users?api_key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://prod-api.bulbul.io/view_all_users?api_key=%s", resMatch), nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
bodyBytes, err := ioutil.ReadAll(res.Body)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.buttercms.com/v2/posts/?auth_token="+resMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.buttercms.com/v2/posts/?auth_token="+resMatch, nil)
|
||||
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
timeout := 10 * time.Second
|
||||
client.Timeout = timeout
|
||||
req, _ := http.NewRequest("GET", "https://app.caflou.com/api/v1/accounts", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://app.caflou.com/api/v1/accounts", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://calendarific.com/api/v2/holidays?&api_key="+resMatch+"&country=US&year=2019", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://calendarific.com/api/v2/holidays?&api_key="+resMatch+"&country=US&year=2019", nil)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
defer res.Body.Close()
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.calendly.com/users/me", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.calendly.com/users/me", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.calorieninjas.com/v1/nutrition?query", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.calorieninjas.com/v1/nutrition?query", nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("X-Api-Key", resMatch)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://campayn.com/api/v1/lists", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://campayn.com/api/v1/lists", nil)
|
||||
req.Header.Add("Authorization", "TRUEREST apikey="+resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
payload := strings.NewReader("apiKey=" + resMatch)
|
||||
req, _ := http.NewRequest("POST", "https://canny.io/api/v1/boards/list", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://canny.io/api/v1/boards/list", payload)
|
||||
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.capsulecrm.com/api/v2/users", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.capsulecrm.com/api/v2/users", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -52,7 +52,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
payload := strings.NewReader(`{"type":"flight","passengers":2,"legs":[{"departure_airport":"sfo","destination_airport":"yyz"},{"departure_airport":"yyz","destination_airport":"sfo"}]}`)
|
||||
req, _ := http.NewRequest("POST", "https://www.carboninterface.com/api/v1/estimates", payload)
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", "https://www.carboninterface.com/api/v1/estimates", payload)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
req.Header.Add("Content-type", "application/json")
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:%s", resUser, resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://api.cashboardapp.com/account.xml", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.cashboardapp.com/account.xml", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://search.censys.io/api/v1/account", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://search.censys.io/api/v1/account", nil)
|
||||
req.SetBasicAuth(userPatMatch, tokenPatMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.centralstationcrm.net/api/users.json", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.centralstationcrm.net/api/users.json", nil)
|
||||
req.Header.Add("X-apikey", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.chatbot.com/stories", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.chatbot.com/stories", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.chec.io/v1/products?limit=25", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.chec.io/v1/products?limit=25", nil)
|
||||
req.Header.Add("X-Authorization", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.checklyhq.com/v1/checks", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.checklyhq.com/v1/checks", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -60,7 +60,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
//Used the app's sandbox environment for this case since I can't create a live account.
|
||||
req, _ := http.NewRequest("GET", "https://api.sandbox.checkout.com/customers/"+resIdMatch, nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.sandbox.checkout.com/customers/"+resIdMatch, nil)
|
||||
req.Header.Add("Authorization", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://cicero.azavea.com/v3.1/account/credits_remaining?key=%s", resMatch), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://cicero.azavea.com/v3.1/account/credits_remaining?key=%s", resMatch), nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if verify {
|
||||
// test for api key
|
||||
req, _ := http.NewRequest("GET", "https://api.clarifai.com/v2/inputs", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clarifai.com/v2/inputs", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Key %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
@@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
|
||||
if !s1.Verified {
|
||||
// test for pat
|
||||
req, _ := http.NewRequest("GET", "https://api.clarifai.com/v2/users/me", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clarifai.com/v2/users/me", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Key %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://person.clearbit.com/v1/people/email/alex@alexmaccaw.com", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://person.clearbit.com/v1/people/email/alex@alexmaccaw.com", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -69,7 +69,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:%s", resEmail, resKey)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", fmt.Sprintf("https://%s/api/v1/projects", resServer), nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("https://%s/api/v1/projects", resServer), nil)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -63,7 +63,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
data := fmt.Sprintf("%s:%s", resIdMatch, resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
|
||||
req, _ := http.NewRequest("GET", "https://rest.clicksend.com/v3/account", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://rest.clicksend.com/v3/account", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.clickup.com/api/v2/user", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clickup.com/api/v2/user", nil)
|
||||
req.Header.Add("Authorization", resMatch)
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -54,7 +54,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("api-key:%s", resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://www.clinchpad.com/api/v1/pipelines", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://www.clinchpad.com/api/v1/pipelines", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
res, err := client.Do(req)
|
||||
if err == nil {
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.clockify.me/api/v1/user", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.clockify.me/api/v1/user", nil)
|
||||
req.Header.Add("content-type", "application/json")
|
||||
req.Header.Add("X-Api-Key", fmt.Sprintf("%s", resMatch))
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
}
|
||||
|
||||
if verify {
|
||||
req, _ := http.NewRequest("GET", "https://api.textanywhere.com/API/v1.0/REST/status", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.textanywhere.com/API/v1.0/REST/status", nil)
|
||||
req.Header.Add("user_key", resMatch)
|
||||
req.Header.Add("access_token", tokenRes)
|
||||
res, err := client.Do(req)
|
||||
|
||||
@@ -53,7 +53,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
if verify {
|
||||
data := fmt.Sprintf("%s:", resMatch)
|
||||
sEnc := b64.StdEncoding.EncodeToString([]byte(data))
|
||||
req, _ := http.NewRequest("GET", "https://api.close.com/api/v1/me/", nil)
|
||||
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.close.com/api/v1/me/", nil)
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
res, err := client.Do(req)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user