MCPcopy Create free account
hub / github.com/f0ng/captcha-killer-modified / run

Method run

src/main/java/ui/GUI.java:996–1036  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

994 }
995
996 @Override
997 public void run() {
998
999 int type = cbmRuleType.getSelectedIndex();
1000 Rule myRule = new Rule(type,tfRegular.getText());
1001
1002 InterfaceRsq.setText("");
1003 //btnIdentify.setEnabled(false);
1004 //清洗接口URL
1005 HttpService service = new HttpService(url);
1006 tfInterfaceURL.setText(service.toString());
1007
1008 HttpClient http = null;
1009 try {
1010 http = new HttpClient(url,raw,byteImg);
1011 } catch (IOException e) {
1012 e.printStackTrace();
1013 }
1014 taInterfaceRawReq.setText(http.getRaw());
1015 byte[] rsp = http.doReust();
1016 String rspRaw = new String(rsp);
1017 InterfaceRsq.setText(rspRaw);
1018 btnIdentify.setEnabled(true);
1019
1020 MatchResult result = RuleMannager.match(rspRaw,myRule);
1021 CaptchaEntity cap = new CaptchaEntity();
1022 cap.setImage(img);
1023 cap.setReqRaw(http.getRaw().getBytes());
1024 cap.setRsqRaw(rsp);
1025 cap.setResult(result.getResult());
1026
1027
1028 gui.cap = result.getResult();
1029 tfcapex.setText(gui.cap);
1030
1031 synchronized (captcha){
1032 int row = captcha.size();
1033 captcha.add(cap);
1034 model.fireTableRowsInserted(row,row);
1035 }
1036 }
1037 }
1038
1039 public class MenuActionManger implements ActionListener {

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected