mirror of
https://github.com/byt3bl33d3r/OffensiveDLR
synced 2026-06-06 15:24:29 +00:00
Update Invoke-Boolang.ps1
This commit is contained in:
+10
-12
@@ -24,24 +24,12 @@ vH0HfJRF+v/MvJvdzW4CbMpuIEBCCSyhBQiwJIGEZkGwYCEBC1UBlcUEEAiL9BAICIiKqKiIDVE5KyBn
|
|||||||
$DeflatedStream.Read($UncompressedFileBytes, 0, 1900000) | Out-Null
|
$DeflatedStream.Read($UncompressedFileBytes, 0, 1900000) | Out-Null
|
||||||
return [Reflection.Assembly]::Load($UncompressedFileBytes)
|
return [Reflection.Assembly]::Load($UncompressedFileBytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
$BooSource = @'
|
|
||||||
import System
|
|
||||||
|
|
||||||
public static def Main():
|
|
||||||
print "Hello from BooLang!"
|
|
||||||
'@
|
|
||||||
|
|
||||||
$BooLangAsm = Load-Assembly($BooLangDLL)
|
$BooLangAsm = Load-Assembly($BooLangDLL)
|
||||||
$BooLangExtensionsAsm = Load-Assembly($BoolangExtensionsDLL)
|
$BooLangExtensionsAsm = Load-Assembly($BoolangExtensionsDLL)
|
||||||
$BooLangCompilerAsm = Load-Assembly($BooLangCompilerDLL)
|
$BooLangCompilerAsm = Load-Assembly($BooLangCompilerDLL)
|
||||||
$BooLangParserAsm = Load-Assembly($BooLangParserDLL)
|
$BooLangParserAsm = Load-Assembly($BooLangParserDLL)
|
||||||
|
|
||||||
|
|
||||||
$scriptinput = [Boo.Lang.Compiler.IO.StringInput]::new("MyScript.boo", $BooSource)
|
|
||||||
|
|
||||||
Write-Output "Compiling..."
|
|
||||||
|
|
||||||
<#
|
<#
|
||||||
There seems to be a bunch of bugs in Boo's internal assembly resolution logic.
|
There seems to be a bunch of bugs in Boo's internal assembly resolution logic.
|
||||||
|
|
||||||
@@ -66,6 +54,14 @@ public static def Main():
|
|||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
|
$BooSource = @'
|
||||||
|
import System
|
||||||
|
|
||||||
|
public static def Main():
|
||||||
|
print "Hello from BooLang!"
|
||||||
|
'@
|
||||||
|
|
||||||
|
$scriptinput = [Boo.Lang.Compiler.IO.StringInput]::new("MyScript.boo", $BooSource)
|
||||||
|
|
||||||
#Passing $false to the constructor tells Boo to not automatically reference default assemblies
|
#Passing $false to the constructor tells Boo to not automatically reference default assemblies
|
||||||
$parameters = [Boo.Lang.Compiler.CompilerParameters]::new($false)
|
$parameters = [Boo.Lang.Compiler.CompilerParameters]::new($false)
|
||||||
@@ -87,6 +83,8 @@ public static def Main():
|
|||||||
#Write-Output $parameters.References
|
#Write-Output $parameters.References
|
||||||
|
|
||||||
$compiler = [Boo.Lang.Compiler.BooCompiler]::new($parameters)
|
$compiler = [Boo.Lang.Compiler.BooCompiler]::new($parameters)
|
||||||
|
|
||||||
|
Write-Output "Compiling..."
|
||||||
$context = $compiler.Run()
|
$context = $compiler.Run()
|
||||||
|
|
||||||
if ($context.GeneratedAssembly -ne $null)
|
if ($context.GeneratedAssembly -ne $null)
|
||||||
|
|||||||
Reference in New Issue
Block a user