mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-02 11:36:22 +01:00
fix getenv for missing environment variables
This commit is contained in:
parent
25ed0159d4
commit
c14e1e7bfe
@ -22,10 +22,12 @@ public class stdapi_sys_config_getenv implements Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String envVal = System.getenv(envVar);
|
String envVal = System.getenv(envVar);
|
||||||
TLVPacket grp = new TLVPacket();
|
if (envVal != null) {
|
||||||
grp.add(TLVType.TLV_TYPE_ENV_VARIABLE, envVar);
|
TLVPacket grp = new TLVPacket();
|
||||||
grp.add(TLVType.TLV_TYPE_ENV_VALUE, envVal);
|
grp.add(TLVType.TLV_TYPE_ENV_VARIABLE, envVar);
|
||||||
response.addOverflow(TLVType.TLV_TYPE_ENV_GROUP, grp);
|
grp.add(TLVType.TLV_TYPE_ENV_VALUE, envVal);
|
||||||
|
response.addOverflow(TLVType.TLV_TYPE_ENV_GROUP, grp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
Map<String,String> envVals = System.getenv();
|
Map<String,String> envVals = System.getenv();
|
||||||
|
Loading…
Reference in New Issue
Block a user