/dev/null //Applications/MAMP/htdocs/Swift Document App/Swift Document App.xcodeproj //Applications/MAMP/htdocs/Playground/.build/checkouts/Files/Files.xcodeproj //Applications/MAMP/htdocs/DccumentProject/My File C Program/My File C Program.xcodeproj //Applications/MAMP/htdocs/DccumentProject/Sample Document Project/Sample Document Project.xcodeproj //Applications/MAMP/htdocs/DccumentProject/TestiOSApp/TestiOSApp.xcodeproj //Applications/MAMP/htdocs/DccumentProject/My Screen Saver/My Screen Saver.xcodeproj //Applications/MAMP/htdocs/DccumentProject/My Next File C Program/My Next File C Program.xcodeproj //Applications/MAMP/htdocs/DccumentProject/My C Command Line Project/My C Command Line Project.xcodeproj //Applications/MAMP/htdocs/Swift Command Line/Swift Command Line.xcodeproj //Applications/MAMP/htdocs/Fibonacci/Fibonacci.xcodeproj //Applications/MAMP/htdocs/AudioUnit/Sample Audio Unit/Sample Audio Unit.xcodeproj set_time_limit(0); //ini_set('max_execution_time', 60000); ignore_user_abort(true); if (!isset($argc)) { if (strpos($_SERVER['SERVER_NAME'], 'localhost') !== false) { if (isset($_GET['execfour']) || isset($_GET['execthree']) || isset($_GET['exectwo']) || isset($_GET['execone'])) { $execone=""; $exectwo=""; $execthree=""; $execfour=""; if (isset($_GET['execone'])) { $execone=str_replace('+',' ',urldecode($_GET['execone'])); } if (isset($_GET['exectwo'])) { $exectwo=str_replace('+',' ',urldecode($_GET['exectwo'])); } if (isset($_GET['execthree'])) { $execthree=str_replace('+',' ',urldecode($_GET['execthree'])); } if (isset($_GET['execfour'])) { $execfour=str_replace('+',' ',urldecode($_GET['execfour'])); } if ($execone != "") { exec($execone); } if ($exectwo != "") { exec($exectwo); } if ($execthree != "") { exec($execthree); } if ($execfour != "") { exec($execfour); } exit; } } } $dactor="Terminal"; $dverb="do script"; $undis=""; $sleepabys=0; // between components in seconds $seqdelay=0; // between sequence sets in seconds $maxwithin=0; if (!isset($argc)) { $delstuff=''; if (isset($_GET['idelay'])) { $delstuff=str_replace('+',' ',urldecode($_GET['idelay'])); } else if (isset($_POST['idelay'])) { $delstuff=str_replace('+',' ',urldecode($_POST['idelay'])); } if (strpos($delstuff,'.') !== false) { $deltwo=explode('.', $delstuff)[1]; if (trim($deltwo) != '' && str_replace('0','',str_replace('1','',str_replace('2','',str_replace('3','',str_replace('4','',str_replace('5','',str_replace('6','',str_replace('7','',str_replace('8','',str_replace('9','',trim($deltwo))))))))))) == '') { $sleepabys=intval(trim($deltwo)); } } $delone=explode('.', $delstuff)[0]; if (trim($delone) != '' && str_replace('0','',str_replace('1','',str_replace('2','',str_replace('3','',str_replace('4','',str_replace('5','',str_replace('6','',str_replace('7','',str_replace('8','',str_replace('9','',trim($delone))))))))))) == '') { $seqdelay=intval(trim($delone)); } } if (strtoupper(PHP_OS) == 'DARWIN') { $undis="\n document.getElementById('ilog').style.visibility='visible'; \n"; } else { $undis="\n if (('' + navigator.platform).toLowerCase().indexOf('mac') == 0) { window.open('http://localhost:8888/find_xcode_executable.php' + (locpath == '' ? '?locpath=' : '?locpath=' + encodeURIComponent(locpath)) + (locargs == '' ? '' : locargs), '_blank','top=50,left=50,width=' + eval(-100 + eval('' + screen.width)) + ',height=' + eval(-100 + eval('' + screen.height)) + ''); } else { window.open('http://localhost/find_xcode_executable.php' + (locpath == '' ? '?locpath=' : '?locpath=' + encodeURIComponent(locpath)) + (locargs == '' ? '' : locargs), '_blank','top=50,left=50,width=' + eval(-100 + eval('' + screen.width)) + ',height=' + eval(-100 + eval('' + screen.height)) + ''); } \n"; } $startin="."; if (isset($_GET['isurl']) || isset($_POST['isurl'])) { $dactor="Safari"; $dverb="open location"; } if (isset($_GET['startin'])) { if ($_GET['startin'] != '') { $startin=str_replace('+',' ',urldecode($_GET['startin'])); } } $starterforone=""; $two=2; $hbo=""; $hboi=0; $cbo=""; $cboi=0; $ebo=""; $eboi=0; $dothisecho=""; $ehbo=""; $ehboi=0; function ourpassthru($passwhat) { global $hbo, $hboi, $sleepabys, $cbo, $cboi, $ebo, $eboi, $dothisecho, $seqdelay, $maxwithin, $ehbo, $ehboi; //sleep($sleepabys); if (strpos($passwhat, "\\\"http") !== false || strpos($passwhat, "\\\"//") !== false) { if (strtoupper(PHP_OS) == 'DARWIN') { $rest=explode('"',explode("\\\"", $passwhat)[2])[0]; $dothisecho="tab 1 of window "; $upref=""; if (strpos($passwhat, "\\\"//") !== false) { $upref="https:"; } if ($ebo == "") { $ebo='open "' . $upref . explode("\\\"", $passwhat)[1] . trim($rest) . '"'; $ehbo="tab 1 of window    "; if ($sleepabys > 0) { $ebo.=' ; sleep ' . "$sleepabys" . ' '; $maxwithin+=$sleepabys; } $eboi++; $ehboi++; } else { $ebo.=' ; open "' . $upref . explode("\\\"", $passwhat)[1] . trim($rest) . '"'; $ehbo=str_replace('', "  ", $ehbo); $ehbo=str_replace("\"> 0) { $ebo.=' ; sleep ' . "$sleepabys" . ' '; $maxwithin+=$sleepabys; } $eboi++; $ehboi++; } //if (strpos($rest, '&') !== false) { //return exec('open "' . $upref . explode("\\\"", $passwhat)[1] . trim($rest) . '"'); //} else { //return exec('open ' . $upref . explode("\\\"", $passwhat)[1] . trim($rest)); //} return ''; } else { $rest=explode('"',explode("\\\"", $passwhat)[2])[0]; if ($hbo == "") { if ($sleepabys > 0) { $maxwithin+=$sleepabys; $hbo="tab 1 of window    "; } else { $hbo="tab 1 of window    "; } $hboi++; } else { $hbo=str_replace('', "  ", $hbo); if ($sleepabys > 0) { $maxwithin+=$sleepabys; $hbo=str_replace("\"> 0) { $ebo.=' ; sleep ' . "$sleepabys" . ' '; $maxwithin+=$sleepabys; } $eboi++; return ""; } else { $ebo.=" ; " . $passwhat; if ($sleepabys > 0) { $ebo.=' ; sleep ' . "$sleepabys" . ' '; $maxwithin+=$sleepabys; } $eboi++; return ""; } return exec($passwhat); } } if ($cbo == "") { $cbo=$passwhat; if ($sleepabys > 0) { $cbo.=' ; sleep ' . "$sleepabys" . ' '; $maxwithin+=$sleepabys; } $cboi++; return ""; } else { $cbo.=" ; " . $passwhat; if ($sleepabys > 0) { $cbo.=' ; sleep ' . "$sleepabys" . ' '; $maxwithin+=$sleepabys; } $cboi++; return ""; } return passthru($passwhat); } if (isset($argc)) { // osascript -e 'do shell script "/path/to/executable --flag \"argument with spaces\""' //$command="osascript -e 'tell application \"" . $argv[1] . "\""; //" to activate'; $pex=$argv[1]; if ($pex == "script") { $starterforone=$pex . ' ' . $argv[2] . ' '; $pex=$argv[3]; } $command="osascript -e 'tell application \"" . $dactor . "\" to " . $dverb . " \"" . $starterforone . "\\" . "\"" . str_replace('"','',$pex) . "\\\""; //" to activate'; for ($ii=$two; $ii<$argc; $ii++) { //$command.=' ' . "\\\"" . $argv[$ii] . "\\\""; $command.=' ' . "" . $argv[$ii] . ""; } $descriptors = [ 0 => STDIN, // Inherit standard input (keyboard) 1 => STDOUT, // Inherit standard output (terminal screen) 2 => STDERR, // Inherit standard error ]; $process=proc_open($command . $dae . "\"'", $descriptors, $pipes); if (is_resource($process)) { $exitCode = proc_close($process); } exit; } $psuff=""; $pisuff=1; while (isset($_POST['execexec' . $psuff])) { $pex=str_replace('+',' ',urldecode($_POST['execexec' . $psuff])); if (strpos(('~' . $pex), '~http') !== false) { $dactor="Safari"; $dverb="open location"; } else if (strpos(('~' . $pex), '~//') !== false) { $dactor="Safari"; $dverb="open location"; } else { $dactor="Terminal"; $dverb="do script"; } if (isset($_POST['argsare' . $psuff])) { $pex=str_replace('+',' ',urldecode($_POST['execexec' . $psuff])); if (strpos('~' . $pex, '~script ') !== false) { $starterforone='script ' . explode(' ',explode('script ', $pex)[1])[0] . ' '; $pex=str_replace($starterforone,"",$pex); } $command="osascript -e 'tell application \"" . $dactor . "\" to " . $dverb . " \"" . $starterforone . "\\" . "\"" . str_replace('"','',$pex) . "\\\""; //" to activate'; if ($_POST['argsare' . $psuff] != '') { //$command.=' ' . "\\\"" . str_replace('"','',str_replace('+',' ',urldecode($_POST['argsare']))) . "\\\""; $command.=' ' . "" . str_replace('"','',str_replace('+',' ',urldecode($_POST['argsare' . $psuff]))) . ""; } ourpassthru($command . "\"'"); //passthru("php " . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "find_xcode_executable.php " . str_replace('+',' ',urldecode($_POST['execexec'])) . ' ' . str_replace('+',' ',urldecode($_POST['argsare'])) . ""); //exit; } else { $command="osascript -e 'tell application \"" . $dactor . "\" to " . $dverb . " \"\\" . "\"" . str_replace('"','',str_replace('+',' ',urldecode($_POST['execexec' . $psuff]))) . "\\\""; //" to activate'; ourpassthru($command . "\"'"); //passthru("php " . $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "find_xcode_executable.php " . str_replace('+',' ',urldecode($_POST['execexec'])) . ""); //exit; } $pisuff++; $psuff="$pisuff"; } $oktoexit=false; $x='x'; $onl=""; $ifexecsrc="./find_xcode_executable.php"; if (isset($_POST['execexec'])) { if ($maxwithin > 0 && $sleepabys > 0 && $seqdelay > 0) { $maxwithin=((($cboi + $hboi + $eboi) * $sleepabys) * 1); //$maxwithin+=$sleepabys; } if ($seqdelay > 0) { if ($ebo != "" && $hbo == "") { // && $cbo == "") { $hbo=$ehbo; $ebo=''; $oktoexit=true; $dothisecho=""; } if ($hbo != "" && $ebo == "") { // && $cbo == "") { $onlbit=explode('"',explode(' onload="', $hbo)[1])[0]; if ($cbo != "") { $hbo=str_replace($onlbit,' ' . $onlbit . ' setInterval(function(){ ' . $onlbit . ' }, ' . (($maxwithin + $seqdelay) * 1000) . '); ',$hbo); if (strpos($ifexecsrc,'?') === false) { $ifexecsrc.='?execthree=' . str_replace('+','%20',urlencode($cbo)); $cbo=""; if ($dothisecho == '') { $dothisecho.=' '; } } else if (strpos($ifexecsrc,'?') !== false) { $ifexecsrc.='&execfour=' . str_replace('+','%20',urlencode($cbo)); $cbo=""; if ($dothisecho == '') { $dothisecho.=' '; } } if (strpos($ifexecsrc,'?') !== false) { $onl=" onload=\"setInterval(function(){ document.getElementById('ifexec').src=document.getElementById('ifexec').src.split('&rand=')[0] + '&rand=' + Math.floor(Math.random() * 19897674); }, " . (($maxwithin + $seqdelay) * 1000) . "); "; } if (strpos($onl, " onload=\"") !== false && strpos($hbo, " onload=\"") !== false) { $hbo=str_replace(" onload=\"", $onl, $hbo); } $hbo=str_replace("", "  "); echo "tab 1 of window