Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
BigBoo23126yFuck you for not thinking it's toxic!
On a more serious note. I don't know what the program does.
But malicious User Input is the culprit in most security flaws. So I would maybe run all user input through filter functions to ensure that they don't type anything stupid that crashes your program.
Cheers and welcome to devrant. -
@BigBoo Fuck you too
and thanks for the feedback. The program only responds to serten keystrokes such es Y and N as yes and no.
Thanks for the warm welcome and cheers -
BigBoo23126y@CaptainJuers 😄
Alright. And it doesn't crash if I would do like
python -c 'print("A"*1024)' | ./your_program
? -
@BigBoo I suppose it would in perspective to what i think it does. Tho there would be the need for someone to exit to the actual terminal and then know the command too. However do you happen to know a way to fix this?
-
BigBoo23126y@CaptainJuers By filtering all your user input. I should be able to do whatever stupid input I feel like.
For example pushing in characters when it expects integers and vice versa. Check input length. Do as much checking as you can basically. -
Less toxicity is probs because downvotes actually matter. Just a few of them and the algo will push the post down into oblivion. Welcome here.
A little trick you can do is only checking the first char, that way y and yes will still work but you limit commands like mentioned -
Welcome to our small huddled corner of the internet! We come in peace as long as you bring us good puns and constant complaints about bad syntax :)
-
Welcome! I was going to comment the exact same as @BigBoo, look at what he says ;)
So, i recently joined the community and must say im suprised by the lack of toxicity so probs to you people.
Anyway. I am almost finished with my internship as a Software enginieer(kind of). As my finshing presentation i made a script (mainly in Python with asciimatics(a great library btw)) wich is displayed in the Terminal (Linux Ubuntu) and as i know the kinds of people at my school i tryed to find any way they could crash it. (Already rebound the close window function from Alt + F4 to Alt+.)
Now im wondering if you; the nice people of Dev rant could suggest ways to make it safer or rather name ways you would attempt to shut it down. (i cant disable Keyboard input since that is needed to continue in the script.)
I wish you a nice day. and thanks in advance
Yours Humbly an aspiring Dev.
P.s.( i just really like to write formally. i think it sounds kind of cool.so dont you think im oldfashioned :D)
question
devnewb