MCPcopy Create free account
hub / github.com/1150037361/SpringScan / checkVul

Method checkVul

src/main/java/burp/BurpExtender.java:126–153  ·  view source on GitHub ↗

检测请求的是否满足pauload @param iHttpRequestResponse

(IHttpRequestResponse iHttpRequestResponse)

Source from the content-addressed store, hash-verified

124 * @param iHttpRequestResponse
125 */
126 public void checkVul(IHttpRequestResponse iHttpRequestResponse) {
127 List<String> header = helpers.analyzeRequest(iHttpRequestResponse).getHeaders();
128 List<String> result = bulidUrl(iHttpRequestResponse);
129 if (result == null) {
130 return;
131 }
132 for (String info : result) {
133 header.set(0, info);
134 stdout.println(header.get(0));
135 byte[] newMessage = helpers.buildHttpMessage(header, null);
136 String url = String.valueOf(helpers.analyzeRequest(iHttpRequestResponse.getHttpService(), newMessage).getUrl());
137
138 if (vulTableMode.contiansUrl(url)) {
139 continue;
140 }
141
142 IHttpRequestResponse resp = this.callbacks.makeHttpRequest(iHttpRequestResponse.getHttpService(), newMessage);
143 //判断返回值是否是200
144 if (helpers.analyzeResponse(resp.getResponse()).getStatusCode() == 200) {
145 //判断返回的内容是否符合POC
146 if (isGood(helpers.bytesToString(resp.getResponse()).toLowerCase())) {
147 if (!vulTableMode.contiansUrl(url)) {
148 vulTableMode.addRow(new VulData(url, String.valueOf(helpers.bytesToString(resp.getResponse()).length()), "true", resp));
149 }
150 }
151 }
152 }
153 }
154
155 /**
156 * 返回请求头的第一行即【GET /xxx/xxx HTTP/1.1】这种

Callers 1

runMethod · 0.95

Calls 6

bulidUrlMethod · 0.95
isGoodMethod · 0.95
getHttpServiceMethod · 0.80
getResponseMethod · 0.80
contiansUrlMethod · 0.45
addRowMethod · 0.45

Tested by

no test coverage detected