Skip to content

Commit 34713a4

Browse files
committed
update: only export variable that startWith ENV_
1 parent 7ee3a29 commit 34713a4

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"properties": {
105105
"weaponized.lhost": {
106106
"type": "string",
107-
"default": "${LHOST}",
107+
"default": "$LHOST",
108108
"description": "This is the LHOST setting for weaponized vscode extension. it's for receive reverse shell or prompt reverse links."
109109
},
110110
"weaponized.lport": {

src/model/host.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ export class Host {
7171
collects[`TARGET`] = this.hostname;
7272
}
7373
for (let key in this.props) {
74-
collects[`${envVarSafer(key)}`] = this.props[key];
74+
if (key.startsWith("ENV_")) {
75+
let realkey = key.replace("ENV_", "");
76+
collects[`${envVarSafer(realkey)}`] = this.props[key];
77+
}
78+
// collects[`${envVarSafer(key)}`] = this.props[key];
7579
}
7680
return collects;
7781
}

src/model/user.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ export class UserCredential {
8181

8282
if (this.props) {
8383
for (let key in this.props) {
84-
collects[`${envVarSafer(key)}`] = this.props[key];
84+
if (key.startsWith("ENV_")) {
85+
let realkey = key.replace("ENV_", "");
86+
collects[`${envVarSafer(realkey)}`] = this.props[key];
87+
}
88+
// collects[`${envVarSafer(key)}`] = this.props[key];
8589
}
8690
}
8791
return collects;

0 commit comments

Comments
 (0)