You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 21, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: ScriptModification/Out-EncodedCommand.ps1
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,12 @@ function Out-EncodedCommand
5
5
6
6
Compresses, Base-64 encodes, and generates command-line output for a PowerShell payload script.
7
7
8
-
PowerSploit Function: Out-EncodedCommand
9
-
Author: Matthew Graeber (@mattifestation)
10
-
License: BSD 3-Clause
11
-
Required Dependencies: None
12
-
Optional Dependencies: None
13
-
8
+
PowerSploit Function: Out-EncodedCommand
9
+
Author: Matthew Graeber (@mattifestation)
10
+
License: BSD 3-Clause
11
+
Required Dependencies: None
12
+
Optional Dependencies: None
13
+
14
14
.DESCRIPTION
15
15
16
16
Out-EncodedCommand prepares a PowerShell script such that it can be pasted into a command prompt. The scenario for using this tool is the following: You compromise a machine, have a shell and want to execute a PowerShell script as a payload. This technique eliminates the need for an interactive PowerShell 'shell' and it bypasses any PowerShell execution policies.
@@ -49,13 +49,13 @@ Base-64 encodes the entirety of the output. This is usually unnecessary and effe
powershell -C sal a New-Object;iex(a IO.StreamReader((a IO.Compression.DeflateStream([IO.MemoryStream][Convert]::FromBase64String('Cy/KLEnV9cgvLlFQz0jNycnXUSjPL8pJUVQHAA=='),[IO.Compression.CompressionMode]::Decompress)),[Text.Encoding]::ASCII)).ReadToEnd()
Copy file name to clipboardExpand all lines: ScriptModification/Remove-Comment.ps1
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
-
functionRemove-Comments
1
+
functionRemove-Comment
2
2
{
3
3
<#
4
4
.SYNOPSIS
5
5
6
6
Strips comments and extra whitespace from a script.
7
7
8
-
PowerSploit Function: Remove-Comments
9
-
Author: Matthew Graeber (@mattifestation)
10
-
License: BSD 3-Clause
11
-
Required Dependencies: None
12
-
Optional Dependencies: None
13
-
8
+
PowerSploit Function: Remove-Comment
9
+
Author: Matthew Graeber (@mattifestation)
10
+
License: BSD 3-Clause
11
+
Required Dependencies: None
12
+
Optional Dependencies: None
13
+
14
14
.DESCRIPTION
15
15
16
-
Remove-Comments strips out comments and unnecessary whitespace from a script. This is best used in conjunction with Out-EncodedCommand when the size of the script to be encoded might be too big.
16
+
Remove-Comment strips out comments and unnecessary whitespace from a script. This is best used in conjunction with Out-EncodedCommand when the size of the script to be encoded might be too big.
17
17
18
18
A major portion of this code was taken from the Lee Holmes' Show-ColorizedContent script. You rock, Lee!
19
19
@@ -27,11 +27,11 @@ Specifies the path to your script.
0 commit comments