| 776 | |
| 777 | |
| 778 | public static CaptchaEntity identifyCaptcha(String url,String raw,byte[] byteImg,int type,String pattern){ |
| 779 | CaptchaEntity cap = new CaptchaEntity(); |
| 780 | cap.setImage(byteImg); |
| 781 | HttpClient http = new HttpClient(url, raw, byteImg); |
| 782 | cap.setReqRaw(http.getRaw().getBytes()); |
| 783 | byte[] rsp = http.doReust(); |
| 784 | cap.setRsqRaw(rsp);; |
| 785 | String rspRaw = new String(rsp); |
| 786 | |
| 787 | Rule rule = new Rule(type,pattern); |
| 788 | MatchResult result = RuleMannager.match(rspRaw, rule); |
| 789 | cap.setResult(result.getResult()); |
| 790 | //排查请求速度过快可能会导致 |
| 791 | BurpExtender.stdout.println("---------------------------------------------"); |
| 792 | BurpExtender.stdout.println(rspRaw); |
| 793 | BurpExtender.stdout.println("[+] res = " + result.getResult()); |
| 794 | return cap; |
| 795 | } |
| 796 | |
| 797 | public class IdentifyCaptchaThread extends Thread{ |
| 798 | private String url; |