Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added korean translation #427

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
Expand Down
11 changes: 11 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
arguments=--init-script C\:\\Users\\chan0\\AppData\\Local\\Temp\\d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script C\:\\Users\\chan0\\AppData\\Local\\Temp\\52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle --init-script C\:\\Users\\chan0\\AppData\\Local\\Temp\\bd95fba452cd16942039615189e617a1932f63d661f1f661840274c40bc05cbb.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=C\:/Program Files/Eclipse Foundation/jdk-11.0.12.7-hotspot
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
package org.sasanlabs.service.vulnerability.sampleVulnerability;

import org.sasanlabs.internal.utility.LevelConstants;
import org.sasanlabs.internal.utility.Variant;
import org.sasanlabs.internal.utility.annotations.AttackVector;
import org.sasanlabs.internal.utility.annotations.VulnerableAppRequestMapping;
import org.sasanlabs.internal.utility.annotations.VulnerableAppRestController;
import org.sasanlabs.service.vulnerability.bean.GenericVulnerabilityResponseBean;
import org.sasanlabs.vulnerability.types.VulnerabilityType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestParam;

/**
* This is a sample vulnerability for helping developers in adding a new Vulnerability for
* VulnerableApp
*
* @author KSASAN [email protected]
*/
/**
* {@code VulnerableAppRestController} annotation is similar to {@link
* org.springframework.stereotype.Controller} Annotation
*/
@VulnerableAppRestController(
/**
* "descriptionLabel" parameter of annotation is i18n label stored in {@link
* /VulnerableApp/src/main/resources/i18n/}. This descriptionLabel
* will be shown in the UI as the description of the Vulnerability. It helps students to
* learn about the vulnerability and can also include some of the useful references etc.
*/
descriptionLabel = "SAMPLE_VULNERABILITY",
/**
* "value" parameter of annotation is used to create the request mapping. e.g. for the below
* parameter value, /VulnerableApp/SampleVulnerability will be created as URI Path.
*/
value = "SampleVulnerability")
public class SampleVulnerability {

/**
* {@code AttackVector} annotation is used to create the Hints section in the User Interface.
* This annotation can be mentioned multiple times in case the same vulnerability level
*/
@AttackVector(
/**
* "vulnerabilityExposed" parameter is used to depict the Vulnerability exposed by the
* level. For example say a level is exposing SQL_INJECTION.
*/
vulnerabilityExposed = VulnerabilityType.SAMPLE_VULNERABILITY,
/**
* "description" parameter of annotation is i18n label stored in {@link
* /VulnerableApp/src/main/resources/i18n/}. This description
* will be shown in the UI as hint to give some indication on how the level is handling
* input to help user to crack the level.
*/
description = "SAMPLE_VULNERABILITY_USER_INPUT_HANDLING_INJECTION",

/**
* "payload" parameter of annotation is i18n label stored in {@link
* /VulnerableApp/src/main/resources/attackvectors/*.properties}. This payload will be
* shown in UI to help users find/exploit the vulnerability
*/
payload = "NOT_APPLICABLE")
/**
* This annotation is similar to {@link RequestMapping} SpringBoot annotation. It will map the
* endpoint to /VulnerableApp/SampleVulnerability/LEVEL_1 where LEVEL_1 is coming from the value
* parameter.
*/
@VulnerableAppRequestMapping(
/**
* "value" parameter is used to map the level to URI path
* /VulnerableApp/SampleVulnerability/${value}.
*/
value = LevelConstants.LEVEL_1,

/**
* "htmlTemplate" is used to load the UI for the level for taking input from the user.
* It points to files in directory
* src/main/resource/static/templates/${VulnerabilityName} e.g.
* src/main/resource/static/templates/SampleVulnerability as ${htmlTemplate}.js,
* ${htmlTemplate}.css, ${htmlTemplate}.html. e.g. in this case it will be:
* src/main/resource/static/templates/SampleVulnerability/LEVEL_1/SampleVulnerability_Level1.js
* etc
*
* <p>CSS, JS and HTML are all loaded to render the UI.
*/
htmlTemplate = "LEVEL_1/SampleVulnerability")
public GenericVulnerabilityResponseBean<String> sampleUnsecuredLevel(@RequestParam("name") String key) {
/** Add Business logic here */
return new GenericVulnerabilityResponseBean<>("Not Implemented", true);
}

/** For secured level there is no need for {@link AttackVector} annotation. */
@VulnerableAppRequestMapping(
value = LevelConstants.LEVEL_2,

// Can reuse the same UI template in case it doesn't change between levels
htmlTemplate = "LEVEL_1/SampleVulnerability",
/**
* "variant" parameter defines whether the level is secure or not and same is depicted
* in the UI as a closed lock and open lock icon. Default value of the variant is
* UNSECURE so in case a secure level is added, please add the variant as {@link
* Variant#SECURE}
*/
variant = Variant.SECURE)
public GenericVulnerabilityResponseBean<String> sampleSecuredLevel(@RequestParam("name") String key) {
/** Add Business logic here */
return new GenericVulnerabilityResponseBean<>("Not Implemented", true);
}
}
Loading