This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jamie Hankins's profile picture

[LUA][QUESTION] What is this code?

Started by Jamie Hankins, 28 August 2012 - 08:05 AM
Jamie Hankins #1
Posted 28 August 2012 - 10:05 AM
I found this on my server and I'm wondering what it does and what effects it has. I need to know before I punish the person who placed it


fs = nil
_G = nil
term = nil
while true do
  math.randomseed(os.time())
  print(string.char(math.random(1,255)))
end
FuzzyPurp #2
Posted 28 August 2012 - 10:15 AM
slick lil malicious code..
Jamie Hankins #3
Posted 28 August 2012 - 10:52 AM
What does it actually do though?
Kingdaro #4
Posted 28 August 2012 - 10:52 AM
It destroys some APIs and prints a bunch of random garbage.

Only on that computer though.
ardera #5
Posted 28 August 2012 - 10:54 AM
it deletes the fs API, and the term API, Im not sure but I think you cant delete the _G (global) table so the second line does nothing, and a bit stupid is, that he tries to delete the global table and then tries to call an function from the global table. Im sure the Coder is a noob ^^
Jamie Hankins #6
Posted 28 August 2012 - 11:16 AM
Should I ban him then?
FuzzyPurp #7
Posted 28 August 2012 - 11:48 AM
For failing at Cyber warfare? Maybe he's just role-playing a CC-hacker.
And the code doesnt actually delete those apis
Cloudy #8
Posted 28 August 2012 - 12:29 PM
And it would error, at least when trying print - as term API no longer exists. Weird little crap code :D/>/>
ardera #9
Posted 28 August 2012 - 01:01 PM
with delete I mean set to nil…