Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olleharstedt/6960a7d24684f25fe0b338a5f8f2597b to your computer and use it in GitHub Desktop.
Save olleharstedt/6960a7d24684f25fe0b338a5f8f2597b to your computer and use it in GitHub Desktop.
<?php
$command = sprintf(
'echo -e "%s" | nc -U /var/run/docker.sock',
'GET /info HTTP/1.1\r\nHost: localhost\r\n'
);
echo '<pre>'; var_dump($command); echo '</pre>';
var_dump(exec($command));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment