Added additional DeviceAttributes needed to properly fetch 16299.192

This commit is contained in:
mkuba50 2018-01-07 01:17:08 +01:00
parent 6e9c0d7169
commit 6325fff8b6
3 changed files with 13 additions and 7 deletions

View File

@ -109,7 +109,13 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build
$updateTitle = 'Windows 10 build '.$foundBuild; $updateTitle = 'Windows 10 build '.$foundBuild;
} }
$updateTitle = preg_replace('/ for .{3,5}-based systems/i', '', $updateTitle); $isCumulativeUpdate = 0;
if(preg_match('/Cumulative Update/', $updateTitle)) {
$updateTitle = preg_replace('/.*Cumulative Update/i', 'Cumulative Update', $updateTitle);
$updateTitle = preg_replace('/ for .{3,5}-based systems| \(KB.*?\)/i', '', $updateTitle);
$updateTitle = $updateTitle.' ('.$foundBuild.')';
$isCumulativeUpdate = 1;
}
if(preg_match('/Feature update/i', $updateTitle)) { if(preg_match('/Feature update/i', $updateTitle)) {
$updateTitle = $updateTitle.' ('.$foundBuild.')'; $updateTitle = $updateTitle.' ('.$foundBuild.')';
@ -171,7 +177,7 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build
$temp['build'] = $foundBuild; $temp['build'] = $foundBuild;
$temp['checkBuild'] = $build; $temp['checkBuild'] = $build;
if(preg_match('/Cumulative Update/', $updateTitle)) { if($isCumulativeUpdate) {
$temp['containsCU'] = 1; $temp['containsCU'] = 1;
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
*/ */
function uupApiVersion() { function uupApiVersion() {
return '1.8.1'; return '1.8.2';
} }
function uupApiPrintBrand() { function uupApiPrintBrand() {

View File

@ -28,12 +28,12 @@ function composeFileGetRequest($updateId, $device, $info, $rev = 1) {
$flightEnabled = 1; $flightEnabled = 1;
$branch = 'rs_prerelease'; $branch = 'rs_prerelease';
if($info['ring'] == 'Retail') { if($info['ring'] == 'RETAIL') {
$flightEnabled = 0; $flightEnabled = 0;
$branch = 'rs2_release'; $branch = 'rs2_release';
} }
return '<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></infoTypes><deviceAttributes>E:BranchReadinessLevel=CB&amp;GStatus_RS3=2&amp;CurrentBranch='.$branch.'&amp;FlightContent='.$info['flight'].'&amp;FlightingBranchName=external&amp;FlightRing='.$info['ring'].'&amp;AttrDataVer=26&amp;InstallLanguage=en-US&amp;OSUILocale=en-US&amp;InstallationType=Client&amp;FirmwareVersion=6.00&amp;OSSkuId=48&amp;App=WU&amp;ProcessorManufacturer=GenuineIntel&amp;AppVer='.$info['checkBuild'].'&amp;UpgEx_RS3=Green&amp;OSArchitecture=AMD64&amp;UpdateManagementGroup=2&amp;IsFlightingEnabled='.$flightEnabled.'&amp;IsDeviceRetailDemo=0&amp;TelemetryLevel=1&amp;WuClientVer='.$info['checkBuild'].'&amp;Free=32to64&amp;OSVersion='.$info['checkBuild'].'&amp;DeviceFamily=Windows.Desktop&amp;</deviceAttributes></GetExtendedUpdateInfo2></s:Body></s:Envelope>'; return '<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></infoTypes><deviceAttributes>E:BranchReadinessLevel=CB&amp;GStatus_RS3=2&amp;PonchAllow=1&amp;CurrentBranch='.$branch.'&amp;FlightContent='.$info['flight'].'&amp;FlightingBranchName=external&amp;FlightRing='.$info['ring'].'&amp;AttrDataVer=29&amp;InstallLanguage=en-US&amp;OSUILocale=en-US&amp;InstallationType=Client&amp;FirmwareVersion=6.00&amp;OSSkuId=48&amp;App=WU&amp;ProcessorManufacturer=GenuineIntel&amp;AppVer='.$info['checkBuild'].'&amp;UpgEx_RS3=Green&amp;OSArchitecture=AMD64&amp;UpdateManagementGroup=2&amp;IsFlightingEnabled='.$flightEnabled.'&amp;IsDeviceRetailDemo=0&amp;TelemetryLevel=1&amp;WuClientVer='.$info['checkBuild'].'&amp;Free=32to64&amp;OSVersion='.$info['checkBuild'].'&amp;DeviceFamily=Windows.Desktop&amp;</deviceAttributes></GetExtendedUpdateInfo2></s:Body></s:Envelope>';
} }
// Composes POST data for fetching the latest update information from Windows Update // Composes POST data for fetching the latest update information from Windows Update
@ -49,11 +49,11 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
$flightEnabled = 1; $flightEnabled = 1;
$branch = 'rs_prerelease'; $branch = 'rs_prerelease';
if($ring == 'Retail') { if($ring == 'RETAIL') {
$flightEnabled = 0; $flightEnabled = 0;
$branch = 'rs2_release'; $branch = 'rs2_release';
} }
return '<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>2045-04-07T12:38:34Z</Expiration><EncryptedData>'.$encData.'</EncryptedData></cookie><parameters><ExpressQuery>false</ExpressQuery><InstalledNonLeafUpdateIDs></InstalledNonLeafUpdateIDs><OtherCachedUpdateIDs></OtherCachedUpdateIDs><SkipSoftwareSync>false</SkipSoftwareSync><NeedTwoGroupOutOfScopeUpdates>true</NeedTwoGroupOutOfScopeUpdates><AlsoPerformRegularSync>true</AlsoPerformRegularSync><ComputerSpec/><ExtendedUpdateInfoParameters><XmlUpdateFragmentTypes><XmlUpdateFragmentType>Extended</XmlUpdateFragmentType><XmlUpdateFragmentType>LocalizedProperties</XmlUpdateFragmentType><XmlUpdateFragmentType>Eula</XmlUpdateFragmentType></XmlUpdateFragmentTypes><Locales><string>en-US</string></Locales></ExtendedUpdateInfoParameters><ClientPreferredLanguages></ClientPreferredLanguages><ProductsParameters><SyncCurrentVersionOnly>false</SyncCurrentVersionOnly><DeviceAttributes>E:BranchReadinessLevel=CB&amp;GStatus_RS3=2&amp;CurrentBranch='.$branch.'&amp;FlightContent='.$flight.'&amp;FlightingBranchName=external&amp;FlightRing='.$ring.'&amp;AttrDataVer=26&amp;InstallLanguage=en-US&amp;OSUILocale=en-US&amp;InstallationType=Client&amp;FirmwareVersion=6.00&amp;OSSkuId=48&amp;App=WU&amp;ProcessorManufacturer=GenuineIntel&amp;AppVer='.$build.'&amp;UpgEx_RS3=Green&amp;OSArchitecture=AMD64&amp;UpdateManagementGroup=2&amp;IsFlightingEnabled='.$flightEnabled.'&amp;IsDeviceRetailDemo=0&amp;TelemetryLevel=1&amp;WuClientVer='.$build.'&amp;Free=32to64&amp;OSVersion='.$build.'&amp;DeviceFamily=Windows.Desktop</DeviceAttributes><CallerAttributes>E:Interactive=1&amp;IsSeeker=1&amp;Id=UpdateOrchestrator&amp;</CallerAttributes><Products>PN=Client.OS.rs2.'.$arch.'&amp;Branch='.$branch.'&amp;PrimaryOSProduct=1&amp;V='.$build.';</Products></ProductsParameters></parameters></SyncUpdates></s:Body></s:Envelope>'; return '<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>2045-04-07T12:38:34Z</Expiration><EncryptedData>'.$encData.'</EncryptedData></cookie><parameters><ExpressQuery>false</ExpressQuery><InstalledNonLeafUpdateIDs></InstalledNonLeafUpdateIDs><OtherCachedUpdateIDs></OtherCachedUpdateIDs><SkipSoftwareSync>false</SkipSoftwareSync><NeedTwoGroupOutOfScopeUpdates>true</NeedTwoGroupOutOfScopeUpdates><AlsoPerformRegularSync>true</AlsoPerformRegularSync><ComputerSpec/><ExtendedUpdateInfoParameters><XmlUpdateFragmentTypes><XmlUpdateFragmentType>Extended</XmlUpdateFragmentType><XmlUpdateFragmentType>LocalizedProperties</XmlUpdateFragmentType><XmlUpdateFragmentType>Eula</XmlUpdateFragmentType></XmlUpdateFragmentTypes><Locales><string>en-US</string></Locales></ExtendedUpdateInfoParameters><ClientPreferredLanguages></ClientPreferredLanguages><ProductsParameters><SyncCurrentVersionOnly>false</SyncCurrentVersionOnly><DeviceAttributes>E:BranchReadinessLevel=CB&amp;GStatus_RS3=2&amp;PonchAllow=1&amp;CurrentBranch='.$branch.'&amp;FlightContent='.$flight.'&amp;FlightingBranchName=external&amp;FlightRing='.$ring.'&amp;AttrDataVer=29&amp;InstallLanguage=en-US&amp;OSUILocale=en-US&amp;InstallationType=Client&amp;FirmwareVersion=6.00&amp;OSSkuId=48&amp;App=WU&amp;ProcessorManufacturer=GenuineIntel&amp;AppVer='.$build.'&amp;UpgEx_RS3=Green&amp;OSArchitecture=AMD64&amp;UpdateManagementGroup=2&amp;IsFlightingEnabled='.$flightEnabled.'&amp;IsDeviceRetailDemo=0&amp;TelemetryLevel=1&amp;WuClientVer='.$build.'&amp;Free=32to64&amp;OSVersion='.$build.'&amp;DeviceFamily=Windows.Desktop</DeviceAttributes><CallerAttributes>E:Interactive=1&amp;IsSeeker=1&amp;Id=UpdateOrchestrator&amp;</CallerAttributes><Products>PN=Client.OS.rs2.'.$arch.'&amp;Branch='.$branch.'&amp;PrimaryOSProduct=1&amp;V='.$build.';</Products></ProductsParameters></parameters></SyncUpdates></s:Body></s:Envelope>';
} }
?> ?>