BishopFox / jsluice

Extract URLs, paths, secrets, and other interesting bits from JavaScript
MIT License
1.43k stars 96 forks source link

Adds flag to skip certificate validation #23

Closed twest-bf closed 10 months ago

twest-bf commented 1 year ago

Details

Adds the option to skip certificate validation when making requests.

func readFromFileOrURL(path string, cookie string, headers []string, ignoreCert bool) ([]byte, error) {
    if strings.HasPrefix(path, "http://") || strings.HasPrefix(path, "https://") {
        client := &http.Client{}

        if ignoreCert {
            client.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}
        }
        ...SNIP...