29 lines
546 B
Go
29 lines
546 B
Go
package checks
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"log"
|
|
)
|
|
|
|
func (c *Checks) CheckEnv(domain string) {
|
|
url := "https://" + domain + "/.env"
|
|
res, err := c.get(url)
|
|
if err != nil {
|
|
//log.Println(domain + " error: " + err.Error())
|
|
return
|
|
}
|
|
|
|
bbody, err := ioutil.ReadAll(res.Body)
|
|
if err != nil {
|
|
//log.Println(domain + " read error: " + err.Error())
|
|
return
|
|
}
|
|
|
|
body := string(bbody)
|
|
|
|
contentType := res.Header.Get("Content-Type")
|
|
if contentType == "" {
|
|
c.Message("znalazło debila\n" + url + "\n\n" + body)
|
|
log.Println("DEBIL " + url)
|
|
}
|
|
}
|