()
| 747 | } |
| 748 | |
| 749 | public void run() { |
| 750 | btnGetCaptcha.setEnabled(false); |
| 751 | //清洗验证码URL |
| 752 | HttpService service = new HttpService(url); |
| 753 | tfURL.setText(service.toString()); |
| 754 | |
| 755 | try { |
| 756 | byte[] byteRes = Util.requestImage(url,raw); |
| 757 | if(Util.isImage(byteRes)){ |
| 758 | byteImg = byteRes; |
| 759 | }else{ |
| 760 | lbImage.setIcon(null); |
| 761 | lbImage.setText("获取到的不是图片文件!"); |
| 762 | lbImage.setForeground(Color.RED); |
| 763 | return; |
| 764 | } |
| 765 | |
| 766 | ImageIcon icon = Util.byte2img(byteImg); |
| 767 | lbImage.setIcon(icon); |
| 768 | lbImage.setText(""); |
| 769 | } catch (Exception e) { |
| 770 | BurpExtender.stderr.println(e.getMessage()); |
| 771 | }finally { |
| 772 | BurpExtender.gui.getBtnGetCaptcha().setEnabled(true); |
| 773 | } |
| 774 | } |
| 775 | } |
| 776 | |
| 777 |
nothing calls this directly
no test coverage detected