r/ProgrammingLanguages • u/Xaneris47 • May 08 '26
Making your own programming language is easier than you think (but also harder)
https://lisyarus.github.io/blog/posts/making-your-own-programming-language.htmlA solid and surprisingly practical article for a game/modding environment. Detailed write-ups like this are rare.
119
Upvotes
View all comments
Show parent comment
10
u/birdbrainswagtrain May 09 '26 edited May 10 '26
Sandboxing Lua is easy on the surface but there are a couple of foot guns. It's been a while but here are some that I remember, mostly from Garry's Mod:
packagelibrary (package.loadlib) can be used to load arbitrary binaries. I figured out how to abuse this when the Binding of Isaac added mod support. Everyone was clamoring about how the issue was that you could upload ".exe" and ".dll" files, meanwhile my PoC loaded the "os" library straight from the Lua binary and used a ".txt" extension for it's own payload.package.loaders.