injectlaunch.lua 584 B

1234567891011121314151617181920
  1. if not _P then
  2. print[[
  3. This file is examples to show how to inject code into lua service.
  4. It is used to inject into launcher service to change the command.LAUNCH to command.LOGLAUNCH.
  5. telnet the debug_console service (nc 127.0.0.1 8000), and run:
  6. inject 3 examples/injectlaunch.lua -- 3 means launcher service
  7. ]]
  8. return
  9. end
  10. local command = _P.lua.command
  11. if command.RAWLAUNCH then
  12. command.LAUNCH, command.RAWLAUNCH = command.RAWLAUNCH
  13. print "restore command.LAUNCH"
  14. else
  15. command.RAWLAUNCH = command.LAUNCH
  16. command.LAUNCH = command.LOGLAUNCH
  17. print "replace command.LAUNCH"
  18. end