Skip to content

Instantly share code, notes, and snippets.

@MDFL64
Last active April 21, 2017 01:54
Show Gist options
  • Save MDFL64/72db799faeeadc8b233e0e2a61e4c201 to your computer and use it in GitHub Desktop.
Save MDFL64/72db799faeeadc8b233e0e2a61e4c201 to your computer and use it in GitHub Desktop.
(import lua/basic)
(import lua/string)
(import lua/io)
(let* [(bytecode (lua/string/dump (call lua/basic/_G :loadstring (lua/io/read "*all"))))
(i 1)
(read-string (lambda (len)
(let* [(i' (+ i len))
(res (self bytecode :sub i (- i' 1)))]
(set! i i')
res)))]
(print! (= (read-string 3) "\x1BLJ")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment