(String str)
| 121 | return path1; |
| 122 | } |
| 123 | public static String Url(String str){ |
| 124 | ArrayList<String> url = new ArrayList<>(); |
| 125 | String url1 = new String(); |
| 126 | String is_url = "([\"|'](http|https):\\/\\/([\\w.]+\\/?)\\S*?[\"|'])"; |
| 127 | Matcher matcher = Pattern.compile(is_url).matcher(str); |
| 128 | while (matcher.find()){ |
| 129 | url.add(matcher.group()); |
| 130 | } |
| 131 | // 去重代码 |
| 132 | List<String> path_rd = Re.removeDuplicate(url); |
| 133 | for (String s : path_rd){ |
| 134 | url1 += StringUtils.strip(s,"\"'")+'\n'; |
| 135 | } |
| 136 | return url1; |
| 137 | } |
| 138 | // 判断javascript文件 |
| 139 | public static boolean js (String headers,byte[] content){ |
| 140 | if (headers.contains("/javascript")||headers.contains("/x-javascript") ){ |
no test coverage detected