Merge pull request #44 from Ice3man543/unwanted-char-fix

Fix for  < character error
master
Nizamul Rana 2018-05-22 07:29:15 +05:30 committed by GitHub
commit e769c9565e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"errors"
"github.com/Ice3man543/subfinder/libsubfinder/helper"
)
@ -68,6 +69,12 @@ func Query(state *helper.State, ch chan helper.Result) {
return
}
if auth.Response.User.Authentication_token == "" {
result.Error = errors.New("failed to get authentication token")
ch <- result
return
}
data = []byte(`{"query":"pld:` + state.Domain + `", "output":"host", "limit":500}`)
req, err = http.NewRequest("POST", "https://riddler.io/api/search", bytes.NewBuffer(data))