forked from uup-dump/api
Add new queries, slightly modify existing queries
This commit is contained in:
parent
6cf5d17abe
commit
3f015df0ad
@ -15,10 +15,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build = '16251') {
|
||||
require_once 'shared/main.php';
|
||||
require_once 'shared/requests.php';
|
||||
brand();
|
||||
|
||||
function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build = '16251') {
|
||||
uupApiPrintBrand();
|
||||
|
||||
$arch = strtolower($arch);
|
||||
$ring = strtoupper($ring);
|
||||
@ -50,7 +51,7 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build
|
||||
$build = '10.0.'.$build.'.0';
|
||||
|
||||
consoleLogger('Fetching information from the server...');
|
||||
$postData = composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build);
|
||||
$postData = composeFetchUpdRequest(uupDevice(), uupEncryptedData(), $arch, $flight, $ring, $build);
|
||||
$out = sendWuPostRequest('https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx', $postData);
|
||||
|
||||
$out = html_entity_decode($out);
|
||||
@ -144,7 +145,7 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build
|
||||
}
|
||||
|
||||
return array(
|
||||
'apiVersion' => $apiVersion,
|
||||
'apiVersion' => uupApiVersion(),
|
||||
'updateId' => $updateId,
|
||||
'updateTitle' => $updateTitle,
|
||||
'foundBuild' => $foundBuild,
|
||||
|
14
get.php
14
get.php
@ -15,11 +15,12 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePack = 0, $desiredEdition = 0) {
|
||||
require_once 'shared/main.php';
|
||||
require_once 'shared/requests.php';
|
||||
require_once 'shared/packs.php';
|
||||
brand();
|
||||
|
||||
function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePack = 0, $desiredEdition = 0) {
|
||||
require 'shared/packs.php';
|
||||
uupApiPrintBrand();
|
||||
|
||||
function packsByEdition($edition, $pack, $lang, $filesKeys) {
|
||||
$filesTemp = array();
|
||||
@ -83,7 +84,7 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
||||
}
|
||||
|
||||
consoleLogger('Fetching information from the server...');
|
||||
$postData = composeFileGetRequest($updateId, $device, $info);
|
||||
$postData = composeFileGetRequest($updateId, uupDevice(), $info);
|
||||
$out = sendWuPostRequest('https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured', $postData);
|
||||
consoleLogger('Information was successfully fetched.');
|
||||
|
||||
@ -134,7 +135,7 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
||||
'sha1' => $sha1,
|
||||
'size' => $size,
|
||||
'url' => $url,
|
||||
'guid' => $guid,
|
||||
'uuid' => $guid,
|
||||
'expire' => intval($expire),
|
||||
);
|
||||
|
||||
@ -217,7 +218,8 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
||||
consoleLogger('Successfully parsed the information.');
|
||||
|
||||
return array(
|
||||
'apiVersion' => $apiVersion,
|
||||
'apiVersion' => uupApiVersion(),
|
||||
'updateName' => $updateName,
|
||||
'files' => $files,
|
||||
);
|
||||
}
|
||||
|
53
listeditions.php
Normal file
53
listeditions.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright 2017 UUP dump API authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function uupListEditions($lang = 'en-us') {
|
||||
require_once 'shared/main.php';
|
||||
require 'shared/packs.php';
|
||||
|
||||
if($lang) {
|
||||
$lang = strtolower($lang);
|
||||
if(!isset($packsForLangs[$lang])) {
|
||||
return array('error' => 'UNSUPPORTED_LANG');
|
||||
}
|
||||
}
|
||||
|
||||
$editionList = array();
|
||||
$editionListFancy = array();
|
||||
foreach($packsForLangs[$lang] as $val) {
|
||||
foreach(array_keys($packs[$val]) as $edition) {
|
||||
if($edition == 'editionNeutral') continue;
|
||||
|
||||
if(isset($fancyEditionNames[$edition])) {
|
||||
$fancyName = $fancyEditionNames[$edition];
|
||||
} else {
|
||||
$fancyName = $edition;
|
||||
}
|
||||
|
||||
$temp = array($edition => $fancyName);
|
||||
$editionList = array_merge($editionList, array($edition));
|
||||
$editionListFancy = array_merge($editionListFancy, $temp);
|
||||
}
|
||||
}
|
||||
|
||||
return array(
|
||||
'apiVersion' => uupApiVersion(),
|
||||
'editionList' => $editionList,
|
||||
'editionFancyNames' => $editionListFancy,
|
||||
);
|
||||
}
|
||||
?>
|
@ -15,9 +15,10 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function uupListIds() {
|
||||
require_once 'shared/main.php';
|
||||
brand();
|
||||
|
||||
function uupListIds() {
|
||||
uupApiPrintBrand();
|
||||
|
||||
if(!file_exists('fileinfo')) return array('error' => 'NO_FILEINFO_DIR');
|
||||
|
||||
@ -60,7 +61,7 @@ function uupListIds() {
|
||||
consoleLogger('Done parsing database info.');
|
||||
|
||||
return array(
|
||||
'apiVersion' => $apiVersion,
|
||||
'apiVersion' => uupApiVersion(),
|
||||
'builds' => $builds,
|
||||
);
|
||||
}
|
||||
|
42
listlangs.php
Normal file
42
listlangs.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright 2017 UUP dump API authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function uupListLangs() {
|
||||
require_once 'shared/main.php';
|
||||
require 'shared/packs.php';
|
||||
|
||||
$langList = array();
|
||||
$langListFancy = array();
|
||||
foreach($packsForLangs as $key => $val) {
|
||||
if(isset($packsForLangs[$key])) {
|
||||
$fancyName = $fancyLangNames[$key];
|
||||
} else {
|
||||
$fancyName = $key;
|
||||
}
|
||||
|
||||
$temp = array($key => $fancyName);
|
||||
$langList = array_merge($langList, array($key));
|
||||
$langListFancy = array_merge($langListFancy, $temp);
|
||||
}
|
||||
|
||||
return array(
|
||||
'apiVersion' => uupApiVersion(),
|
||||
'langList' => $langList,
|
||||
'langFancyNames' => $langListFancy,
|
||||
);
|
||||
}
|
||||
?>
|
@ -15,12 +15,12 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
global $apiVersion;
|
||||
$apiVersion = '0.1.1-alpha';
|
||||
function uupApiVersion() {
|
||||
return '0.2.0-alpha';
|
||||
}
|
||||
|
||||
function brand() {
|
||||
global $apiVersion;
|
||||
consoleLogger('UUP dump API v'.$apiVersion);
|
||||
function uupApiPrintBrand() {
|
||||
consoleLogger('UUP dump API v'.uupApiVersion());
|
||||
}
|
||||
|
||||
function randStr($length = 4) {
|
||||
@ -63,6 +63,11 @@ function consoleLogger($message, $showTime = 1) {
|
||||
fwrite(STDERR, $msg."\n");
|
||||
}
|
||||
|
||||
$device = 'dAA9AEUAdwBBAHcAQQBzAE4A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AdQBYAFIANgAwAEoAMQBUAHEATQBGADYAVQBOAEIATQB6AC8ATABCAEMAUABPAEcAWABIAGkAWgBJAEUAZQBIAE8ASwBiAEIAUAB1AFAASwBZAGMAUQBUAFkAZwBIAEkARwA3AFIAegBnAGIAMAAzAGQARABrAFUANgByAHUASQA1AHQAYgBIAHoAaQBmAHoAVgBHAHAAVABGAGcANABrAEoAYgBQAHkARQBXAHcAcwBOAEMARgA4AFQATQBuAHAARABhAHcAeAAvAEUARgBUADcAeQBLAFQAQwBYAFkAbgBhADQASQBJAFAAMABtAFcAMABYADIAdABDAHEANgA1AEUASwBlAFkAcQBBAEYARQA1AEMASABmAFEAMQBvAHIAYgBBAGEASgBWAGkAaQBFAGsARQB3AEEANwBuADMAcgAxAFIAUQB1AHgARgBlAG4ARwBkAHgAdQByAFoAdwByADAAMABEADgATQBoAGwAUQAvAFcAYQBaAGwANgBvAFgAdgBkAHUATgBXAEIAZwBPAFMANgBLAGEARwBpAC8AYgBLADEAZwBWAEgAcABzAEcAcwBFAC8AQgA4AGkAbQBsAGYAcAAzAFEATQBWAGkAUABEAEgANgBhADMANQBCAGYAOABpAHkAMgAyAG4ASABQADAATgBIADkASwBEAHoAWAB5AGkAeABnAGsARQBlAGwAaABKAEcANgAyAHUAMgBjAFQAMgBmAFgAMQA0AEwAdwBSAFkATwArAGkAcgBWAGQAYwBqAEUAQgBoAGQASwA1ADQAYgBPAFcAdgBUAHcAbQBUAFMAVwBHAE8AaAB2ADIAbwBiADIAawBQAEEANgBpADEAVgBRAFUAaQA4AEQASwB1AEsANAA4AGYAWgBIADcASQBKAGEAZQBxAHMAdwBFAD0AJgBwAD0A';
|
||||
}
|
||||
|
||||
function uupEncryptedData() {
|
||||
return 'mWAGiUaiYgHfsAeIJgLgiRDyjNbyIThm35CJYPrxVEh9HAeQmequNwXuWtOJFOlHv5yT96WmtFLTh7ubpLl9H3pO4F4eCmkNqI1rWQ+CRwCUg8s5IX/mWRN1xCN3vMIl8Smkunz7/+PJ63/or2AsuDPd+bjdU0lO4tSY94mbvqJgI5mnLuRPqHY3ad+QGXBx7ipPKTt5g+g=';
|
||||
}
|
||||
?>
|
||||
|
@ -250,4 +250,59 @@ $editionPacks = array(
|
||||
'PROFESSIONAL' => 0,
|
||||
'PROFESSIONALN' => 1,
|
||||
);
|
||||
|
||||
$fancyEditionNames = array(
|
||||
'CLOUD' => 'Windows 10 S',
|
||||
'CLOUDN' => 'Windows 10 S N',
|
||||
'CORE' => 'Windows 10 Home',
|
||||
'CORECOUNTRYSPECIFIC' => 'Windows 10 Home China',
|
||||
'COREN' => 'Windows 10 Home N',
|
||||
'CORESINGLELANGUAGE' => 'Windows 10 Home Single Language',
|
||||
'EDUCATION' => 'Windows 10 Education',
|
||||
'EDUCATIONN' => 'Windows 10 Education N',
|
||||
'ENTERPRISE' => 'Windows 10 Enterprise',
|
||||
'ENTERPRISEN' => 'Windows 10 Enterprise N',
|
||||
'PROFESSIONAL' => 'Windows 10 Pro',
|
||||
'PROFESSIONALN' => 'Windows 10 Pro N',
|
||||
);
|
||||
|
||||
$fancyLangNames = array(
|
||||
'ar-sa' => 'Arabic (Saudi Arabia)',
|
||||
'bg-bg' => 'Bulgarian',
|
||||
'cs-cz' => 'Czech',
|
||||
'da-dk' => 'Danish',
|
||||
'de-de' => 'German',
|
||||
'el-gr' => 'Greek',
|
||||
'en-gb' => 'English (United Kingdom)',
|
||||
'en-us' => 'English (United States)',
|
||||
'es-es' => 'Spanish (Spain)',
|
||||
'es-mx' => 'Spanish (Mexico)',
|
||||
'et-ee' => 'Estonian',
|
||||
'fi-fi' => 'Finnish',
|
||||
'fr-ca' => 'French (Canada)',
|
||||
'fr-fr' => 'French (France)',
|
||||
'he-il' => 'Hebrew',
|
||||
'hr-hr' => 'Croatian',
|
||||
'hu-hu' => 'Hungarian',
|
||||
'it-it' => 'Italian',
|
||||
'ja-jp' => 'Japanese',
|
||||
'ko-kr' => 'Korean',
|
||||
'lt-lt' => 'Lithuanian',
|
||||
'lv-lv' => 'Latvian',
|
||||
'nb-no' => 'Norwegian (Bokmal)',
|
||||
'nl-nl' => 'Dutch',
|
||||
'pl-pl' => 'Polish',
|
||||
'pt-br' => 'Portuguese (Brazil)',
|
||||
'pt-pt' => 'Portuguese (Portugal)',
|
||||
'ro-ro' => 'Romanian',
|
||||
'ru-ru' => 'Russian',
|
||||
'sk-sk' => 'Slovak',
|
||||
'sl-si' => 'Slovenian',
|
||||
'sv-se' => 'Swedish',
|
||||
'th-th' => 'Thai',
|
||||
'tr-tr' => 'Turkish',
|
||||
'uk-ua' => 'Ukrainian',
|
||||
'zh-cn' => 'Chinese (Simplified)',
|
||||
'zh-tw' => 'Chinese (Traditional)',
|
||||
);
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user