MCPcopy Create free account
hub / github.com/Niiiiko/FastjsonScan4Burp / scan

Method scan

src/main/java/burp/FastjsonScan.java:187–289  ·  view source on GitHub ↗

探测依赖扫描模块 @param iHttpRequestResponse @param mode @return

(IHttpRequestResponse iHttpRequestResponse, String mode)

Source from the content-addressed store, hash-verified

185 * @return
186 */
187 private List<Issus> scan(IHttpRequestResponse iHttpRequestResponse, String mode){
188 FindJsons findJsons = new FindJsons(helpers, iHttpRequestResponse);
189 String url = helpers.analyzeRequest(iHttpRequestResponse).getUrl().toString();
190 String method = helpers.analyzeRequest(iHttpRequestResponse).getMethod();
191 String statusCode = String.valueOf(helpers.analyzeResponse(iHttpRequestResponse.getResponse()).getStatusCode());
192
193 String key = null;
194 BaseScan baseScan = null;
195 int id;
196 // 判断数据包中是否存在json,有则加入到tags中
197 if (!findJsons.isParamsJson().isFlag()&&!findJsons.isContypeJson().isFlag()) {
198 this.tags.getScanQueueTagClass().add(
199 method,
200 method,
201 url,
202 statusCode,
203 "[×] json not find",
204 iHttpRequestResponse);
205 return null;
206 }
207 // 判断数据包中是否存在json,有则加入到tags中
208 if (findJsons.isParamsJson().isFlag()) {
209 // 先添加任务
210 id = this.tags.getScanQueueTagClass().add(
211 method,
212 method,
213 url,
214 statusCode,
215 "find json param.wait for testing.",
216 iHttpRequestResponse);
217 key = findJsons.isParamsJson().getKey();
218 } else if (findJsons.isContypeJson().isFlag()) {
219 // 先添加任务
220 id = this.tags.getScanQueueTagClass().add(
221 method,
222 method,
223 url,
224 statusCode,
225 "find json body. wait for testing.",
226 iHttpRequestResponse);
227 } else {
228 return null;
229 }
230 try {
231 baseScan = ScanFactory.createScan(mode, iHttpRequestResponse, helpers, callbacks,this.tags.getBaseSettingTagClass().isStartBypass(),this.tags.getBaseSettingTagClass().getDnslogName());
232 } catch (Exception e) {
233 this.stdout.println("================模块实例化异常================");
234 this.stdout.println(String.format("异常模块: %s", mode));
235 this.stdout.println(e);
236 this.stdout.println("========================================");
237 }
238 if (baseScan == null) {
239 return null;
240 }
241
242 // 循环调用dnslog,填入payload
243 List<Issus> tabIssues = null;
244 try {

Callers 2

doPassiveScanMethod · 0.95
actionPerformedMethod · 0.80

Calls 15

isParamsJsonMethod · 0.95
isContypeJsonMethod · 0.95
createScanMethod · 0.95
insertPayloadsMethod · 0.95
ResultOutputMethod · 0.95
getUrlMethod · 0.80
getMethodMethod · 0.80
getResponseMethod · 0.80
isFlagMethod · 0.80
addMethod · 0.80
getScanQueueTagClassMethod · 0.80
getKeyMethod · 0.80

Tested by

no test coverage detected