Created
March 11, 2012 07:54
-
-
Save willwade/2015490 to your computer and use it in GitHub Desktop.
A small script to get a list of all the Apps on your iOS device. Read the body for more info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if($_SERVER['REQUEST_METHOD'] == "POST") { | |
$filen = $_FILES['ufile']; | |
$allowedExtensions = array("deviceinfo", "xml", "txt"); | |
function isAllowedExtension($fileName) { | |
global $allowedExtensions; | |
return in_array(end(explode(".", $fileName)), $allowedExtensions); | |
} | |
if($filen['error'] == UPLOAD_ERR_OK) { | |
if(isAllowedExtension($filen['name'])) { | |
# Do uploading here | |
$file = file_get_contents($filen['tmp_name']); | |
unlink($filen['tmp_name']); | |
$pattern='$[ \t]+<key>CFBundleDisplayName</key>[ \t\r\n]+<string>([A-Za-z0-9 \&\-,\!\']+)</string>$'; | |
preg_match_all($pattern, $file, $matches); | |
if (!empty($matches[1])){ | |
$comma_separated = implode("\n", $matches[1]); | |
header("Pragma: public"); | |
header("Expires: 0"); | |
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); | |
header("Cache-Control: private",false); | |
header("Content-Type: application/octet-stream"); | |
header("Content-Disposition: attachment; filename=\"iosAppList.csv\";" ); | |
header("Content-Transfer-Encoding: binary"); | |
echo $comma_separated; | |
die(); | |
} else { | |
echo "Sorry. Something went horribly wrong. Are you sure you gave me a export file - ending in .deviceinfo??"; | |
die(); | |
} | |
} else { | |
echo "Invalid file type"; | |
die(); | |
} | |
} else die("Cannot upload"); | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>List My iOS apps</title> | |
<style type="text/css" media="screen">@import "screen.css";</style> | |
<meta name="DC.title" content="iOS AppLister Hack" /> | |
<meta name="DC.subject" content="ios, app, list" /> | |
<meta name="DC.description" content="simply converts a ios configuration export into a list of apps" /> | |
<meta name="DC.format" content="text/html" /> | |
<meta name="DC.publisher" content="Will Wade" /> | |
<meta name="DC.language" content="en" /> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <meta name="generator" content="BBEdit 10.1" /> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<h3>iOS App Lister</h3> | |
<br /><br /> | |
I'm a very simple tool to get a list of all the Apps on your iOS device. Here are the steps..<br /> | |
1. Download and install the <a href="http://support.apple.com/kb/dl851">iPhone Configuration Utility</a><br /> | |
2. Find your device, then click on "Export". Name the file something obvious you can find<br /> | |
3. Click on Choose file below and upload your Exported file.<br /> | |
4. You should get a downloaded file of the Apps. <br /><br /><br /> | |
This is something that took me a total of 10 minutes to create. I dare say this won't work for all! To prove I'm not doing anything nasty to your files you can view the source code of this app <a href="AppLister.phps">here</a>. See that I delete the file instantly around line 16. I don't store anything on the server!<br />(Please be nice if you find a bug that kills my server. I come in peace!)<br /><br /> | |
<form action="AppLister.php" method="post" enctype="multipart/form-data"> | |
<input type="file" name="ufile" /> | |
<input type="submit" value="Upload" /> | |
</form> | |
<br /><br /> | |
Will Wade (will AT e-wade.net) | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment