Skip to content

Commit 3cbeebe

Browse files
committed
Rename env_ variable to be more accurately named
1 parent c4b3ba0 commit 3cbeebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/post/windows/powershell.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ def stage_cmd_env(compressed_script, env_suffix = Rex::Text.rand_text_alpha(8))
127127
count = 8000
128128
while index < compressed_script.size - 1
129129
# Define random, but serialized variable name
130-
env_prefix = format("%05d%s", ((index + 8000) / 8000), env_suffix)
130+
env_variable = format("%05d%s", ((index + 8000) / 8000), env_suffix)
131131

132132
# Create chunk
133133
chunk = compressed_script[index, count]
134134

135135
# Build the set commands
136136
set_env_variable = "[Environment]::SetEnvironmentVariable(" \
137-
"'#{env_prefix}'," \
137+
"'#{env_variable}'," \
138138
"'#{chunk}', 'User')"
139139

140140
# Compress and encode the set command

0 commit comments

Comments
 (0)