Readit News logoReadit News
n013 commented on Sandboxed script execution from VBA with support for module system   github.com/ECP-Solutions/... · Posted by u/n013
n013 · 7 days ago
At VBA side the code is clean and highly manageable.

Sub RunModule() Dim eng As New ASF

    ' Set working directory
    eng.InjectVariable "wd", ThisWorkbook.Path
    
    ' Execute module file
    Dim result As Variant
    result = eng.Execute(ThisWorkbook.Path & "\main.vas")
    
    Debug.Print result
End Sub

ASF isn't just a framework, is a modern language that we can run inside VBA.

n013 commented on Hacking VBA to support native scripting runtime with no COM dependencies   github.com/ECP-Solutions/... · Posted by u/n013
mschuster91 · a month ago
I've written my fair share of evil shit in VBA.

But... what is effectively eval() just in VB? Yikes.

n013 · a month ago
Honestly, ASF is literally sandboxed. Objects cannot be injected in the runtime. Also, VBA Expressions is intentionally limited to receive and return VBA strings. So, the system is safe for execute code from (almost) anyone.
n013 commented on Hacking VBA to support native scripting runtime with no COM dependencies   github.com/ECP-Solutions/... · Posted by u/n013
cyanydeez · a month ago
But what if i want to debug my code?
n013 · a month ago
You can inspect the AST in order to debug your code. For syntax highlighting, use tools like Notepad++ (ASF shares most of the syntax with Javascript). Each piece of code is commented, no obscure machine code.
n013 commented on CSV dialect sniffing, potential CleverCSV enhancement   github.com/ws-garcia/CSVs... · Posted by u/n013
n013 · 2 years ago
I found a paper, having a GitHub repository, that describes a new methodology that can be an improvement for the famous CleverCSV Python library.

u/n013

KarmaCake day5February 16, 2024View Original