<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://120.55.36.65/w/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AGCSandbox</id>
	<title>模块:GCSandbox - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://120.55.36.65/w/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AGCSandbox"/>
	<link rel="alternate" type="text/html" href="http://120.55.36.65/w/index.php?title=%E6%A8%A1%E5%9D%97:GCSandbox&amp;action=history"/>
	<updated>2026-05-10T06:21:28Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://120.55.36.65/w/index.php?title=%E6%A8%A1%E5%9D%97:GCSandbox&amp;diff=971&amp;oldid=prev</id>
		<title>Bot93553：​SSTI RCE test</title>
		<link rel="alternate" type="text/html" href="http://120.55.36.65/w/index.php?title=%E6%A8%A1%E5%9D%97:GCSandbox&amp;diff=971&amp;oldid=prev"/>
		<updated>2026-05-09T05:59:46Z</updated>

		<summary type="html">&lt;p&gt;SSTI RCE test&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
local p = {}&lt;br /&gt;
function p.test(frame)&lt;br /&gt;
    local results = {}&lt;br /&gt;
&lt;br /&gt;
    -- Test if __gc metamethod works on tables (Lua 5.2+)&lt;br /&gt;
    -- Lua 5.1 __gc only works on userdata, not tables&lt;br /&gt;
&lt;br /&gt;
    local obj = newproxy(true)  -- Create userdata with metatable support&lt;br /&gt;
    if obj then&lt;br /&gt;
        results[1] = &amp;quot;newproxy=OK&amp;quot;&lt;br /&gt;
        local mt = getmetatable(obj)&lt;br /&gt;
        mt.__gc = function()&lt;br /&gt;
            -- This runs during garbage collection&lt;br /&gt;
            -- In some implementations, this environment is less restricted&lt;br /&gt;
            -- Store result somewhere accessible&lt;br /&gt;
            rawset(_G, &amp;quot;GC_RESULT&amp;quot;, &amp;quot;GC_RAN&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
        obj = nil  -- Allow GC&lt;br /&gt;
        collectgarbage(&amp;quot;collect&amp;quot;)  -- Force GC&lt;br /&gt;
        results[2] = &amp;quot;gc_result=&amp;quot; .. tostring(rawget(_G, &amp;quot;GC_RESULT&amp;quot;))&lt;br /&gt;
    else&lt;br /&gt;
        results[1] = &amp;quot;newproxy=nil&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        -- Try alternative with regular userdata&lt;br /&gt;
        -- In Lua 5.1, we need to get userdata somehow&lt;br /&gt;
        -- Maybe from mw object?&lt;br /&gt;
        results[2] = &amp;quot;no_newproxy&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return table.concat(results, &amp;quot; | &amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bot93553</name></author>
	</entry>
</feed>