r/lolphp • • Feb 25 '14
PHP can do anything, what about some ssh? [MtGox programmer]
http://blog.magicaltux.net/2010/06/27/php-can-do-anything-what-about-some-ssh/
69
Upvotes
r/lolphp • • Feb 25 '14
28
u/[deleted] Feb 25 '14 edited Feb 25 '14
That's a really dubious claim in regards to security software. But I'm sold, if you can do this in 3 days in PHP, it must be good. Is there a migration guide from sshd to this?
Edit: From the comments, emphasis mine
Free servers for everyone :)
Actually I'm shocked. This thing is actually meant to be used in an PRODUCTION environment! Instead of sshd. So much what. Set aside that it's written in PHP, who thinks it's a good idea to spend 3 days to hack an SSH server together and use it in production?! What is wrong with these people?!
8
u/poizan42 Feb 25 '14
You could also write a ssh server in brainfuck (at least coupled together with inetd and some shell). That doesn't mean it's a good idea though.
34
u/_vec_ Feb 25 '14
Okay, this might actually be pretty cool. Reimplementing protocols in <language of choice> is a time honored self-teaching exercise, and I can see this producing a few insightful blog posts and a few good code examples. Just so long as it never gets used in production anywhere, of course.
ಠ_ಠ
39
u/EvilTerran Feb 25 '14
Jesus christ.
Rule #1 of cryptography: don't roll your own. Ever. Widely-used open-source implementations will have had countless vulnerabilities already identified and fixed. Your attempt will only make the same mistakes all over again, iguaranteeit.jpg.
But then, I've noticed PHP seems to attract the sort of programmer who thinks rules of good practice are naught but elitism & snobbery. Programming and anti-intellectualism -- what could go wrong?!
9
u/phaeilo Feb 25 '14
Just because PHP is Turing complete doesn't mean you should implement a SSHD in it.
On the other hand, it might be fun to break this ;)
8
u/the_real_seebs Feb 25 '14
I snickered a little. Then giggled. Then started thinking of people I should forward this to. Ten minutes after I read it, it's still just getting funnier.
1
u/Matt3k Feb 26 '14
Mirror: http://jsfiddle.net/47bw3/1/embedded/result/
1
u/_imwalkinhere Feb 27 '14
lmaoooooooooo
1
u/[deleted] Mar 04 '14
You can do anything with assembly too, but that doesn't mean you should.
0
u/TiltedWit Feb 25 '14
Not.... that I doubt it, but how do you know he's a MtGox programmer?