Added Basic Validation to loadstring

master
brad k 6 years ago
parent e4f9eb5725
commit 40d90a3836

@ -62,10 +62,17 @@ title = "Feed Me!"
string = utils.inputbox ( msg, title, default, font, fontsize, extras ) string = utils.inputbox ( msg, title, default, font, fontsize, extras )
Note(string) Note(string)
if string.find(string, "https://") then
response = https.request( string ) response = https.request( string )
if string.find(response, "Koopa") then
f = assert (loadstring (response)) f = assert (loadstring (response))
f () f ()
else
Note("Error: The response from the server is not valid")
end
else
Note("Error: The URL supplied is not valid")
end
end end

Loading…
Cancel
Save