Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人知道如何阻止/禁用 ruby exec 命令吗?在 ruby 中执行 shell 命令的命令有 3 个:exec、system和%x()or ``。我想阻止/禁用这些命令。
exec
system
%x()
``
试试这个:
module Kernel remove_method :exec remove_method :system remove_method :` end
它重新打开Kernel模块并删除execandsystem方法。
Kernel