MCPcopy Create free account
hub / github.com/c0ny1/captcha-killer / identifyCaptcha

Method identifyCaptcha

src/main/java/ui/GUI.java:778–795  ·  view source on GitHub ↗
(String url,String raw,byte[] byteImg,int type,String pattern)

Source from the content-addressed store, hash-verified

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;

Callers 1

doInBackgroundMethod · 0.95

Calls 8

setImageMethod · 0.95
setReqRawMethod · 0.95
getRawMethod · 0.95
doReustMethod · 0.95
setRsqRawMethod · 0.95
matchMethod · 0.95
setResultMethod · 0.95
getResultMethod · 0.95

Tested by

no test coverage detected