forked from Firebasky/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStruts001.java
More file actions
38 lines (30 loc) · 858 Bytes
/
Struts001.java
File metadata and controls
38 lines (30 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.vulhub.struts;
import com.opensymphony.xwork2.ActionSupport;
public class Struts001 extends ActionSupport {
private String username;
private String password;
@Override
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";
}
public void setPassword(String password) {
this.password = "%{1+1}";
}
public String getPassword() {
return password;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}