()
| 19 | } |
| 20 | |
| 21 | func (w *WebFuzzSub) Get() proxy.ProxyList { |
| 22 | resp, err := tool.GetHttpClient().Get(w.Url) |
| 23 | if err != nil { |
| 24 | return nil |
| 25 | } |
| 26 | defer resp.Body.Close() |
| 27 | body, err := ioutil.ReadAll(resp.Body) |
| 28 | if err != nil { |
| 29 | return nil |
| 30 | } |
| 31 | text := string(body) |
| 32 | subUrls := urlRe.FindAllString(text, -1) |
| 33 | result := make(proxy.ProxyList, 0) |
| 34 | for _, url := range subUrls { |
| 35 | result = append(result, (&Subscribe{Url: url}).Get()...) |
| 36 | } |
| 37 | return result |
| 38 | } |
| 39 | |
| 40 | func (w *WebFuzzSub) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup) { |
| 41 | defer wg.Done() |
no test coverage detected