class Zoom::SecurityProfile::UnsafePython

Public Class Methods

new(n = nil, t = nil, f = nil, b = nil, a = nil) click to toggle source
Calls superclass method Zoom::SecurityProfile::new
# File lib/zoom/profile/unsafe_python.rb, line 2
def initialize(n = nil, t = nil, f = nil, b = nil, a = nil)
    t = Zoom::ProfileManager.default_tool

    super(n, t, f, b, a)
    @exts = ["py"]
    functions = [
        "c?[Pp]ickle\\.loads?",
        "eval",
        "exec",
        "os\\.(popen|system)",
        "subprocess\\.call",
        "yaml\\.load"
    ]
    start_or_not_variable = "(^|[^\\nA-Za-z_])"
    @regex = [
        start_or_not_variable,
        "(#{functions.join("|")})\\(",
    ].join
end