2017-09-22 21:24:31 +02:00
|
|
|
<?php
|
|
|
|
/*
|
2021-01-19 08:06:51 +01:00
|
|
|
Copyright 2021 whatever127
|
2017-09-22 21:24:31 +02:00
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2018-01-13 19:59:05 +01:00
|
|
|
// Composes DeviceAttributes parameter needed to fetch data
|
2021-02-06 14:26:21 +01:00
|
|
|
function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
2018-01-13 19:59:05 +01:00
|
|
|
$branch = branchFromBuild($build);
|
2019-04-09 17:52:51 +02:00
|
|
|
$blockUpgrades = 0;
|
|
|
|
$flightEnabled = 1;
|
|
|
|
$isRetail = 0;
|
2018-01-13 19:59:05 +01:00
|
|
|
|
2019-07-30 19:44:14 +02:00
|
|
|
if(is_array($arch)) {
|
|
|
|
$arch = $arch[0];
|
|
|
|
}
|
|
|
|
|
2022-03-05 19:46:31 +01:00
|
|
|
if($sku == 125 || $sku == 126)
|
2020-07-15 04:07:06 +02:00
|
|
|
$blockUpgrades = 1;
|
|
|
|
|
2021-02-06 14:26:21 +01:00
|
|
|
$dvcFamily = 'Windows.Desktop';
|
|
|
|
$insType = 'Client';
|
|
|
|
if($sku == 119) {
|
|
|
|
$dvcFamily = 'Windows.Team';
|
|
|
|
}
|
2022-03-05 19:46:31 +01:00
|
|
|
if(in_array($sku, [7,8,12,13,79,80,120,145,146,147,148,159,160,406,407,408])) {
|
2021-02-06 14:26:21 +01:00
|
|
|
$dvcFamily = 'Windows.Server';
|
|
|
|
$insType = 'Server';
|
2022-03-05 19:46:31 +01:00
|
|
|
$blockUpgrades = 1;
|
2021-02-06 14:26:21 +01:00
|
|
|
}
|
|
|
|
/*/ Hololens
|
|
|
|
if($sku == 135) {
|
|
|
|
$dvcFamily = 'Windows.Holographic';
|
|
|
|
$insType = 'FactoryOS';
|
|
|
|
}*/
|
|
|
|
// HubOS Andromeda Lite
|
|
|
|
if($sku == 180 || $sku == 184 || $sku == 189) {
|
|
|
|
$dvcFamily = 'Windows.Core';
|
|
|
|
$insType = 'FactoryOS';
|
|
|
|
}
|
|
|
|
|
2020-07-15 04:07:06 +02:00
|
|
|
$fltContent = 'Mainline';
|
|
|
|
$fltRing = 'External';
|
2021-01-19 08:06:51 +01:00
|
|
|
$flight = 'Active';
|
2020-07-15 04:07:06 +02:00
|
|
|
|
2018-01-13 19:59:05 +01:00
|
|
|
if($ring == 'RETAIL') {
|
2020-07-15 04:07:06 +02:00
|
|
|
$fltBranch = '';
|
2021-02-06 14:26:21 +01:00
|
|
|
$fltContent = $flight;
|
2020-07-15 04:07:06 +02:00
|
|
|
$fltRing = 'Retail';
|
2018-01-13 19:59:05 +01:00
|
|
|
$flightEnabled = 0;
|
2018-08-10 23:55:45 +02:00
|
|
|
$isRetail = 1;
|
2018-01-13 19:59:05 +01:00
|
|
|
}
|
|
|
|
|
2020-07-15 04:07:06 +02:00
|
|
|
if($ring == 'WIF') {
|
|
|
|
$fltBranch = 'Dev';
|
|
|
|
}
|
|
|
|
|
|
|
|
if($ring == 'WIS') {
|
|
|
|
$fltBranch = 'Beta';
|
|
|
|
}
|
|
|
|
|
|
|
|
if($ring == 'RP') {
|
|
|
|
$fltBranch = 'ReleasePreview';
|
|
|
|
}
|
|
|
|
|
2021-01-19 08:06:51 +01:00
|
|
|
if($ring == 'DEV') {
|
|
|
|
$fltBranch = 'Dev';
|
|
|
|
$ring = 'WIF';
|
|
|
|
}
|
|
|
|
|
|
|
|
if($ring == 'BETA') {
|
|
|
|
$fltBranch = 'Beta';
|
|
|
|
$ring = 'WIS';
|
|
|
|
}
|
|
|
|
|
|
|
|
if($ring == 'RELEASEPREVIEW') {
|
|
|
|
$fltBranch = 'ReleasePreview';
|
|
|
|
$ring = 'RP';
|
|
|
|
}
|
|
|
|
|
2020-07-15 04:07:06 +02:00
|
|
|
if($ring == 'MSIT') {
|
|
|
|
$fltBranch = 'MSIT';
|
|
|
|
$fltRing = 'Internal';
|
|
|
|
}
|
|
|
|
|
|
|
|
$bldnum = explode('.', $build);
|
|
|
|
$bldnum = $bldnum[2];
|
|
|
|
|
|
|
|
if($bldnum < 17763) {
|
2021-01-19 08:06:51 +01:00
|
|
|
if($ring == 'RP') $flight = 'Current';
|
2020-07-15 04:07:06 +02:00
|
|
|
$fltBranch = 'external';
|
|
|
|
$fltContent = $flight;
|
|
|
|
$fltRing = $ring;
|
|
|
|
}
|
2019-04-09 17:52:51 +02:00
|
|
|
|
2018-01-13 19:59:05 +01:00
|
|
|
$attrib = array(
|
2018-12-13 21:19:51 +01:00
|
|
|
'App=WU_OS',
|
2018-01-13 19:59:05 +01:00
|
|
|
'AppVer='.$build,
|
2022-06-12 04:24:06 +02:00
|
|
|
'AttrDataVer=177',
|
2021-09-24 17:27:44 +02:00
|
|
|
'AllowInPlaceUpgrade=1',
|
|
|
|
'AllowUpgradesWithUnsupportedTPMOrCPU=1',
|
2019-04-09 17:52:51 +02:00
|
|
|
'BlockFeatureUpdates='.$blockUpgrades,
|
2018-01-13 19:59:05 +01:00
|
|
|
'BranchReadinessLevel=CB',
|
|
|
|
'CurrentBranch='.$branch,
|
2021-06-28 19:42:22 +02:00
|
|
|
'DataExpDateEpoch_CO21H2='.(time()+82800),
|
2021-09-24 17:27:44 +02:00
|
|
|
'DataExpDateEpoch_CO21H2Setup='.(time()+82800),
|
|
|
|
'DataExpDateEpoch_21H2='.(time()+82800),
|
2021-05-27 22:28:47 +02:00
|
|
|
'DataExpDateEpoch_21H1='.(time()+82800),
|
2020-06-13 01:35:08 +02:00
|
|
|
'DataExpDateEpoch_20H1='.(time()+82800),
|
2019-05-24 18:25:57 +02:00
|
|
|
'DataExpDateEpoch_19H1='.(time()+82800),
|
|
|
|
'DataVer_RS5=2000000000',
|
2019-01-31 20:17:41 +01:00
|
|
|
'DefaultUserRegion=191',
|
2021-02-06 14:26:21 +01:00
|
|
|
'DeviceFamily='.$dvcFamily,
|
2019-10-24 20:49:08 +02:00
|
|
|
'EKB19H2InstallCount=1',
|
|
|
|
'EKB19H2InstallTimeEpoch=1255000000',
|
2020-07-15 04:07:06 +02:00
|
|
|
'FlightingBranchName='.$fltBranch,
|
2021-05-27 22:28:47 +02:00
|
|
|
//'FlightContent='.$fltContent,
|
2020-07-15 04:07:06 +02:00
|
|
|
'FlightRing='.$fltRing,
|
2021-09-24 17:27:44 +02:00
|
|
|
'Free=gt64',
|
2021-05-27 22:28:47 +02:00
|
|
|
'GStatus_CO21H2=2',
|
2021-09-24 17:27:44 +02:00
|
|
|
'GStatus_CO21H2Setup=2',
|
|
|
|
'GStatus_21H2=2',
|
2021-05-27 22:28:47 +02:00
|
|
|
'GStatus_21H1=2',
|
2020-06-13 01:35:08 +02:00
|
|
|
'GStatus_20H1=2',
|
|
|
|
'GStatus_20H1Setup=2',
|
2019-03-12 18:26:33 +01:00
|
|
|
'GStatus_19H1=2',
|
2019-05-25 15:57:04 +02:00
|
|
|
'GStatus_19H1Setup=2',
|
2019-05-24 18:25:57 +02:00
|
|
|
'GStatus_RS5=2',
|
|
|
|
'GenTelRunTimestamp_19H1='.(time()-3600),
|
2018-08-10 23:55:45 +02:00
|
|
|
'InstallDate=1438196400',
|
2018-01-13 19:59:05 +01:00
|
|
|
'InstallLanguage=en-US',
|
2021-02-06 14:26:21 +01:00
|
|
|
'InstallationType='.$insType,
|
2018-01-13 19:59:05 +01:00
|
|
|
'IsDeviceRetailDemo=0',
|
|
|
|
'IsFlightingEnabled='.$flightEnabled,
|
2018-08-10 23:55:45 +02:00
|
|
|
'IsRetailOS='.$isRetail,
|
2021-02-06 14:26:21 +01:00
|
|
|
'MediaBranch=',
|
2020-06-13 01:35:08 +02:00
|
|
|
'MediaVersion='.$build,
|
2021-02-06 14:26:21 +01:00
|
|
|
'CloudPBR=1',
|
2020-06-13 01:35:08 +02:00
|
|
|
'DUScan=1',
|
2022-08-25 02:16:15 +02:00
|
|
|
'OEMModel=Asus ROG Maximus Z690 Extreme',
|
|
|
|
'OEMModelBaseBoard=ROG MAXIMUS Z690 EXTREME',
|
|
|
|
'OEMName_Uncleaned=ASUSTeK COMPUTER INC.',
|
2019-07-30 19:44:14 +02:00
|
|
|
'OSArchitecture='.$arch,
|
2018-04-29 21:33:19 +02:00
|
|
|
'OSSkuId='.$sku,
|
2018-01-13 19:59:05 +01:00
|
|
|
'OSUILocale=en-US',
|
|
|
|
'OSVersion='.$build,
|
2022-08-25 02:16:15 +02:00
|
|
|
'ProcessorIdentifier=Intel64 Family 6 Model 151 Stepping 2',
|
2018-01-13 19:59:05 +01:00
|
|
|
'ProcessorManufacturer=GenuineIntel',
|
2022-08-25 02:16:15 +02:00
|
|
|
'ProcessorModel=12th Gen Intel(R) Core(TM) i9-12900K',
|
2021-02-06 14:26:21 +01:00
|
|
|
'ReleaseType='.$type,
|
2020-06-13 01:35:08 +02:00
|
|
|
'SdbVer_20H1=2000000000',
|
2019-05-24 18:25:57 +02:00
|
|
|
'SdbVer_19H1=2000000000',
|
2021-06-28 19:42:22 +02:00
|
|
|
'SecureBootCapable=1',
|
2019-01-31 20:17:41 +01:00
|
|
|
'TelemetryLevel=3',
|
2021-06-28 19:42:22 +02:00
|
|
|
'TimestampEpochString_CO21H2='.(time()-3600),
|
2021-09-24 17:27:44 +02:00
|
|
|
'TimestampEpochString_CO21H2Setup='.(time()-3600),
|
|
|
|
'TimestampEpochString_21H2='.(time()-3600),
|
2021-05-27 22:28:47 +02:00
|
|
|
'TimestampEpochString_21H1='.(time()-3600),
|
|
|
|
'TimestampEpochString_20H1='.(time()-3600),
|
|
|
|
'TimestampEpochString_19H1='.(time()-3600),
|
2021-06-28 19:42:22 +02:00
|
|
|
'TPMVersion=2',
|
2018-01-13 19:59:05 +01:00
|
|
|
'UpdateManagementGroup=2',
|
2021-01-19 08:06:51 +01:00
|
|
|
'UpdateOfferedDays=0',
|
2022-07-29 14:19:26 +02:00
|
|
|
'UpgEx_NI22H2=Green',
|
2021-05-27 22:28:47 +02:00
|
|
|
'UpgEx_CO21H2=Green',
|
2021-09-24 17:27:44 +02:00
|
|
|
'UpgEx_21H2=Green',
|
2021-05-27 22:28:47 +02:00
|
|
|
'UpgEx_21H1=Green',
|
2020-06-13 01:35:08 +02:00
|
|
|
'UpgEx_20H1=Green',
|
2019-03-12 18:26:33 +01:00
|
|
|
'UpgEx_19H1=Green',
|
2019-05-24 18:25:57 +02:00
|
|
|
'UpgEx_RS5=Green',
|
2021-01-19 08:06:51 +01:00
|
|
|
'UpgradeEligible=1',
|
2019-05-24 18:25:57 +02:00
|
|
|
'Version_RS5=2000000000',
|
2018-01-13 19:59:05 +01:00
|
|
|
'WuClientVer='.$build,
|
|
|
|
);
|
|
|
|
|
2018-09-21 18:01:12 +02:00
|
|
|
return htmlentities('E:'.implode('&', $attrib));
|
2018-01-13 19:59:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Returns the most possible branch for selected build
|
|
|
|
function branchFromBuild($build) {
|
|
|
|
$build = explode('.', $build);
|
|
|
|
$build = $build[2];
|
|
|
|
|
|
|
|
switch($build) {
|
|
|
|
case 15063:
|
|
|
|
$branch = 'rs2_release';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 16299:
|
|
|
|
$branch = 'rs3_release';
|
|
|
|
break;
|
|
|
|
|
2018-08-10 23:55:45 +02:00
|
|
|
case 17134:
|
|
|
|
$branch = 'rs4_release';
|
|
|
|
break;
|
|
|
|
|
2019-01-31 20:17:41 +01:00
|
|
|
case 17763:
|
|
|
|
$branch = 'rs5_release';
|
|
|
|
break;
|
|
|
|
|
2021-05-27 22:28:47 +02:00
|
|
|
case 17784:
|
2021-06-28 19:42:22 +02:00
|
|
|
$branch = 'rs5_release_svc_hci';
|
2021-05-27 22:28:47 +02:00
|
|
|
break;
|
|
|
|
|
2019-04-09 17:52:51 +02:00
|
|
|
case 18362:
|
2022-07-01 18:34:49 +02:00
|
|
|
case 18363:
|
2019-10-25 16:44:35 +02:00
|
|
|
$branch = '19h1_release';
|
|
|
|
break;
|
|
|
|
|
2020-01-15 19:10:26 +01:00
|
|
|
case 19041:
|
2022-07-01 18:34:49 +02:00
|
|
|
case 19042:
|
|
|
|
case 19043:
|
|
|
|
case 19044:
|
|
|
|
case 19045:
|
2022-07-29 14:19:26 +02:00
|
|
|
case 19046:
|
2021-01-26 22:52:54 +01:00
|
|
|
$branch = 'vb_release';
|
|
|
|
break;
|
|
|
|
|
2021-02-06 14:26:21 +01:00
|
|
|
case 20279:
|
|
|
|
$branch = 'fe_release_10x';
|
|
|
|
break;
|
|
|
|
|
2021-05-27 22:28:47 +02:00
|
|
|
case 20348:
|
2022-07-29 14:19:26 +02:00
|
|
|
case 20349:
|
|
|
|
case 20350:
|
2021-05-27 22:28:47 +02:00
|
|
|
$branch = 'fe_release';
|
|
|
|
break;
|
|
|
|
|
2021-06-28 19:42:22 +02:00
|
|
|
case 22000:
|
|
|
|
$branch = 'co_release';
|
|
|
|
break;
|
|
|
|
|
2022-06-12 04:24:06 +02:00
|
|
|
case 22621:
|
|
|
|
$branch = 'ni_release';
|
|
|
|
break;
|
|
|
|
|
2018-01-13 19:59:05 +01:00
|
|
|
default:
|
|
|
|
$branch = 'rs_prerelease';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $branch;
|
|
|
|
}
|
|
|
|
|
2017-09-22 21:24:31 +02:00
|
|
|
// Composes POST data for gathering list of urls for download
|
2021-02-06 14:26:21 +01:00
|
|
|
function composeFileGetRequest($updateId, $device, $info, $rev = 1, $type = 'Production') {
|
2018-12-13 21:19:51 +01:00
|
|
|
$uuid = genUUID();
|
2017-10-23 22:53:33 +02:00
|
|
|
|
|
|
|
$createdTime = time();
|
|
|
|
$expiresTime = $createdTime + 120;
|
|
|
|
|
|
|
|
$created = gmdate(DATE_W3C, $createdTime);
|
|
|
|
$expires = gmdate(DATE_W3C, $expiresTime);
|
|
|
|
|
2021-02-06 14:26:21 +01:00
|
|
|
//$branch = branchFromBuild($info['checkBuild']);
|
2017-10-23 22:53:33 +02:00
|
|
|
|
2018-01-13 19:59:05 +01:00
|
|
|
$deviceAttributes = composeDeviceAttributes(
|
|
|
|
$info['flight'],
|
|
|
|
$info['ring'],
|
|
|
|
$info['checkBuild'],
|
2018-04-29 21:33:19 +02:00
|
|
|
$info['arch'],
|
2021-02-06 14:26:21 +01:00
|
|
|
$info['sku'],
|
|
|
|
$type
|
2018-01-13 19:59:05 +01:00
|
|
|
);
|
2017-10-23 22:53:33 +02:00
|
|
|
|
2019-01-31 20:17:41 +01:00
|
|
|
return <<<XML
|
|
|
|
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
|
|
|
|
<s:Header>
|
|
|
|
<a:Action s:mustUnderstand="1">http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetExtendedUpdateInfo2</a:Action>
|
|
|
|
<a:MessageID>urn:uuid:$uuid</a:MessageID>
|
|
|
|
<a:To s:mustUnderstand="1">https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured</a:To>
|
|
|
|
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
|
|
|
|
<Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
|
|
|
<Created>$created</Created>
|
|
|
|
<Expires>$expires</Expires>
|
|
|
|
</Timestamp>
|
|
|
|
<wuws:WindowsUpdateTicketsToken wsu:id="ClientMSA" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wuws="http://schemas.microsoft.com/msus/2014/10/WindowsUpdateAuthorization">
|
|
|
|
<TicketType Name="MSA" Version="1.0" Policy="MBI_SSL">
|
|
|
|
<Device>$device</Device>
|
|
|
|
</TicketType>
|
|
|
|
</wuws:WindowsUpdateTicketsToken>
|
|
|
|
</o:Security>
|
|
|
|
</s:Header>
|
|
|
|
<s:Body>
|
|
|
|
<GetExtendedUpdateInfo2 xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService">
|
|
|
|
<updateIDs>
|
|
|
|
<UpdateIdentity>
|
|
|
|
<UpdateID>$updateId</UpdateID>
|
|
|
|
<RevisionNumber>$rev</RevisionNumber>
|
|
|
|
</UpdateIdentity>
|
|
|
|
</updateIDs>
|
|
|
|
<infoTypes>
|
|
|
|
<XmlUpdateFragmentType>FileUrl</XmlUpdateFragmentType>
|
|
|
|
<XmlUpdateFragmentType>FileDecryption</XmlUpdateFragmentType>
|
2019-07-27 19:43:02 +02:00
|
|
|
<XmlUpdateFragmentType>EsrpDecryptionInformation</XmlUpdateFragmentType>
|
|
|
|
<XmlUpdateFragmentType>PiecesHashUrl</XmlUpdateFragmentType>
|
|
|
|
<XmlUpdateFragmentType>BlockMapUrl</XmlUpdateFragmentType>
|
2019-01-31 20:17:41 +01:00
|
|
|
</infoTypes>
|
|
|
|
<deviceAttributes>$deviceAttributes</deviceAttributes>
|
|
|
|
</GetExtendedUpdateInfo2>
|
|
|
|
</s:Body>
|
|
|
|
</s:Envelope>
|
|
|
|
XML;
|
2017-09-22 21:24:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Composes POST data for fetching the latest update information from Windows Update
|
2021-02-06 14:26:21 +01:00
|
|
|
function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build, $sku = 48, $type = 'Production') {
|
2018-12-13 21:19:51 +01:00
|
|
|
$uuid = genUUID();
|
2017-10-23 22:53:33 +02:00
|
|
|
|
|
|
|
$createdTime = time();
|
|
|
|
$expiresTime = $createdTime + 120;
|
2018-12-13 23:18:34 +01:00
|
|
|
$cookieExpiresTime = $createdTime + 604800;
|
2017-10-23 22:53:33 +02:00
|
|
|
|
|
|
|
$created = gmdate(DATE_W3C, $createdTime);
|
|
|
|
$expires = gmdate(DATE_W3C, $expiresTime);
|
2018-12-13 23:18:34 +01:00
|
|
|
$cookieExpires = gmdate(DATE_W3C, $cookieExpiresTime);
|
2017-10-23 22:53:33 +02:00
|
|
|
|
2018-01-13 19:59:05 +01:00
|
|
|
$branch = branchFromBuild($build);
|
2017-10-23 22:53:33 +02:00
|
|
|
|
2021-02-06 14:26:21 +01:00
|
|
|
$mainProduct = 'Client.OS.rs2';
|
2022-03-05 19:46:31 +01:00
|
|
|
if(in_array($sku, [7,8,12,13,79,80,120,145,146,147,148,159,160,406,407,408])) {
|
2019-03-17 18:04:51 +01:00
|
|
|
$mainProduct = 'Server.OS';
|
2021-02-06 14:26:21 +01:00
|
|
|
}
|
|
|
|
/*/ Hololens
|
|
|
|
if($sku == 135) {
|
|
|
|
$mainProduct = 'HoloLens.OS.RS2';
|
|
|
|
}*/
|
|
|
|
// HubOS
|
|
|
|
if($sku == 180) {
|
|
|
|
$mainProduct = 'WCOSDevice2.OS';
|
|
|
|
}
|
|
|
|
// Andromeda
|
|
|
|
if($sku == 184) {
|
|
|
|
$mainProduct = 'WCOSDevice1.OS';
|
|
|
|
}
|
|
|
|
// Lite
|
|
|
|
if($sku == 189) {
|
|
|
|
$mainProduct = 'WCOSDevice0.OS';
|
2019-03-17 18:04:51 +01:00
|
|
|
}
|
|
|
|
|
2019-06-16 19:00:45 +02:00
|
|
|
if($arch == 'all') {
|
|
|
|
$arch = array(
|
|
|
|
'amd64',
|
|
|
|
'x86',
|
|
|
|
'arm64',
|
|
|
|
'arm',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!is_array($arch)) {
|
|
|
|
$arch = array($arch);
|
|
|
|
}
|
|
|
|
|
|
|
|
$products = array();
|
|
|
|
foreach($arch as $currArch) {
|
|
|
|
$products[] = "PN=$mainProduct.$currArch&Branch=$branch&PrimaryOSProduct=1&Repairable=1&V=$build&ReofferUpdate=1";
|
2021-09-24 17:27:44 +02:00
|
|
|
$products[] = "PN=Adobe.Flash.$currArch&Repairable=1&V=0.0.0.0";
|
|
|
|
$products[] = "PN=Microsoft.Edge.Stable.$currArch&Repairable=1&V=0.0.0.0";
|
|
|
|
$products[] = "PN=Microsoft.NETFX.$currArch&V=2018.12.2.0";
|
2019-06-16 19:00:45 +02:00
|
|
|
$products[] = "PN=Windows.Appraiser.$currArch&Repairable=1&V=$build";
|
|
|
|
$products[] = "PN=Windows.AppraiserData.$currArch&Repairable=1&V=$build";
|
2021-09-24 17:27:44 +02:00
|
|
|
$products[] = "PN=Windows.EmergencyUpdate.$currArch&V=$build";
|
2021-01-26 22:52:54 +01:00
|
|
|
$products[] = "PN=Windows.FeatureExperiencePack.$currArch&Repairable=1&V=0.0.0.0";
|
2019-10-24 20:49:08 +02:00
|
|
|
$products[] = "PN=Windows.ManagementOOBE.$currArch&IsWindowsManagementOOBE=1&Repairable=1&V=$build";
|
2019-06-16 19:00:45 +02:00
|
|
|
$products[] = "PN=Windows.OOBE.$currArch&IsWindowsOOBE=1&Repairable=1&V=$build";
|
|
|
|
$products[] = "PN=Windows.UpdateStackPackage.$currArch&Name=Update Stack Package&Repairable=1&V=$build";
|
|
|
|
$products[] = "PN=Hammer.$currArch&Source=UpdateOrchestrator&V=0.0.0.0";
|
|
|
|
$products[] = "PN=MSRT.$currArch&Source=UpdateOrchestrator&V=0.0.0.0";
|
|
|
|
$products[] = "PN=SedimentPack.$currArch&Source=UpdateOrchestrator&V=0.0.0.0";
|
2021-09-24 17:27:44 +02:00
|
|
|
$products[] = "PN=UUS.$currArch&Source=UpdateOrchestrator&V=0.0.0.0";
|
2019-06-16 19:00:45 +02:00
|
|
|
}
|
2018-01-13 19:59:05 +01:00
|
|
|
|
|
|
|
$callerAttrib = array(
|
2021-05-27 22:28:47 +02:00
|
|
|
'Profile=AUv2',
|
|
|
|
'Acquisition=1',
|
2018-01-13 19:59:05 +01:00
|
|
|
'Interactive=1',
|
2021-01-19 08:06:51 +01:00
|
|
|
'IsSeeker=1',
|
2020-01-15 19:10:26 +01:00
|
|
|
'SheddingAware=1',
|
|
|
|
'Id=MoUpdateOrchestrator',
|
2018-01-13 19:59:05 +01:00
|
|
|
);
|
|
|
|
|
2018-09-21 18:01:12 +02:00
|
|
|
$products = htmlentities(implode(';', $products));
|
|
|
|
$callerAttrib = htmlentities('E:'.implode('&', $callerAttrib));
|
2018-01-13 19:59:05 +01:00
|
|
|
|
|
|
|
$deviceAttributes = composeDeviceAttributes(
|
|
|
|
$flight,
|
|
|
|
$ring,
|
|
|
|
$build,
|
2018-04-29 21:33:19 +02:00
|
|
|
$arch,
|
2021-02-06 14:26:21 +01:00
|
|
|
$sku,
|
|
|
|
$type
|
2018-01-13 19:59:05 +01:00
|
|
|
);
|
2017-10-23 22:53:33 +02:00
|
|
|
|
2019-01-31 20:17:41 +01:00
|
|
|
return <<<XML
|
|
|
|
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
|
|
|
|
<s:Header>
|
|
|
|
<a:Action s:mustUnderstand="1">http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/SyncUpdates</a:Action>
|
|
|
|
<a:MessageID>urn:uuid:$uuid</a:MessageID>
|
|
|
|
<a:To s:mustUnderstand="1">https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx</a:To>
|
|
|
|
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
|
|
|
|
<Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
|
|
|
<Created>$created</Created>
|
|
|
|
<Expires>$expires</Expires>
|
|
|
|
</Timestamp>
|
|
|
|
<wuws:WindowsUpdateTicketsToken wsu:id="ClientMSA" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wuws="http://schemas.microsoft.com/msus/2014/10/WindowsUpdateAuthorization">
|
|
|
|
<TicketType Name="MSA" Version="1.0" Policy="MBI_SSL">
|
|
|
|
<Device>$device</Device>
|
|
|
|
</TicketType>
|
|
|
|
</wuws:WindowsUpdateTicketsToken>
|
|
|
|
</o:Security>
|
|
|
|
</s:Header>
|
|
|
|
<s:Body>
|
|
|
|
<SyncUpdates xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService">
|
|
|
|
<cookie>
|
|
|
|
<Expiration>$cookieExpires</Expiration>
|
|
|
|
<EncryptedData>$encData</EncryptedData>
|
|
|
|
</cookie>
|
|
|
|
<parameters>
|
|
|
|
<ExpressQuery>false</ExpressQuery>
|
2019-05-24 18:25:57 +02:00
|
|
|
<InstalledNonLeafUpdateIDs>
|
|
|
|
<int>1</int>
|
|
|
|
<int>10</int>
|
|
|
|
<int>105939029</int>
|
|
|
|
<int>105995585</int>
|
|
|
|
<int>106017178</int>
|
|
|
|
<int>107825194</int>
|
|
|
|
<int>10809856</int>
|
|
|
|
<int>11</int>
|
|
|
|
<int>117765322</int>
|
|
|
|
<int>129905029</int>
|
|
|
|
<int>130040030</int>
|
|
|
|
<int>130040031</int>
|
|
|
|
<int>130040032</int>
|
|
|
|
<int>130040033</int>
|
|
|
|
<int>133399034</int>
|
|
|
|
<int>138372035</int>
|
|
|
|
<int>138372036</int>
|
|
|
|
<int>139536037</int>
|
|
|
|
<int>139536038</int>
|
|
|
|
<int>139536039</int>
|
|
|
|
<int>139536040</int>
|
|
|
|
<int>142045136</int>
|
|
|
|
<int>158941041</int>
|
|
|
|
<int>158941042</int>
|
|
|
|
<int>158941043</int>
|
|
|
|
<int>158941044</int>
|
|
|
|
<int>159776047</int>
|
|
|
|
<int>160733048</int>
|
|
|
|
<int>160733049</int>
|
|
|
|
<int>160733050</int>
|
|
|
|
<int>160733051</int>
|
|
|
|
<int>160733055</int>
|
|
|
|
<int>160733056</int>
|
|
|
|
<int>161870057</int>
|
|
|
|
<int>161870058</int>
|
|
|
|
<int>161870059</int>
|
|
|
|
<int>17</int>
|
|
|
|
<int>19</int>
|
|
|
|
<int>2</int>
|
|
|
|
<int>23110993</int>
|
|
|
|
<int>23110994</int>
|
|
|
|
<int>23110995</int>
|
|
|
|
<int>23110996</int>
|
|
|
|
<int>23110999</int>
|
|
|
|
<int>23111000</int>
|
|
|
|
<int>23111001</int>
|
|
|
|
<int>23111002</int>
|
|
|
|
<int>23111003</int>
|
|
|
|
<int>23111004</int>
|
|
|
|
<int>2359974</int>
|
|
|
|
<int>2359977</int>
|
|
|
|
<int>24513870</int>
|
|
|
|
<int>28880263</int>
|
|
|
|
<int>3</int>
|
|
|
|
<int>30077688</int>
|
|
|
|
<int>30486944</int>
|
|
|
|
<int>5143990</int>
|
|
|
|
<int>5169043</int>
|
|
|
|
<int>5169044</int>
|
|
|
|
<int>5169047</int>
|
|
|
|
<int>59830006</int>
|
|
|
|
<int>59830007</int>
|
|
|
|
<int>59830008</int>
|
|
|
|
<int>60484010</int>
|
|
|
|
<int>62450018</int>
|
|
|
|
<int>62450019</int>
|
|
|
|
<int>62450020</int>
|
|
|
|
<int>69801474</int>
|
|
|
|
<int>8788830</int>
|
|
|
|
<int>8806526</int>
|
|
|
|
<int>9125350</int>
|
|
|
|
<int>9154769</int>
|
|
|
|
<int>98959022</int>
|
|
|
|
<int>98959023</int>
|
|
|
|
<int>98959024</int>
|
|
|
|
<int>98959025</int>
|
|
|
|
<int>98959026</int>
|
|
|
|
</InstalledNonLeafUpdateIDs>
|
2019-01-31 20:17:41 +01:00
|
|
|
<OtherCachedUpdateIDs/>
|
|
|
|
<SkipSoftwareSync>false</SkipSoftwareSync>
|
|
|
|
<NeedTwoGroupOutOfScopeUpdates>true</NeedTwoGroupOutOfScopeUpdates>
|
|
|
|
<AlsoPerformRegularSync>true</AlsoPerformRegularSync>
|
|
|
|
<ComputerSpec/>
|
|
|
|
<ExtendedUpdateInfoParameters>
|
|
|
|
<XmlUpdateFragmentTypes>
|
|
|
|
<XmlUpdateFragmentType>Extended</XmlUpdateFragmentType>
|
|
|
|
<XmlUpdateFragmentType>LocalizedProperties</XmlUpdateFragmentType>
|
|
|
|
</XmlUpdateFragmentTypes>
|
|
|
|
<Locales>
|
|
|
|
<string>en-US</string>
|
|
|
|
</Locales>
|
|
|
|
</ExtendedUpdateInfoParameters>
|
|
|
|
<ClientPreferredLanguages/>
|
|
|
|
<ProductsParameters>
|
|
|
|
<SyncCurrentVersionOnly>false</SyncCurrentVersionOnly>
|
|
|
|
<DeviceAttributes>$deviceAttributes</DeviceAttributes>
|
|
|
|
<CallerAttributes>$callerAttrib</CallerAttributes>
|
|
|
|
<Products>$products</Products>
|
|
|
|
</ProductsParameters>
|
|
|
|
</parameters>
|
|
|
|
</SyncUpdates>
|
|
|
|
</s:Body>
|
|
|
|
</s:Envelope>
|
|
|
|
XML;
|
2017-09-22 21:24:31 +02:00
|
|
|
}
|
2018-12-13 21:19:51 +01:00
|
|
|
|
|
|
|
// Composes POST data for Get Cookie request
|
|
|
|
function composeGetCookieRequest($device) {
|
|
|
|
$uuid = genUUID();
|
|
|
|
|
|
|
|
$createdTime = time();
|
|
|
|
$expiresTime = $createdTime + 120;
|
|
|
|
|
|
|
|
$created = gmdate(DATE_W3C, $createdTime);
|
|
|
|
$expires = gmdate(DATE_W3C, $expiresTime);
|
|
|
|
|
2019-01-31 20:17:41 +01:00
|
|
|
return <<<XML
|
|
|
|
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
|
|
|
|
<s:Header>
|
|
|
|
<a:Action s:mustUnderstand="1">http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetCookie</a:Action>
|
|
|
|
<a:MessageID>urn:uuid:$uuid</a:MessageID>
|
|
|
|
<a:To s:mustUnderstand="1">https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx</a:To>
|
|
|
|
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
|
|
|
|
<Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
|
|
|
<Created>$created</Created>
|
|
|
|
<Expires>$expires</Expires>
|
|
|
|
</Timestamp>
|
|
|
|
<wuws:WindowsUpdateTicketsToken wsu:id="ClientMSA" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wuws="http://schemas.microsoft.com/msus/2014/10/WindowsUpdateAuthorization">
|
|
|
|
<TicketType Name="MSA" Version="1.0" Policy="MBI_SSL">
|
|
|
|
<Device>$device</Device>
|
|
|
|
</TicketType>
|
|
|
|
</wuws:WindowsUpdateTicketsToken>
|
|
|
|
</o:Security>
|
|
|
|
</s:Header>
|
|
|
|
<s:Body>
|
|
|
|
<GetCookie xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService">
|
|
|
|
<oldCookie>
|
|
|
|
<Expiration>$created</Expiration>
|
|
|
|
</oldCookie>
|
|
|
|
<lastChange>$created</lastChange>
|
|
|
|
<currentTime>$created</currentTime>
|
|
|
|
<protocolVersion>2.0</protocolVersion>
|
|
|
|
</GetCookie>
|
|
|
|
</s:Body>
|
|
|
|
</s:Envelope>
|
|
|
|
XML;
|
2018-12-13 21:19:51 +01:00
|
|
|
}
|