Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-5

Anti-Virus Script infected?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I got this when I tried to test my place recently. it was stated as a problem, and it looked like one: I have no Idea what to do with it, or how to fix it.

maliciousscripts = {"Infected", "Anti-Lag"} maliciousobjects = {"OHAI", "No samurai plzzz", "OH SNAP YOU GOT INFECTED XD XD XD", "IMDOINGITOKSODONTKILLMENOW"} 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 = false local fullscan = true local doublescan = false --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")

1
Put it in a Code Block. Also, it's recommended to put your own scripts up for debugging. To help us out, tell us what the output is. It's better to go in-game and press F9 to view the Server Console. Shawnyg 4330 — 9y

1 answer

Log in to vote
0
Answered by
OniiCh_n 410 Moderation Voter
9 years ago

Look through all the objects in Workspace; especially any free models. There's most likely an object with this spam code in it.

Ad

Answer this question