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
@@ -25,23 +25,11 @@ vH0HfJRF+v/MvJvdzW4CbMpuIEBCCSyhBQiwJIGEZkGwYCEBC1UBlcUEEAiL9BAICIiKqKiIDVE5KyBn
|
||||
return [Reflection.Assembly]::Load($UncompressedFileBytes)
|
||||
}
|
||||
|
||||
$BooSource = @'
|
||||
import System
|
||||
|
||||
public static def Main():
|
||||
print "Hello from BooLang!"
|
||||
'@
|
||||
|
||||
$BooLangAsm = Load-Assembly($BooLangDLL)
|
||||
$BooLangExtensionsAsm = Load-Assembly($BoolangExtensionsDLL)
|
||||
$BooLangCompilerAsm = Load-Assembly($BooLangCompilerDLL)
|
||||
$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.
|
||||
|
||||
@@ -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
|
||||
$parameters = [Boo.Lang.Compiler.CompilerParameters]::new($false)
|
||||
@@ -87,6 +83,8 @@ public static def Main():
|
||||
#Write-Output $parameters.References
|
||||
|
||||
$compiler = [Boo.Lang.Compiler.BooCompiler]::new($parameters)
|
||||
|
||||
Write-Output "Compiling..."
|
||||
$context = $compiler.Run()
|
||||
|
||||
if ($context.GeneratedAssembly -ne $null)
|
||||
|
||||
Reference in New Issue
Block a user