Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Commit

Permalink
Fix everything unreported :(
Browse files Browse the repository at this point in the history
  • Loading branch information
haccer committed Dec 15, 2018
1 parent 7b76147 commit 33f6132
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 149 deletions.
95 changes: 0 additions & 95 deletions fingerprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"fingerprint": [
"ERROR: The request could not be satisfied"
],
"verify": {
"ssl": true,
"body": "Bad request."
},
"nxdomain": false
},
{
Expand Down Expand Up @@ -123,19 +119,6 @@
],
"nxdomain": false
},
{
"service": "cargo",
"cname": [
"cargocollective.com"
],
"fingerprint": [
"<title>404 &mdash; File not found</title>"
],
"verify": {
"body": "cargocollective.com"
},
"nxdomain": false
},
{
"service": "feedpress",
"cname": [
Expand Down Expand Up @@ -218,45 +201,6 @@
],
"nxdomain": false
},
{
"service": "kajabi",
"cname": [
"endpoint.mykajabi.com"
],
"fingerprint": [
"<h1>The page you were looking for doesn't exist.</h1>"
],
"verify": {
"body": "Use title if it's in the page YAML frontmatter"
},
"nxdomain": false
},
{
"service": "thinkific",
"cname": [
"thinkific.com"
],
"fingerprint": [
"You may have mistyped the address or the page may have moved."
],
"verify": {
"body": "iVBORw0KGgoAAAANSUhEUgAAAf"
},
"nxdomain": false
},
{
"service": "tave",
"cname": [
"clientaccess.tave.com"
],
"fingerprint": [
"<h1>Error 404: Page Not Found</h1>"
],
"verify": {
"body": "tave.com"
},
"nxdomain": false
},
{
"service": "wishpond",
"cname": [
Expand Down Expand Up @@ -320,19 +264,6 @@
],
"nxdomain": false
},
{
"service": "activecampaign",
"cname": [
"activehosted.com"
],
"fingerprint": [
"alt=\"LIGHTTPD - fly light.\""
],
"verify": {
"size": 844
},
"nxdomain": false
},
{
"service": "campaignmonitor",
"cname": [
Expand All @@ -353,19 +284,6 @@
],
"nxdomain": false
},
{
"service": "proposify",
"cname": [
"proposify.biz"
],
"fingerprint": [
"If you need immediate assistance, please contact <a href=\"mailto:[email protected]"
],
"verify": {
"body": "The page you requested was not found."
},
"nxdomain": false
},
{
"service": "simplebooklet",
"cname": [
Expand Down Expand Up @@ -441,19 +359,6 @@
],
"nxdomain": false
},
{
"service": "bitly",
"cname": [
"cname.bitly.com"
],
"fingerprint": [
"Hey There, This Is A Branded Short Domain."
],
"verify": {
"cname": true
},
"nxdomain": false
},
{
"service": "maxcdn",
"cname": [
Expand Down
54 changes: 0 additions & 54 deletions subjack/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@ import (
"github.com/haccer/available"
)

type Verify struct {
Body string `json:"body"`
Size int `json:"size"`
Ssl bool `json:"ssl"`
Cname bool `json:"cname"`
}

type Fingerprints struct {
Service string `json:"service"`
Cname []string `json:"cname"`
Fingerprint []string `json:"fingerprint"`
Nxdomain bool `json:"nxdomain"`
Checks Verify `json:"verify"`
}

/*
Expand Down Expand Up @@ -132,52 +124,6 @@ IDENTIFY:
break
}
}

/* This next section is for if we need to do a
* 2nd verification check defined in the config. */

/* Double check for another fingerprint in response
* Or check if requesting with HTTPS has a similar
* response */
if fingerprints[f].Checks.Body != "" {
if !bytes.Contains(body, []byte(fingerprints[f].Checks.Body)) {
service = ""
}

if fingerprints[f].Checks.Ssl {
if !forceSSL {
bd := https(subdomain, forceSSL, timeout)
if len(bd) != 0 && !bytes.Contains(body, []byte(fingerprints[f].Checks.Body)) {
service = ""
}
}
}
}

// Check if response matches fingerprinted length.
if fingerprints[f].Checks.Size != 0 {
if len(body) != fingerprints[f].Checks.Size {
service = ""
}
}

/* For now this just checks whether a CNAME is actually attached.
* Was having some issues using strings.Contains(cname, fingerprints[f].Cname[0])
*/
if fingerprints[f].Checks.Cname {
if cname == "" {
service = ""
}
}

/* This is for special cases when the body == 0, and the CNAME must match the exact CNAME
* Bitly uses this */
if len(body) == 0 && fingerprints[f].Checks.Cname && cname == fingerprints[f].Cname[0]+"." {
service = strings.ToUpper(fingerprints[f].Service)
} else if len(body) == 0 && fingerprints[f].Checks.Cname && cname != fingerprints[f].Cname[0]+"." {
service = ""
}

}

return service
Expand Down

0 comments on commit 33f6132

Please sign in to comment.