Exploit databaseDownload repository ZIP
GH-5d29f404c63d8ecd3e3deb091f4e6d1d
agilevatester/strutssecurity
Sources for CVE-2023-50164
18 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files1
agilevatester/strutssecurityRevision ba082b527b08
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
S2-001/src/com/demo/action/LoginAction.java
Java · 911 bytes/**
* Login Appplicatin to demonstrate Struts2 framework vulnerability to S2--001
*/
package com.demo.action;
import com.opensymphony.xwork2.ActionSupport;
public class LoginAction
extends ActionSupport {
private String username = null;
private String password = null;
public String getUsername() {
return this.username;
}
public String getPassword() {
return this.password;
}
public void setUsername(String username) {
this.username = username;
}
public void setPassword(String password) {
this.password = password;
}
public String execute() throws Exception {
if (this.username.isEmpty() || this.password.isEmpty()) {
return "error";
}
if (this.username.equalsIgnoreCase("admin") && this.password.equals("admin")) {
return "success";
}
return "error";
}
}