EpicDucksJoin Date: 2009-04-28 Post Count: 2015 |
maliciousscripts = {"Infected", "Anti-Lag""Wildfire"}
maliciousobjects = {"OHAI", "No samurai plzzz", "OH SNAP YOU GOT INFECTED XD XD XD", "IMDOINGITOKSODONTKILLMENOW","Infected","ROFL"}
maliciousclasses = {"Geometry", "Timer"}
hiddenclasses = {"AutoJoint", "BackpackItem", "Feature", "Glue", "HtmlWindow", "JointInstance", "LocalBackpack", "LocalBackpackItem", "MotorFeature", "Mouse", "Rotate", "RotateP", "RotateV", "Snap", "StockSound", "VelocityMotor", "Weld"}
--set these three variables to your liking
local printAll = true
local fullscan = true
local doublescan = true
--set these three variables to your liking
--Type "ScanForViruses(model,0,true)" to scan a model after the initial scan. model should be the model (eg. game.Workspace.Model). Type "ScanForViruses(model,0,false)" to reveal all scripts.
function getAncestry(i)
local s = ""
local p = i.Parent
s = p.Name
while p ~= game do
p = p.Parent
s = p.Name.."."..s
end
return s
end
function Check(i,n,w)
local s = ""
for a = 1, n do
s = s.."- - "
end
if i == nil then return end
if printAll then print(s.."Checking "..i.Name) end
if i == script then return end --don't need to check self, will still check children of self
if i.className == "Script" then
for x = 1, #maliciousscripts do
if i.Name == maliciousscripts[x] then
-- print("Malicious script "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --"Infected" scripts. Do I need to say more?
i:Remove()
return
end
end
if i.Parent ~= nil and w == false then
-- print("Script "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")")
end
end
for x = 1, #maliciousobjects do
if i.Name == maliciousobjects[x] then
-- print("Malicious object "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --Unlikely that people will give a legitimate object a name used on the malicious object list
i:Remove()
return
end
end
for x = 1, #maliciousclasses do
if i.className == maliciousclasses[x] then
-- print("Malicious object "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --unlikely to be useful, likely to be malicious and removed
i:Remove()
return
end
end
for x = 1, #hiddenclasses do
if (hiddenclasses[x] == "Rotate" or hiddenclasses[x] == "Weld" or hiddenclasses[x] == "Snap" or hiddenclasses[x] == "Glue" or hiddenclasses[x] == "Motor" or hiddenclasses[x] == "AutoJoint" or hiddenclasses[x] == "JointInstance" or hiddenclasses[x] == "MotorFeature" or hiddenclasses[x] == "VelocityMotor") and i.Parent == game.JointsService then
--do not notify of these
else
if i.className == hiddenclasses[x] then
-- print("Hidden object "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --not necessarily malicious, but may be. Remove only if you didn't except the object to be in there
end
end
end
end
_G["ScanForViruses"] = function(m,n,w)
local s = ""
for a = 1, n do
s = s.."- - "
end
if m == nil then return end
if m == game.Stats then return end
if m.Name == "GuiRoot" and m.Parent == game then return end
if printAll then print(s.."Scanning children of "..m.Name) end
local c = m:getChildren()
if #c > 0 then
for i = 1,#c do
Check(c[i],n+1,w)
if (c[i] == game.Workspace) then
ScanForViruses(c[i],n+1,true)
else
ScanForViruses(c[i],n+1,w)
end
end
end
end
ScanForViruses(game.Workspace,1,true)
ScanForViruses(game.Players,1,true)
ScanForViruses(game.Lighting,1,true)
ScanForViruses(game.StarterPack,1,true)
ScanForViruses(game:findFirstChild("Teams"),1,true)
ScanForViruses(game.Soundscape,1,true)
--print("QuickScan Complete")
if fullscan then wait(5) ScanForViruses(game,0,false) end
--print("Scan Complete")
if doublescan then ScanForViruses(game,0,false) end
--print("Scan Complete")
put this in a script in yr place then press play and yr done!! |