Details
-
Skillsjava, c++
-
Github
Joined devRant on 4/28/2017
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
-
Here's a thought!
Our bodies are mortal. And they are like flowers: they grow, blossom at their best and then begin their slow degradations, deaths.
Our mind is what seems to be the essence of _us_.
Now suppose someone finds a way to copy our minds into some tech so they could survive our bodies' deaths. Making us sort of immortal. Sounds cool, eh?
But that would make a copy of your mind. You would still be stuck in your mortal body while your copy would be immortal. Would you be happier to die knowing that it's YOU who is dying and not your copy, rather than dying w/o leaving a copy of you behind? Is a copy of you still YOU?
It could be YOU for others. But is it YOU for you?23 -
Just finished the invite code challenge. it was incredibly difficult
Even with hints from forums 😢 but I'm in anyways☺4 -
"Linux is more secure." Put on your tin-foil hats. As you can:
>Root over 50% of linux servers you encounter in the wild with two easy scripts,
Linux_Exploit_Suggester [0], and unix-privesc-check [1].
(sauce: Phineas Phisher - http://pastebin.com/raw/cRYvK4jb)17 -
So recently I did a lot of research into the internals of Computers and CPUs.
And i'd like to share a result of mine.
First of all, take some time to look at the code down below. You see two assembler codes and two command lines.
The Assembler code is designed to test how the instructions "enter" and "leave" compare to manually doing what they are shortened to.
Enter and leave create a new Stackframe: this means, that they create a new temporary stack. The stack is where local variables are put to by the compiler. On the right side, you can see how I create my own stack by using
push rbp
mov rbp, rsp
sub rsp, 0
(I won't get into details behind why that works).
Okay. Why is this even relevant?
Well: there is the assumption that enter and leave are very slow. This is due to raw numbers:
In some paper I saw ( I couldn't find the link, i'm sorry), enter was said to use up 12 CPU cycles, while the manual stacking would require 3 (push + mov + sub => 1 + 1 + 1).
When I compile an empty function, I get pretty much what you'd expect just from the raw numbers of CPU cycles.
HOWEVER, then I add the dummy code in the middle:
mov eax, 123
add eax, 123543
mov ebx, 234
div ebx
and magically - both sides have the same result.
Why????
For one thing, there is CPU prefetching. This is the CPU loading in ram before its done executing the current instruction (this is how anti-debugger code works, btw. Might make another rant on that). Then there is the fact that the CPU usually starts work on the next instruction while the current instruction is processing IFF the register currently involved isnt involved in the next instruction (that would cause a lot of synchronisation problems). Now notice, that the CPU can't do any of that when manually entering and leaving. It can only start doing the mov eax, 1234 while performing the sub rsp, 0.
----------------
NOW: notice that the code on the right didn't take any precautions like making sure that the stack is big enough. If you sub too much stack at once, the stack will be exhausted, thats what we call a stack overflow. enter implements checks for that, and emits an interrupt if there is a SO (take this with a grain of salt, I couldn't find a resource backing this up). There are another type of checks I don't fully get (stack level checks) so I'd rather not make a fool of myself by writing about them.
Because of all those reasons I think that compilers should start using enter and leave again.
========
This post showed very well that bare numbers can often mislead.21 -
After Bought Minecraft, I'm planning to create a Programmable 4-bit Computer.
Just Finished Building ALU, So Here's my Progress Screenshots :
1. Op-Codes and Input A Sides28 -
My mirror is now an Official Ubuntu, Alpine, Debian, qubes-os, linux-libre and linux mint mirror! :D21
-
curl cheat.sh — get an instant answer to any question on (almost) any programming language from the command line
tldr
do curl cht.sh/go/execute+external+program to see how to execute external program in go
And this question: why I actually should I start the browser, and the browser has to downloads tons of JS, CSS and HTML, render them thereafter, only to show me some small output,
some small text, number or even some plot. Why can't I do a trivial query from the command line
and instantly get what I want?
I decided to create some service that will work as I think such a service should work.
And that is how wttr.in was created.
Nowadays you probably know, how to check the weather from the command line, but if not:
curl wttr.in
or
curl wttr.in/Paris
(curl wetter in Paris if you want to know the weather in Paris)
After that several other services were created (the point was to check how good the console
can solve the task, so I tried to create services providing information
of various nature: text, numbers, plots, pseudo graphic etc.):
curl rate.sx/btc # to check exchange rate of any (crypto)currency
curl qrenco.de/google.com # to QRenco.de any text
And now last but not least, the gem in this collection: cheat.sh.
The original idea behind the service was just to deliver a various UNIX/Linux command line cheat sheets via curl. There are several beautiful community driven cheat sheet repositories such as tldr, but the problem is that to use them you have to install them first, and it is quite often that you have no time for it, you just want to quickly check some cheat sheet.
With cheat.sh you don't need to install anything, just do:
curl cheat.sh/tar (or whatever)
you will get a cheat sheet for this command (if such cheat sheet exists inf one of the most popular community-driven cheat sheet repositories; but it surely does).
But then I thought: why actually show only existing cheat sheets? Why not generate cheat sheets or better to say on the fly? And that is how the next major update of cheat.sh was created.
Now you can simply do:
curl cht.sh/python/copy+files
curl cht.sh/go/execute+external+program
curl cht.sh/js/async+file+read
or even
curl cht.sh/python/копировать+файл
curl cht.sh/ruby/Datei+löschen
curl cht.sh/lua/复制文件
and get your question answered
(cht.sh is an alias for cheat.sh).
And it does not matter what language have you used to ask the question. To be short, all pairs (human language => programming language) are supported.
One very important major advantage of console oriented interfaces is that they are easily
programmable and can be easily integrated with various systems.
For example, Vim and Emacs plugins were created by means of that you can
query the service directly from the editor so that you can just write your
questions in the buffer and convert them in code with a keystroke.
The service is of course far from the perfection,
there are plenty of things to be fixed and to be implemented,
but now you can see its contours and see the contours of this approach,
console oriented services.
The service (as well as the other mentioned above services) is opensource, its code is available here:
https://github.com/chubin/cheat.sh
What do you think about this service?
What do you think about this approach?
Have you already heard about these services before?
Have you used them?
If yes, what do you like about them and what are you missing?26 -
Ah.... the wonders of technolgy....
Linux fanboys and girls rejoice!
The Linux Virtual Reality Desktop is here. Meet Safespaces. Develop without the limitations and agony of your too small screens your asshole boss gave you.
https://fossbytes.com/safespaces-fi...1 -
Difference n°538592 between developers and regular people:
"Do you listen music at work ? If so what app do you use ?
- (regular people) I don't / I use Spotify/Youtube.
- (me) I usually listen to my personal webradio server (running with icecast+liquidsoap on a little ubuntu DO droplet). Currently has a few funny jingles made by a friend and +3000 tracks (this number grows with time as I listen to new stuff), all crate-digged by myself for myself. Basically the the best radio in the whole world <3"20 -
OKAY MICROSOFT EXPLAIN TO ME WHY THE FUCKING FUCK WINDOWS CREATION TOOL WILL ONLY DOWNLOAD TO THE C:\ DRIVE?12
-
New engineer: "How do you estimate how long a project will take?"
Seasoned engineer: "I add up the time required for each task, then multiply the sum by pi."
New engineer: "Why pi?"
Seasoned engineer: "It ensures that all my budgets are irrational."5 -
Just found this yesterday in someone github profile.. you can also press the button and listen to how she says it 😂😂
Link and credits :
https://salomonelli.github.io/perso...6 -
Alright, it's not perfect yet, only one post exists and the anonymous analytics are hardly working. Next to that I'm tired as fuck and need to go to bed so fuck it, here we go:
https://much-security.nl
There's not much yet, just one tiny post :)
I have no clue if it will work or crash but I think it'll handle well enough 😅
If you'd find any security issues, please don't exploit them, just report them and I'll take a look asap!
Thanks!44 -
I know it wasn't ethical, but I had to do it.
Semester 4 started this week, we all got to vote which day we wanted the lecture to be held on. There were quite a few options. My preference was Monday at 7:30pm.
So I entered the poll, as I have every other semester. But I noticed something, this particular poll didn't require any form of identification. Not even a Student ID.
I dug deeper, found that it used local cookies to store weather you'd voted or not, this is obviously a security problem, so I opened up Python and wrote a simple Selenium program to automate this process.
I called it the "Vote Smasher". First it would open the webpage, then it would choose Monday 7:30pm and vote. Then it would clear it's cookies, refresh and do it over again.
I ran it fifty times.
Can you guess what the revealed vote was for UCD SP4 IT was?
I heard my lecturer mutter:
"The votes aren't usually this slanted..."
I could hardly contain my giggles.
My vote won by about fifty over the others 😂
Let me just say, it was his fault for choosing such a naive poll system in the first place 😉36 -
Poll time/input requested. Multiple assignments in one statement: yay or nay? For a (painfully) simple example:
a = b = true;
vs.
a = true;
b = true;7 -
Come on guys, I want to gather deadly One-Liner for Linuxsystems. Maybe someone has some more creative ways than the standard ones below.
1. rm -rf / —no-preserves-root
2. echo . > /dev/sda
(3). :(){ :|: & };:
4. mv / /dev/null4 -
When you hit run after an hour of powercoding:
Old Mcdonald had a bug,
E I E I bug.
And on that bug he had a bug.
E I E I bug.
With a bug bug here and a bug bug there.
Here a bug, there a bug, everywhere a bug bug,
Old Mcdonald had a bug.....
E.....I.........E............I.................
[FATAL ERROR] : Program has ended for a simple reason...not telling why though...here's a completely unrelated line of code you may want to take a look at :) -
I spent the last 5 hours solving this FUCKING GREAT challenge and I'm finally done 🎉
It's hxp CTF btw, check it out3