GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Test GetTor's distribution URLs.

parent 9ff32932
......@@ -69,8 +69,12 @@ var domains = map[string]map[string]bool{
// Websites and a string that's meant to be in the website's body.
var websites = map[string]string{
"https://bridges.torproject.org": "The Tor Project",
"https://torproject.org": "Tor Browser",
"https://gettor.torproject.org": "GetTor",
"https://ajax.aspnetcdn.com": "Microsoft Ajax Content Delivery Network",
"https://bridges.torproject.org": "The Tor Project",
"https://torproject.org": "Tor Browser",
"https://gettor.torproject.org": "GetTor",
"https://ajax.aspnetcdn.com": "Microsoft Ajax Content Delivery Network",
"https://archive.org/details/@gettor": "torbrowser-install",
"https://drive.google.com/drive/folders/13CADQTsCwrGsIID09YQbNz2DfRMUoxUU": "tor-browser-linux",
"https://github.com/torproject/torbrowser-releases/": "GetTor",
"https://gitlab.com/thetorproject/torbrowser-windows": "torbrowser",
}
......@@ -6,6 +6,7 @@ import (
"io/ioutil"
"net"
"net/http"
"net/url"
"strings"
"time"
)
......@@ -66,14 +67,20 @@ func DoesDomainResolve(domain string, expected map[string]bool) error {
return nil
}
func DoesWebsiteContainStr(domain, substring string) (r Result) {
func DoesWebsiteContainStr(rawurl, substring string) (r Result) {
defer func(s time.Time) {
r.ExecutionTime = time.Since(s)
}(time.Now())
r.Target = domain
resp, err := http.Get(domain)
u, err := url.Parse(rawurl)
if err == nil {
r.Target = u.Host
} else {
r.Target = rawurl
}
resp, err := http.Get(rawurl)
if err != nil {
r.Error = err
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment