Skip to content

Commit

Permalink
Add a few more shared providers, clean up duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Bradley Kemp committed May 22, 2021
1 parent 024b411 commit 9892d51
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
21 changes: 13 additions & 8 deletions matchers/shared_hosting.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@ func IsSharedHostingProvider(u *url.URL) (bool, ProviderContact) {
//
// Try to keep this sorted alphabetically by ProviderName
var sharedHostMatchers = []matcher{
{OnlineForm{"000webhost", "https://www.000webhost.com/report-abuse"}, isSubDomainOf("000webhost.com")},
{OnlineForm{"000webhost", "https://www.000webhost.com/report-abuse"}, isSubDomainOf("000webhostapp.com")},
{OnlineForm{"000webhost", "https://www.000webhost.com/report-abuse"}, isSubDomainOf("000webhost.com", "000webhostapp.com")},
{AbuseEmail{"Adobe", "hellospark@adobe.com"}, isSubDomainOf("spark.adobe.com")},
{OnlineForm{"Bitly", "https://bitly.is/reporting-abuse"}, isSubDomainOf("bit.ly")},
{OnlineForm{"Blogger", "https://support.google.com/blogger/answer/76315"}, isSubDomainOf("blogger.com")},
{OnlineForm{"Blogger", "https://support.google.com/blogger/answer/76315"}, isSubDomainOf("blogspot.com")},
{OnlineForm{"Google Cloud", "https://support.google.com/code/contact/cloud_platform_report"}, isSubDomainOf("appspot.com")},
{OnlineForm{"Google Cloud", "https://support.google.com/code/contact/cloud_platform_report"}, isSubDomainOf("googleapis.com")},
{OnlineForm{"Blogger", "https://support.google.com/blogger/answer/76315"}, isSubDomainOf("blogger.com", "blogspot.com")},
{OnlineForm{"Google Cloud", "https://support.google.com/code/contact/cloud_platform_report"}, isSubDomainOf("appspot.com", "googleapis.com", "web.app")},
{AbuseEmail{"IBM", "abuse@softlayer.com"}, isSubDomainOf("appdomain.cloud")},
{OnlineForm{"Notion", "https://www.notion.so/Report-inappropriate-content-9feb9f2f9d8c40b1b7d289b155907de0"}, isSubDomainOf("notion.so", "notion.com")},
{OnlineForm{"Weebly", "https://www.weebly.com/uk/spam"}, isSubDomainOf("weebly.com")},
{OnlineForm{"Yola", "https://helpcenter.yola.com/hc/en-us/requests/new?ticket_form_id=360001504300"}, isSubDomainOf("yolasite.com")},
}

func isSubDomainOf(domain string) func(string) bool {
func isSubDomainOf(domains ...string) func(string) bool {
return func(abusiveDomain string) bool {
return abusiveDomain == domain || strings.HasSuffix(abusiveDomain, "."+domain)
for _, domain := range domains {
if abusiveDomain == domain || strings.HasSuffix(abusiveDomain, "."+domain) {
return true
}
}
return false
}
}
12 changes: 8 additions & 4 deletions matchers/whois_matchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ var whoisMatchers = []matcher{
{OnlineForm{"Namesilo", "https://www.namesilo.com/report_abuse.php or https://new.namesilo.com/phishing_report.php"}, whoisContains("[email protected]")},
{AbuseEmail{"OrangeWebsite", "[email protected]"}, whoisContains("[email protected]")},
{OnlineForm{"PublicDomainRegistry", "https://publicdomainregistry.com/process-for-handling-abuse/"}, whoisContains("[email protected]")},
{OnlineForm{"Tucows", "https://tucowsdomains.com/report-abuse/"}, whoisContains("[email protected]")},
{OnlineForm{"Tucows", "https://tucowsdomains.com/report-abuse/"}, whoisContains("[email protected]")},
{OnlineForm{"Tucows", "https://tucowsdomains.com/report-abuse/"}, whoisContains("[email protected]", "[email protected]")},
}

func whoisContains(contents string) func(string) bool {
func whoisContains(needles ...string) func(string) bool {
return func(whois string) bool {
return strings.Contains(whois, contents)
for _, needle := range needles {
if strings.Contains(whois, needle) {
return true
}
}
return false
}
}

Expand Down

0 comments on commit 9892d51

Please sign in to comment.