diff --git a/fetchupd.php b/fetchupd.php index afba2af..ad432bb 100644 --- a/fetchupd.php +++ b/fetchupd.php @@ -109,7 +109,13 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build $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)) { $updateTitle = $updateTitle.' ('.$foundBuild.')'; @@ -171,7 +177,7 @@ function uupFetchUpd($arch = 'amd64', $ring = 'WIF', $flight = 'Active', $build $temp['build'] = $foundBuild; $temp['checkBuild'] = $build; - if(preg_match('/Cumulative Update/', $updateTitle)) { + if($isCumulativeUpdate) { $temp['containsCU'] = 1; } diff --git a/shared/main.php b/shared/main.php index 4f753a7..d640f0e 100644 --- a/shared/main.php +++ b/shared/main.php @@ -16,7 +16,7 @@ limitations under the License. */ function uupApiVersion() { - return '1.8.1'; + return '1.8.2'; } function uupApiPrintBrand() { diff --git a/shared/requests.php b/shared/requests.php index 9d47834..15e6da6 100644 --- a/shared/requests.php +++ b/shared/requests.php @@ -28,12 +28,12 @@ function composeFileGetRequest($updateId, $device, $info, $rev = 1) { $flightEnabled = 1; $branch = 'rs_prerelease'; - if($info['ring'] == 'Retail') { + if($info['ring'] == 'RETAIL') { $flightEnabled = 0; $branch = 'rs2_release'; } - return 'http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetExtendedUpdateInfo2urn:uuid:'.$uuid.'https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured'.$created.''.$expires.''.$device.''.$updateId.''.$rev.'FileUrlFileDecryptionE:BranchReadinessLevel=CB&GStatus_RS3=2&CurrentBranch='.$branch.'&FlightContent='.$info['flight'].'&FlightingBranchName=external&FlightRing='.$info['ring'].'&AttrDataVer=26&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FirmwareVersion=6.00&OSSkuId=48&App=WU&ProcessorManufacturer=GenuineIntel&AppVer='.$info['checkBuild'].'&UpgEx_RS3=Green&OSArchitecture=AMD64&UpdateManagementGroup=2&IsFlightingEnabled='.$flightEnabled.'&IsDeviceRetailDemo=0&TelemetryLevel=1&WuClientVer='.$info['checkBuild'].'&Free=32to64&OSVersion='.$info['checkBuild'].'&DeviceFamily=Windows.Desktop&'; + return 'http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetExtendedUpdateInfo2urn:uuid:'.$uuid.'https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured'.$created.''.$expires.''.$device.''.$updateId.''.$rev.'FileUrlFileDecryptionE:BranchReadinessLevel=CB&GStatus_RS3=2&PonchAllow=1&CurrentBranch='.$branch.'&FlightContent='.$info['flight'].'&FlightingBranchName=external&FlightRing='.$info['ring'].'&AttrDataVer=29&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FirmwareVersion=6.00&OSSkuId=48&App=WU&ProcessorManufacturer=GenuineIntel&AppVer='.$info['checkBuild'].'&UpgEx_RS3=Green&OSArchitecture=AMD64&UpdateManagementGroup=2&IsFlightingEnabled='.$flightEnabled.'&IsDeviceRetailDemo=0&TelemetryLevel=1&WuClientVer='.$info['checkBuild'].'&Free=32to64&OSVersion='.$info['checkBuild'].'&DeviceFamily=Windows.Desktop&'; } // 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; $branch = 'rs_prerelease'; - if($ring == 'Retail') { + if($ring == 'RETAIL') { $flightEnabled = 0; $branch = 'rs2_release'; } - return 'http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/SyncUpdatesurn:uuid:'.$uuid.'https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx'.$created.''.$expires.''.$device.'2045-04-07T12:38:34Z'.$encData.'falsefalsetruetrueExtendedLocalizedPropertiesEulaen-USfalseE:BranchReadinessLevel=CB&GStatus_RS3=2&CurrentBranch='.$branch.'&FlightContent='.$flight.'&FlightingBranchName=external&FlightRing='.$ring.'&AttrDataVer=26&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FirmwareVersion=6.00&OSSkuId=48&App=WU&ProcessorManufacturer=GenuineIntel&AppVer='.$build.'&UpgEx_RS3=Green&OSArchitecture=AMD64&UpdateManagementGroup=2&IsFlightingEnabled='.$flightEnabled.'&IsDeviceRetailDemo=0&TelemetryLevel=1&WuClientVer='.$build.'&Free=32to64&OSVersion='.$build.'&DeviceFamily=Windows.DesktopE:Interactive=1&IsSeeker=1&Id=UpdateOrchestrator&PN=Client.OS.rs2.'.$arch.'&Branch='.$branch.'&PrimaryOSProduct=1&V='.$build.';'; + return 'http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/SyncUpdatesurn:uuid:'.$uuid.'https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx'.$created.''.$expires.''.$device.'2045-04-07T12:38:34Z'.$encData.'falsefalsetruetrueExtendedLocalizedPropertiesEulaen-USfalseE:BranchReadinessLevel=CB&GStatus_RS3=2&PonchAllow=1&CurrentBranch='.$branch.'&FlightContent='.$flight.'&FlightingBranchName=external&FlightRing='.$ring.'&AttrDataVer=29&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FirmwareVersion=6.00&OSSkuId=48&App=WU&ProcessorManufacturer=GenuineIntel&AppVer='.$build.'&UpgEx_RS3=Green&OSArchitecture=AMD64&UpdateManagementGroup=2&IsFlightingEnabled='.$flightEnabled.'&IsDeviceRetailDemo=0&TelemetryLevel=1&WuClientVer='.$build.'&Free=32to64&OSVersion='.$build.'&DeviceFamily=Windows.DesktopE:Interactive=1&IsSeeker=1&Id=UpdateOrchestrator&PN=Client.OS.rs2.'.$arch.'&Branch='.$branch.'&PrimaryOSProduct=1&V='.$build.';'; } ?>