Skip to content

Commit

Permalink
resolved comments for validation of ssrf hit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark2307 committed Mar 16, 2024
1 parent 3cc855a commit c84dd28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/testing/src/main/java/com/akto/test_editor/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ public static Boolean sendRequestToSsrfServer(String url){
if(!(url.startsWith("http"))){
requestUrl = "http://ssrf.akto.io/validate/" + url;
}

Request request = new Request.Builder()
.url(requestUrl)
.get()
Expand All @@ -676,7 +676,9 @@ public static Boolean sendRequestToSsrfServer(String url){
if (!okResponse.isSuccessful()) {
return false;
}else{
return okResponse.code() == 202;
ResponseBody responseBody = okResponse.body();
BasicDBObject bd = BasicDBObject.parse(responseBody.string());
return bd.getBoolean("url-hit");
}
}catch (Exception e){
return false;
Expand Down

0 comments on commit c84dd28

Please sign in to comment.