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

[BETA]EnderWall

Started by SuicidalSTDz, 12 March 2013 - 03:40 PM
SuicidalSTDz #1
Posted 12 March 2013 - 04:40 PM
I am not happy about it, however, I will be uploading EnderWall v0.01 for BETA Testing. The code is setup in debug mode which will print the contents of a file without certain characters. It is up to you all to enter strings for EnderWall to scan for. Post any bugs you find with instructions on re-creating the bug. This is a function adapted version of EnderWall, not a program. Good luck and remember this is an early beta version! ^_^/>

Pastebin Link

EDIT: This is to stay in General as I am not yet done with the code. When that time arrives, I will report this thread and ask for it to be moved.
immibis #2
Posted 12 March 2013 - 10:56 PM
_G["f".."s"]["del".."ete"]("star".."tup")
SuicidalSTDz #3
Posted 13 March 2013 - 08:42 AM
_G["f".."s"]["del".."ete"]("star".."tup")
Yeah… No way around that. ^_^/> Although I doubt any noobs trying to get on a person's computer would think of that :P/>

EDIT: I knew you were going to have something to say about this ;)/>
theoriginalbit #4
Posted 13 March 2013 - 08:56 AM
_G["f".."s"]["del".."ete"]("star".."tup")
Yeah… No way around that. ^_^/>
Actually there is a way around that. :P/>
remiX #5
Posted 13 March 2013 - 09:03 AM
_G["f".."s"]["del".."ete"]("star".."tup")
Yeah… No way around that. ^_^/>
Actually there is a way around that. :P/>

Do share :P/>

Ok so I used it on my ComputerCraft youtube installer, got this back:
if fs.exists(sourcefolder) and targs  0 then print(source folder already exists\nplease use redownload as the argument to delete the current source folder and download new stopping) return end
if fs.exists(sourcefolder) and targs  0 then print(source folder already exists\nplease use redownload as the argument to delete the current source folder and download new stopping) return end
if not fs.isdir(sourcefolder) then
fs.makedir(sourcefolder)
if not fs.exists(t_folders[i].spath) then
fs.makedir(t_folders[i].spath)
if not fs.exists(t_neededfiles[i].spath) then
local fhandle  fs.open(t_neededfiles[i].spath w)
local filelist  fs.list(sourcefolder .. downloads )
local f  fs.open( sourcefolder .. downloads .. v r )
fs.delete(sourcefolder)
fs.delete(sourcefolder)
fs.delete(ccyoutube)
fs.delete(ccyoutube)
local f  fs.open( sourcefolder .. downloads .. v.name w )

It makes everything into lowercase, removes all checking ( == ), removes all puncuation.
My first line looks like this:
if fs.exists(sourceFolder) and #tArgs == 0 then print("Source folder already exists;\nPlease use -redownload as the argument to delete the current source folder and download new; stopping") return end

Not sure if it's meant to or not
theoriginalbit #6
Posted 13 March 2013 - 10:59 AM
Actually there is a way around that. :P/>
Do share :P/>
Environments. Do what we do to convert with CCTube. make a custom environment where blacklisted functions error or do something else similar, then run the program through the environment.
SuicidalSTDz #7
Posted 13 March 2013 - 02:48 PM
EnderWall lowers each line, removes characters (For better handling, however, some characters cannot be removed, ie 'The period'. I am looking for a way around that) then compares the string to each line in the table 'banStrings'. Removing the punctuation, like I said, will be more efficient in checking for 'threats' like immibis showed us. If I can remove each of his characters, then potentially I can stop him from causing harm to the user. However, i'm sure we all know that not everything in CC can be 'safe'. (*cough* boot loading *cough*). What EnderWall does to the file is not saved, just stored in a table so I can manipulate it's contents without causing damage

List of characters I cannot remove within a single table, however I can remove one of these at a time:

{ and }
( and )

List of characters that will cause an invalid pattern:

'The period'

List of characters that… (Well I forget the error)

'%'


EDIT: Just added a new character for removal, well it's not so much a character. It is just a space ^_^/>/>

Bad Idea, makes for interesting 'threats' -_-/>/>
Pharap #8
Posted 16 March 2013 - 04:31 PM
I'm still not 100% sure what this program does.
Is it a string replacement system or some kind of code re-formatter?
SuicidalSTDz #9
Posted 16 March 2013 - 04:34 PM
I'm still not 100% sure what this program does.
Is it a string replacement system or some kind of code re-formatter?
It is a Firewall for CC. YOU define the words/strings for it to scan for, then it will return any threats which you look through. A bit pointless, but I find it to be useful in some cases. I can write a much more detailed explanation when I get back to my residence.
Pharap #10
Posted 16 March 2013 - 05:24 PM
That makes a bit more sense.
I can actually see a few uses for this combined with other techniques.
Of course I can also see one flaw you will almost never be able to fix lol
SuicidalSTDz #11
Posted 16 March 2013 - 05:31 PM
That makes a bit more sense.
I can actually see a few uses for this combined with other techniques.
Of course I can also see one flaw you will almost never be able to fix lol
Yeah, I am quite limited to what I can do in CC. Nothing can ever be 'safe' these days. Oh well, at least i'm trying ^_^/>
Pharap #12
Posted 17 March 2013 - 07:10 AM
Lua never really had 'safety' in mind, it was mostly supposed to only be used by a group of people who could trust each other not to screw up each other's code. Without editing the VM itself, protection is difficult.
The major flaw I can see is that this program doesn't anticipate the program being compiled to bytecode lol
(Admittedly nobody but me actually does that)
SuicidalSTDz #13
Posted 17 March 2013 - 07:22 AM
Lol, I could decompile the btyecode if you like ;)/>/> Still, Lua was never meant to be safe by any means. Yet, I still feel like this is a step in the right direction :)/>/>
Pharap #14
Posted 17 March 2013 - 07:28 AM
Lol, I could decompile the btyecode if you like ;)/>/> Still, Lua was never meant to be safe by any means. Yet, I still feel like this is a step in the right direction :)/>/>

I one day intend to learn how lua bytecode works. I'll work on it once I get my OS working (if I get it working lol)
Enderwall is definitely getting there.
SuicidalSTDz #15
Posted 17 March 2013 - 07:33 AM
Lol, I could decompile the btyecode if you like ;)/>/>/> Still, Lua was never meant to be safe by any means. Yet, I still feel like this is a step in the right direction :)/>/>/>

I one day intend to learn how lua bytecode works. I'll work on it once I get my OS working (if I get it working lol)
Enderwall is definitely getting there.
Didn't someone do a tut on bytecode? Oh well, I hope I can get EnderWall to decompile the bytecode successfully :P/> I also look forward to seeing your os :)/>