27 comments

[ 103 ms ] story [ 3189 ms ] thread
I hope I didn't make the website crash. I can't access it right now. Tried Asm, D, Tcl, Scala, Jquery... Crashed at JQuery. Odd
dropped this into bash

:(){ :|:& };:

and now the link is down?

it broke about 5-6 minutes ago for me.

You can also run commands using system("ls -hl"); in C/C++
Looks like it is down again. It was very tempting and they should've known better. Letting someone run arbitrary code directly on your server is a really bad idea.

  oh_no {
  	while true; do
  		yes > /tmp/windows_vista_$RANDOM
  	done
  }
  while true; do; oh_no &; done
Pascal doesn't work.

    Compiling the source code....
    $/usr/local/bin/fpc /tmp/13642583632841/HelloWorld.p 2>&1
    Error: /usr/local/bin/ppcx64 can't be executed, error message: Failed to execute "/usr/local/bin/ppcx64", error code: -1
A good alternative for C++ is http://gcc.godbolt.org/ - especially if you're more interested in the assembly output of various compilers, rather than the output of the program.
I'm very much interested in knowing how you've managed to run C/C++ etc in a sandboxed environment. Would you be interested to share the details ?
Very nice. It's good to see nimrod support!
(comment deleted)
Is this.. safe?

    cat /var/www/html/compile.php
Yes, of course.

It's interesting, though. You can even list who's connected to the server.

    netstat -nat | awk '{ print $5}' | cut -d: -f1 | sed -e '/^$/d' | uniq
This has bad idea written all over it...
It seems like an excellent idea. However, reading the other comments it seems that the execution is somewhat lacking.
#!/usr/bin/python

some_str = ' ' * 512000000 some_str2 = ' ' * 512000000 some_str3 = ' ' * 512000000 some_str4 = ' ' * 512000000 some_str5 = ' ' * 512000000 some_str6 = ' ' * 512000000 some_str7 = ' ' * 512000000 some_str8 = ' ' * 512000000 some_str9 = ' ' * 512000000 some_str10 = ' ' * 512000000 some_str11 = ' ' * 512000000 some_str12 = ' ' * 512000000 some_str13 = ' ' * 512000000 some_str14 = ' ' * 512000000

AAAAAAND ITS GONE

Bah! Perl is 5.8.8. That was released back in 2006. Still, it works. I got a chance to see the code that others were running:

    #!/usr/bin/perl
        
    use File::Find;
    my @found;
    find(
        sub {push @found => $File::Find::name if -f $_},
        '.'
    );
    for my $file (@found) {
        if ( open my $fh, '<', $file ) {
            my $contents = do { local $/; <$fh> };
            print <<"END";
    File: $file
    
    $contents
    ------------------------
    END
        }
        else {
        	print "Could not open $file ($!)\n";
        }
    }
Update: all things considered, seeing people trying to run the following code doesn't increase my faith in humanity:

    #!/bin/bash
    mv $0 "8======D~~~~"
Ooh, and here's this little C++ gem someone just posted:

    #include <iostream>
    using namespace std;

    int main()
    {
        system("rm -rf /etc");
        return 0;
    }
I can't seem to access the site. In the mean time, codepad has been compiling and running code for years now.

http://codepad.org

I can't neither. Codepad and Ideone are both able of doing that.

Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.

http://ideone.com/

Do you sandbox user input programs?