what would be a simple way to block people from certain directories?
lua question
Started by tom2018, Nov 17 2012 12:53 PM
8 replies to this topic
#1
Posted 17 November 2012 - 12:53 PM
#2
Posted 17 November 2012 - 01:05 PM
I don't think that their exists a simple way.
/> Best way to do this is overriding some methods of fs api. You could of course look in the programs section, there are some 'OS's that do this.
#3
Posted 17 November 2012 - 01:24 PM
Orwell, on 17 November 2012 - 01:05 PM, said:
I don't think that their exists a simple way.
/> Best way to do this is overriding some methods of fs api. You could of course look in the programs section, there are some 'OS's that do this.
#4
Posted 17 November 2012 - 01:58 PM
wait i know is there a way to act like the original OS but if certain input entered it logs to a /logs and locks account(if not admin)
#5
Posted 17 November 2012 - 02:14 PM
Yes, it is possible, by modifying existing functions.
Very easy example:
I made a chroot program myself as well a couple of months ago.
/> Safest way is to set a separate environment for a new (custom) shell session. But it's probably still circumventable. (If you made it so shell.exit() still reboots the pc, you could use this ingenious method.)
@Tom2018: This stuff is not so basic anymore, if you really want to do this, I suggest reading some more on how lua works.
/>
Very easy example:
os.shutdown = function() print("You can't shutdown!") end
That would disable shutdown. Though, you can still access the original shutdown function through '_G.os.shutdown()'.I made a chroot program myself as well a couple of months ago.
@Tom2018: This stuff is not so basic anymore, if you really want to do this, I suggest reading some more on how lua works.
#6
Posted 17 November 2012 - 02:31 PM
i know lua well enough its just i dont like 1000 lines of code
#7
Posted 17 November 2012 - 02:36 PM
Orwell, on 17 November 2012 - 02:14 PM, said:
Yes, it is possible, by modifying existing functions.
Very easy example:
I made a chroot program myself as well a couple of months ago.
/> Safest way is to set a separate environment for a new (custom) shell session. But it's probably still circumventable. (If you made it so shell.exit() still reboots the pc, you could use this ingenious method.)
@Tom2018: This stuff is not so basic anymore, if you really want to do this, I suggest reading some more on how lua works.
/>
Very easy example:
os.shutdown = function() print("You can't shutdown!") end
That would disable shutdown. Though, you can still access the original shutdown function through '_G.os.shutdown()'.I made a chroot program myself as well a couple of months ago.
@Tom2018: This stuff is not so basic anymore, if you really want to do this, I suggest reading some more on how lua works.
The sandbox I linked protects against ALL modification of the base system from within the sandbox (last time I checked) as well as a couple of VERY obscure holes, like using "getfenv()" and using the bytecode loading properties of "load()" to inject code with illegal references.
#8
Posted 17 November 2012 - 02:37 PM
tom2018, on 17 November 2012 - 02:31 PM, said:
i know lua well enough its just i dont like 1000 lines of code
#9
Posted 17 November 2012 - 02:42 PM
kazagistar, on 17 November 2012 - 02:36 PM, said:
Orwell, on 17 November 2012 - 02:14 PM, said:
*snip*
The sandbox I linked protects against ALL modification of the base system from within the sandbox (last time I checked) as well as a couple of VERY obscure holes, like using "getfenv()" and using the bytecode loading properties of "load()" to inject code with illegal references.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











