Decrypting Lua Bytecode Error - lua

When I try to decrypt this bytecode:
local crypt = '27\76\117\97\83\0\25\147\13\10\26\10\4\8\4\8\8\120\86\0\0\0\0\0\0\0\0\0\0\0\40\119\64\1\255\201\207\1\0\0\0\0\0\108\105\110\101\108\101\110\103\116\104\32\61\32\49\48\48\48\32\45\45\72\111\119\32\108\111\110\103\32\121\111\117\32\119\97\110\116\32\101\97\99\104\32\108\105\110\101\32\111\102\32\111\98\102\117\115\99\97\116\101\100\32\99\104\97\114\97\99\116\101\114\115\32\116\111\32\98\101\46\13\10\45\45\73\102\32\116\104\101\32\115\99\114\105\112\116\32\105\115\32\116\111\111\32\108\111\110\103\32\119\104\101\114\101\32\116\104\101\32\111\117\116\112\117\116\32\115\97\121\115\32\34\109\101\115\115\97\103\101\115\32\100\105\115\99\97\114\100\101\100\34\32\116\104\101\110\32\99\104\97\110\103\101\32\116\104\101\32\110\117\109\98\101\114\32\116\111\32\52\48\48\32\111\114\32\49\48\48\48\44\32\101\116\99\46\13\10\97\32\61\32\115\116\114\105\110\103\46\100\117\109\112\40\102\117\110\99\116\105\111\110\40\41\13\10\13\10\108\111\99\97\108\32\99\111\100\101\32\61\32\39\92\50\55\92\55\54\92\49\ 49\55\92\57\55\92\56\49\92\48\92\49\92\52\92\52\92\52\92\56\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\48\92\50\92\53\92\54\49\92\49\92\48\92\48\92\53\92\54\52\92\48\92\48\92\50\56\92\49\50\56\92\49\50\56\92\48\92\54\92\49\50\56\92\54\52\92\48\92\55\92\48\92\48\92\48\92\53\92\49\57\50\92\48\92\48\92\54\92\48\92\54\53\92\48\92\54\92\54\52\92\54\53\92\48\92\57\92\49\57\50\92\54\53\92\49\51\49\92\53\92\49\57\50\92\48\92\48\92\54\92\48\92\54\54\92\48\92\54\57\92\49\57\50\92\48\92\48\92\55\48\92\49\50\56\92\49\57\52\92\48\92\55\48\92\54\52\92\49\57\52\92\48\92\57\92\54\52\92\49\50\56\92\49\51\50\92\53\92\49\57\50\92\48\92\48\92\54\92\49\57\50\92\54\54\92\48\92\54\57\92\49\57\50\92\48\92\48\92\55\48\92\48\92\49\57\53\92\48\92\55\48\92\54\52\92\49\57\52\92\48\92\57\'
I get the following error: "unfinished string near 27LuaS". How can I fix this?

Add one \ at the beginning of the string
Remove the \ at the end of the string
Remove a line break in the middle of the string
The program then runs. If you write that string to a file, then you'll get truncated Lua 5.3 bytecode. It seems that your original script is incomplete.

Related

Lua is throwing error when Vim keymap includes "\"

I am recently migrating from vimscript to lua with Nvim. While converting the keymappings, I ran into a problem with the following keymap:
[ init.vim ]
tmap <leader>e <C-\><C-n>
[ init.lua ] ( error )
map('t','<leader>e','<C-\><C-n>')
Whenever I reload with above keymap, Nvim will throw the following error:
I'm assuming that "\" might be the problem. If so, how do I refactor the keymap properly for it to work? Any feedback will be greatly appreciated.
It is most likely as the \ is used to escape special characters in the string. Try putting
map('t','<leader>e','<C-\\><C-n>')
This way you are telling Lua that you want the backslash character and not some other special character.

Doesn’t look like a character based (Bytes Are All You Need) model (DeepSpeech)

I have been following DeepSpeech documentation in order to build my own scorer. After implementing this blocks of code
cd data/lm
python3 generate_lm.py --input_txt vocabulary.txt --output_dir .
–top_k 1500 --kenlm_bins path/to/kenlm/build/bin/
–arpa_order 3 --max_arpa_memory “50%” --arpa_prune “0|0|1”
–binary_a_bits 255 --binary_q_bits 8 --binary_type trie
curl -LO http://github.com/mozilla/DeepSpeech/releases/…
tar xvf native_client.*.tar.xz
./generate_scorer_package --alphabet …/alphabet.txt --lm lm.binary --vocab vocab-1500.txt
–package kenlm.scorer --default_alpha 0.931289039105002 --default_beta 1.1834137581510284
I get the following errors:
Doesn’t look like a character based (Bytes Are All You Need) model.
–force_bytes_output_mode was not specified, using value infered from vocabulary contents: false
Error: Can’t parse scorer file, invalid header. Try updating your scorer file.
Error loading language model file: Invalid magic in trie header.
I want to mention that I use a different alphabet that also contains other characters besides english characters.
This error is usually encountered with non-English alphabets. You can overcome the error by using the --force_bytes_output_mode parameter when calling generate_scorer_package. I pushed a change to the PlayBook this morning which covers this error.

How do I solve the "attempt to call a table value" runtime error on lua?

I'm working on a lua script to convert IO Link data into MQTT. When I debugged the script, I got following runtime error on the function client:register :
Runtime error: attempt to call a table value (global 'string')
I understood that out of the 3 parameters needed, the eventname has to be in string. Coming from Java, I tried converting it directly in the function. It looks like this:
client:register( deviceHandle, string(IOhandleOnDisconnected) , IOhandleOnDisconnected )
It still does not work though.
Does anybody have an idea how to fix this?
Greetings.
string is Lua's standard library for string manipulation. It is a Lua table which cannot be called as you did in string(IOhandleOnDisconnected)

SearchIO.parse xml blast and ampersands cElementTree.ParseError: not well-formed (invalid token) error

I would like some advice to work around an xml parsing error. In my BLAST xml output, I have a description that has an '&' character which is throwing off the SearchIO.parse function.
If I run
qresults=SearchIO.parse(PLAST_output,"blast-xml")
for record in qresults:
#do some stuff
I get the following error:
cElementTree.ParseError: not well-formed (invalid token): line 13701986, column 30
Which directs me to the this line:
<Hit_def>Lysosomal & prostatic acid phosphatases [Xanthophyllomyces dendrorhous</Hit_def>
Is there a way to override this in biopython so I do not have to change my xml file? Right now, I'm just doing a 'Try/Except' loop, but that is not optimal!
Thanks for your help!
Courtney

Idl readcol function, using delimeter without syntax error

Im trying to use idl to read a file, so im using the readcol command. However, in my file i use | as a delimiter, but continually get syntax errors. Heres my latest attempt:
readcol,'kcorrins.txt',uband, gband, rband, iband, zband, $
ubanderr, gbanerr, rbanderr, ibanderr, zbanderr, adjredshift, $
SKIPLINE=1, DELIMITER=|
could someone post an example of the proper syntax for using the delimiter in this way?
You need to quote the delimiter:
readcol,'kcorrins.txt',uband, gband, rband, iband, zband, $
ubanderr, gbanerr, rbanderr, ibanderr, zbanderr, adjredshift, $
SKIPLINE=1, DELIMITER='|'

Resources