mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-24 18:16:24 +01:00
Changes from code review
This commit is contained in:
parent
26eddbb7a3
commit
26d0aa3e8d
@ -68,8 +68,12 @@ public class stdapi_sys_process_execute implements Command {
|
||||
// On Windows, Java quote-escapes _some_ arguments (like those with spaces), but doesn't deal correctly with some
|
||||
// edge cases; e.g. empty strings, strings that already have quotes.
|
||||
protected String escapeArg(String arg) {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
||||
if (arg == "") {
|
||||
if (arg == null) {
|
||||
return null;
|
||||
}
|
||||
String osName = System.getProperty("os.name");
|
||||
if (osName != null && osName.toLowerCase().contains("windows")) {
|
||||
if (arg.equals("")) {
|
||||
return "\"\"";
|
||||
} else {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
Loading…
x
Reference in New Issue
Block a user