Foobar3000

The world's most advanced echo server!

Fork me on GitHub

Wow... just wow.

helloworld3000.com - An alias of foobar3000.com suitable for testing CORS, XSS, etc.

What's your IP?

checkip.foobar3000.com - no muss, no fuss, no markup, no `sed`, `awk`, or `.trim()` needed.

Stuck on Windows?

TCP Echo

Persistent connection:

Open port 5000 on your computer in one terminal and connect to foobar3000 on port 32000 in another.

Text will be echoed back as-is. JSON will be interpretted, if possible.


      nc -l -p 5000 # GNU (Linux) netcat
      # nc -l 5000 # BSD (OS X) netcat

      nc foobar3000.com 32000
      Hey you!
      { "keepalive": true }
      { "keepalive": false }
      { "body": "Hello\n" }
        { "body": "Hello\n" }
      { "body": "Hello\n" NOT JSON }
      { "body": "Hello\n", "port": 5000 }
      { "port": 5000 }
      { "body": "Hello\n", "port": 5000 }
    

UDP Echo

Persistent (responds from bound listener):

Open port 5000 on your computer in one terminal and connect to foobar3000 on port 32000 in another.

Text will be echoed back as-is. JSON will be interpretted, if possible.


      nc -u -l -p 5000 # GNU (Linux) netcat
      # nc -u -l 5000 # BSD (OS X) netcat

      nc -u foobar3000.com 32000
      Hey you!
        { "body": "Hello\n" }
      { "body": "Hello\n" NOT JSON }
      { "port": 5000 }
      { "body": "Hello\n", "redial": true }
      { "body": "Hello\n", "port": 5000 }
      { "body": "Hello\n", "redial": true, "port": 5000 }
    

HTTP Echo

For your prototyping pleasure, Ender.JS is loaded on this page with the following modules:

Open up your console and play away:


  var jQuery = require('jQuery')  // jQuery 1.6.3
    , $ = require('ender')        // same DOM API as jQuery
    , ajax = require('reqwest')   // same API as jQuery.ajax
    , request = require('ahr2')   // similar API to Node.JS' `request`, supports XHR2
    ;

  request('/echo').when(function (err, ahr, data) {
    console.log(arguments);
  });


  // Use foobar3000.com to create a CORS resource
  // (attached to session)
  function createCorsResource() {
    request.post('/meta', null, {
        session: "make-up-your-own-key"
      , pathname: "/hello-cors"
      , headers: [
            "Access-Control-Allow-Origin: *"
          , "Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS"
          , "Access-Control-Allow-Headers: Content-Type, Accept"
        ]
      , body: "Hello CORS World!"
    }, { headers: { "content-type": "application/json"} }).when(function (err, ahr, data) {
      console.log(arguments);
      getCorsResource();
    });
  }

  // Access the aforementioned resource from helloworld3000.com
  // (must use same session key)
  function getCorsResource() {
    request.get('http://helloworld3000.com/hello-cors?session=make-up-your-own-key').when(function (err, ahr, data) {
      console.log(arguments);
    });
  }

  createCorsResource();

    

Or play from another browser page:


  var script = document.createElement('script');
  script.src = 'http://foobar3000.com/assets/ender.js';
  script = document.body.appendChild(script);