1) { $thingos=explode(',', $andmore); } for ($iwe=0; $iwe 1) { if (strpos(strtolower($thingo), '.png') !== false) { exec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class PNGf»)'"); } else if (strpos(strtolower($thingo), '.jp') !== false) { exec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class JPEG»)'"); } else if (strpos(strtolower($thingo), '.gif') !== false) { exec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class GIF»)'"); } else { //file_put_contents('x.xx', $pathbit . "\n" . $basebit . "\n" . $thingo . "\n" . "osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class optd»)'"); if (!$expdone) { exec("echo \"\n" . $pbit . $thingo . "\n" . expdata($pbit . $thingo) . "\" | pbcopy"); } $afters=("osascript -e 'tell application \"Finder\" set thesong to \"" . $pbit . $thingo . "\" as string end tell tell application \"QuickTime Player\" activate open thesong play document 1 end tell'"); } sleep(5); } // Thanks to https://www.google.com/search?q=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&rlz=1C5OZZY_en&oq=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTQ3NDg4ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8 $retis=shell_exec("osascript -e 'tell application \"System Events\" # Get the name of the current application (which is likely the Script Editor or Automator) set currentApp to name of current application # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to false # Wait a moment for the target app to become active delay 0.1 end if # Simulate the Command+V keystroke in the now frontmost application keystroke \"v\" using command down # (Optional) Unhide the script application afterward if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to true end if end tell '"); if ($afters != '') { sleep(5); exec($afters); exec("echo \"\" | pbcopy"); if (5 == 7) { sleep(2); exec("echo \"" . expdata($pbit . $thingo) . "\" | pbcopy"); sleep(5); $retis=shell_exec("osascript -e 'tell application \"System Events\" # Get the name of the current application (which is likely the Script Editor or Automator) set currentApp to name of current application # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to false # Wait a moment for the target app to become active delay 0.1 end if # Simulate the Command+V keystroke in the now frontmost application keystroke \"v\" using command down # (Optional) Unhide the script application afterward if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to true end if end tell '"); } $afters=''; } } if (strlen($andmore) > 1 && $incopy != '') { return exec($incopy); } } if (strlen($andmore) <= 1 && sizeof($mampfs) > 1 && $basebit != '' && $rel != '') { $newc=''; for ($ijk=0; $ijk /dev/null"); if ($onefile != '') { $thingo=$onefile; $fd=true; } else { $iti = new RecursiveDirectoryIterator($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR); foreach (new RecursiveIteratorIterator($iti) as $file) { if (!fd) { foreach (glob($file . $fn) as $file) { if (!fd) { if (strpos($file, $fn) !== false && filesize($file) == $fs) { $thingo=$file; $fd=true; } } } } } } } else if (substr(strtolower(('' . PHP_OS)),0,3) == 'win') { $iti = new RecursiveDirectoryIterator(str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR)); foreach (new RecursiveIteratorIterator($iti) as $file) { if (!fd) { foreach (glob($file . $fn) as $file) { if (!fd) { if (strpos($file, $fn) !== false && filesize($file) == $fs) { $thingo=$file; $fd=true; } } } } } } } } } if ($thingo != '') { if (strpos(strtolower($thingo), '.png') !== false) { //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'x.x', "osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $thingo . "\") as «class PNGf»)'"); if (PHP_OS == 'Darwin') { ourexec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $thingo . "\") as «class PNGf»)'"); } else { //$fp = fopen($thingo, 'r'); //$gcont=fread($fp, filesize($thingo)); //fclose($fp); $fp = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'stop_extravaganza.bzt', 'x'); fwrite($fp, "powershell.exe -windowstyle hidden -Command \"Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::Fromfile('" . $thingo . "'))\" & erase " . str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR) . 'stop_extravaganza.b*t'); fclose($fp); if (isset($_GET['mailto'])) { sleep(65); } } if (isset($_GET['mailto'])) { $parstuff=''; if (strlen($_GET['mailto']) > 1) { $mto=str_replace('please.change@email.address',str_replace('+',' ',urldecode($_GET['mailto'])),$mto); $parstuff=" parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.textShadow='1px 1px red'; parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.cursor='pointer'; if (parent.document.getElementById('mailtovssms')) { if (parent.document.getElementById('mailtovssms').value.toLowerCase() == parent.document.getElementById('mailtovssms').value) { parent.setlastb('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "'); } } "; } if (isset($_GET['public'])) { andthenlater(''); } else { echo ""; } } } else if (strpos(strtolower($thingo), '.jp') !== false) { //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'x.x', "osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $thingo . "\") as «class JPEG»)'"); if (PHP_OS == 'Darwin') { ourexec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $thingo . "\") as «class JPEG»)'"); } else { //$fp = fopen($thingo, 'r'); //$gcont=fread($fp, filesize($thingo)); //fclose($fp); $fp = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'stop_extravaganza.bzt', 'x'); fwrite($fp, "powershell.exe -windowstyle hidden -Command \"Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::Fromfile('" . $thingo . "'))\" & erase " . str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR) . 'stop_extravaganza.b*t'); fclose($fp); if (isset($_GET['mailto'])) { sleep(65); } } if (isset($_GET['mailto'])) { $parstuff=''; if (strlen($_GET['mailto']) > 1) { $mto=str_replace('please.change@email.address',str_replace('+',' ',urldecode($_GET['mailto'])),$mto); $parstuff=" parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.textShadow='1px 1px red'; parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.cursor='pointer'; if (parent.document.getElementById('mailtovssms')) { if (parent.document.getElementById('mailtovssms').value.toLowerCase() == parent.document.getElementById('mailtovssms').value) { parent.setlastb('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "'); } } "; } if (isset($_GET['public'])) { andthenlater(''); } else { echo ""; } } } else if (strpos(strtolower($thingo), '.gif') !== false) { if (PHP_OS == 'Darwin') { ourexec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $thingo . "\") as «class GIF»)'"); } else { //$fp = fopen($thingo, 'r'); //$gcont=fread($fp, filesize($thingo)); //fclose($fp); $fp = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'stop_extravaganza.bzt', 'x'); fwrite($fp, "powershell.exe -windowstyle hidden -Command \"Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::Fromfile('" . $thingo . "'))\" & erase " . str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR) . 'stop_extravaganza.b*t'); fclose($fp); if (isset($_GET['mailto'])) { sleep(65); } } if (isset($_GET['mailto'])) { $parstuff=''; if (strlen($_GET['mailto']) > 1) { $mto=str_replace('please.change@email.address',str_replace('+',' ',urldecode($_GET['mailto'])),$mto); $parstuff=" parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.textShadow='1px 1px red'; parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.cursor='pointer'; if (parent.document.getElementById('mailtovssms')) { if (parent.document.getElementById('mailtovssms').value.toLowerCase() == parent.document.getElementById('mailtovssms').value) { parent.setlastb('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "'); } } "; } if (isset($_GET['public'])) { andthenlater(''); } else { echo ""; } } } else { // exec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class optd»)'"); if (PHP_OS == 'Darwin') { if (!$expdone) { exec("echo \"\n" . $pbit . $thingo . "\n" . expdata($pbit . $thingo) . "\" | pbcopy"); } $afters=("osascript -e 'tell application \"Finder\" set thesong to \"" . $pbit . $thingo . "\" as string end tell tell application \"QuickTime Player\" activate open thesong play document 1 end tell'"); sleep(5); // Thanks to https://www.google.com/search?q=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&rlz=1C5OZZY_en&oq=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTQ3NDg4ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8 $retis=shell_exec("osascript -e 'tell application \"System Events\" # Get the name of the current application (which is likely the Script Editor or Automator) set currentApp to name of current application # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to false # Wait a moment for the target app to become active delay 0.1 end if # Simulate the Command+V keystroke in the now frontmost application keystroke \"v\" using command down # (Optional) Unhide the script application afterward if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to true end if end tell '"); if ($afters != '') { sleep(5); exec($afters); exec("echo \"\" | pbcopy"); if (5 == 7) { sleep(2); exec("echo \"" . expdata($pbit . $thingo) . "\" | pbcopy"); sleep(5); $retis=shell_exec("osascript -e 'tell application \"System Events\" # Get the name of the current application (which is likely the Script Editor or Automator) set currentApp to name of current application # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to false # Wait a moment for the target app to become active delay 0.1 end if # Simulate the Command+V keystroke in the now frontmost application keystroke \"v\" using command down # (Optional) Unhide the script application afterward if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then set visible of process currentApp to true end if end tell '"); } $afters=''; } } else { //$fp = fopen($thingo, 'r'); //$gcont=fread($fp, filesize($thingo)); //fclose($fp); $fp = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'stop_extravaganza.bzt', 'x'); fwrite($fp, "powershell.exe -windowstyle hidden -Command \"Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::Fromfile('" . $thingo . "'))\" & erase " . str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR) . 'stop_extravaganza.b*t'); fclose($fp); if (isset($_GET['mailto'])) { sleep(65); } } if (isset($_GET['mailto'])) { $parstuff=''; if (strlen($_GET['mailto']) > 1) { $mto=str_replace('please.change@email.address',str_replace('+',' ',urldecode($_GET['mailto'])),$mto); $parstuff=" parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.textShadow='1px 1px red'; parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.cursor='pointer'; if (parent.document.getElementById('mailtovssms')) { if (parent.document.getElementById('mailtovssms').value.toLowerCase() == parent.document.getElementById('mailtovssms').value) { parent.setlastb('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "'); } } "; } if (isset($_GET['public'])) { andthenlater(''); } else { echo ""; } } } } exit; } else if (isset($_POST['mvp'])) { $mampfilelist=str_replace('+',' ',urldecode($_POST['mvp'])); if ($mampfilelist != '') { $mampfs=explode(',', $mampfilelist); for ($i=0; $i