merging
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
package org.owasp.webgoat.plugin;
|
||||
|
||||
import org.owasp.webgoat.endpoints.AssignmentEndpoint;
|
||||
import org.owasp.webgoat.endpoints.AssignmentHints;
|
||||
import org.owasp.webgoat.endpoints.AssignmentPath;
|
||||
import org.owasp.webgoat.lessons.AttackResult;
|
||||
import org.owasp.webgoat.assignments.AssignmentEndpoint;
|
||||
import org.owasp.webgoat.assignments.AssignmentPath;
|
||||
import org.owasp.webgoat.assignments.AttackResult;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -49,11 +47,12 @@ import java.io.IOException;
|
||||
public class HttpBasicsInterceptRequest extends AssignmentEndpoint {
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
public @ResponseBody AttackResult completed(HttpServletRequest request) throws IOException {
|
||||
public @ResponseBody
|
||||
AttackResult completed(HttpServletRequest request) throws IOException {
|
||||
if (request.getHeader("x-request-intercepted").toLowerCase().equals("true") && request.getParameter("changeMe").equals("Requests are tampered easily")) {
|
||||
return trackProgress(AttackResult.success("Well done, you tampered the request as expected"));
|
||||
return trackProgress(success().feedback("http-proxies.intercept.success").build());
|
||||
} else {
|
||||
return trackProgress(AttackResult.failed("Please try again. Make sure to make all the changes. And case sensitivity may matter ... or not, you never know!"));
|
||||
return trackProgress(failed().feedback("http-proxies.intercept.failure").build());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +1,4 @@
|
||||
http-basics.EnterYourName=Enter your Name
|
||||
http-basics.Go!=Go!
|
||||
http-proxies.title=HTTP Proxies
|
||||
|
||||
|
||||
http-basics.hints.http_basics_lesson.1=Type in your name and press 'go'
|
||||
http-basics.hints.http_basic_quiz.1=Turn on Show Parameters or other features
|
||||
http-basics.hints.http_basic_quiz.2=Try to intercept the request with <a href='https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project' title='Link to ZAP'>OWASP ZAP</a>
|
||||
|
||||
|
||||
http-basics.reversed=The server has reversed your name: {0}
|
||||
|
||||
http-basics.close=You are close, try again: {0}
|
||||
http-basics.incorrect=the HTTP Command is incorrect.
|
||||
http-basics.magic=the magic number is incorrect.
|
||||
http-proxies.intercept.success=Well done, you tampered the request as expected
|
||||
http-proxies.intercept.failure=Please try again. Make sure to make all the changes. And case sensitivity may matter ... or not, you never know!
|
Reference in New Issue
Block a user