1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 01 April 2015 - 09:55 PM
I made a small, neat little program that will scramble someone's shell aliases. So "edit" might actually be clear, clear might be programs, or bg might be fg! It's a harmless prank, and does NOT brick their computer! Once they realize what's going on, they can use /rom/programs/edit, for example, to fix it.
Prank your friends!
It works by creating a new directory, going into that directory, then checking for programs. Then, it shell.resolveProgram 's the aliases, to get a list of what programs they are (for example: cd would be "/rom/programs/cd"). Then, it goes through the list of aliases and puts a random path for it. So, cd might be "/rom/programs/list" now.
To get it:
pastebin get
248wWNJr startup
This doesn't count as malicious, right? Like I said, they can just call the programs from ROM.
Edited on 01 April 2015 - 07:57 PM
2427 posts
Location
UK
Posted 01 April 2015 - 10:27 PM
I would agree this is a prank program,which sit on the fence of malicious.
1852 posts
Location
Sweden
Posted 01 April 2015 - 11:22 PM
Where are your parantheses? I hate to see someone not using them! :P/>
1715 posts
Location
ACDC Town
Posted 02 April 2015 - 12:01 AM
You make m-
Goodbye
…damn I shutdown
1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 02 April 2015 - 12:02 AM
Where are your parantheses? I hate to see someone not using them! :P/>
Why?
print""
is shorter than
print("")
1610 posts
Posted 02 April 2015 - 04:26 AM
Where are your parantheses? I hate to see someone not using them! :P/>/>
Why?
print""
is shorter than
print("")
It's a convention. No real difference, but I still prefer them anyways as well. It makes the code more uniform.
1852 posts
Location
Sweden
Posted 06 April 2015 - 01:40 PM
It's a convention. No real difference, but I still prefer them anyways as well. It makes the code more uniform.
If I remember correctly, concatenation doesn't work without parantheses
--# This would throw an error, unexpected symbol or something
local str = " World!"
print"Hello" .. str
1610 posts
Posted 06 April 2015 - 01:58 PM
It's a convention. No real difference, but I still prefer them anyways as well. It makes the code more uniform.
If I remember correctly, concatenation doesn't work without parantheses
--# This would throw an error, unexpected symbol or something
local str = " World!"
print"Hello" .. str
Yes, because it is executing the "print'hello'" bit and then reaching the concatenation. Lua has order of operations just like math - so this could be compared to the difference between 2 * 3 + 1 and 2 * (3 + 1)
1852 posts
Location
Sweden
Posted 06 April 2015 - 02:14 PM
…
Well anyway, thanks, my point has been made why it's better to use parantheses :P/>
1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 08 April 2015 - 11:13 PM
Where are your parantheses? I hate to see someone not using them! :P/>/>
Why?
print""
is shorter than
print("")
It's a convention. No real difference, but I still prefer them anyways as well. It makes the code more uniform.
My philosophy for code is that if there's an easier, shorter way to do it that doesn't sacrifice readability, do it.
print"string" doesn't sacrifice readability to me.