Compare commits
6 Commits
1fc14b6fd4
...
8959eb14a4
Author | SHA1 | Date | |
---|---|---|---|
8959eb14a4 | |||
ada8ae6011 | |||
492fd22e46 | |||
03258c7bfe | |||
c7512dd40d | |||
b1d8121507 |
10
fetchupd.php
10
fetchupd.php
@ -39,14 +39,18 @@ function uupFetchUpd(
|
||||
$flight = 'Active';
|
||||
|
||||
if($build == 'latest' || (!$build)) {
|
||||
$builds = array('17134.1');
|
||||
$builds = array('22000.1');
|
||||
|
||||
$ids = uupListIds();
|
||||
if(isset($ids['error'])) {
|
||||
$ids['builds'] = array();
|
||||
}
|
||||
|
||||
$build = $ids['builds'][0]['build'];
|
||||
if(empty($ids['builds'])) {
|
||||
$build = $builds[0];
|
||||
} else {
|
||||
$build = $ids['builds'][0]['build'];
|
||||
}
|
||||
unset($builds, $ids);
|
||||
}
|
||||
|
||||
@ -59,7 +63,7 @@ function uupFetchUpd(
|
||||
return array('error' => 'UNKNOWN_ARCH');
|
||||
}
|
||||
|
||||
if(!($ring == 'DEV' || $ring == 'BETA' || $ring == 'RELEASEPREVIEW' || $ring == 'WIF' || $ring == 'WIS' || $ring == 'RP' || $ring == 'RETAIL' || $ring == 'MSIT')) {
|
||||
if(!($ring == 'CANARY' || $ring == 'DEV' || $ring == 'BETA' || $ring == 'RELEASEPREVIEW' || $ring == 'WIF' || $ring == 'WIS' || $ring == 'RP' || $ring == 'RETAIL' || $ring == 'MSIT')) {
|
||||
return array('error' => 'UNKNOWN_RING');
|
||||
}
|
||||
|
||||
|
35
get.php
35
get.php
@ -48,7 +48,7 @@ function uupGetFiles(
|
||||
}
|
||||
|
||||
$edition = is_array($desiredEdition) ? implode('_', $desiredEdition) : $desiredEdition;
|
||||
$res = "api-get-${updateId}_${usePack}_${edition}_${requestType}";
|
||||
$res = "api-get-{$updateId}_{$usePack}_{$edition}_{$requestType}";
|
||||
$cache = new UupDumpCache($res);
|
||||
$fromCache = $cache->get();
|
||||
if($fromCache !== false) return $fromCache;
|
||||
@ -113,14 +113,18 @@ function uupGetFiles(
|
||||
case 'UPDATEONLY': break;
|
||||
|
||||
case 'APP': $appEdition = 1;
|
||||
case 'APP_MOMENT': $appEdition = 1;
|
||||
|
||||
default:
|
||||
if(!isset($genPack[$usePack][$desiredEdition])) {
|
||||
return array('error' => 'UNSUPPORTED_COMBINATION');
|
||||
}
|
||||
|
||||
$filesPacksList = $genPack[$usePack][$desiredEdition];
|
||||
$fileListSource = 'GENERATEDPACKS';
|
||||
$filesPacksList = $genPack[$usePack][$desiredEdition];
|
||||
if($desiredEdition == 'APP' && isset($genPack[$usePack]['APP_MOMENT'])) {
|
||||
$filesPacksList = array_merge($filesPacksList, $genPack[$usePack]['APP_MOMENT']);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -133,6 +137,7 @@ function uupGetFiles(
|
||||
return array('error' => 'UNSUPPORTED_COMBINATION');
|
||||
}
|
||||
|
||||
if($edition == 'APP' || $edition == 'APP_MOMENT') $appEdition = 1;
|
||||
$filesPacksList = array_merge($filesPacksList, $genPack[$usePack][$edition]);
|
||||
}
|
||||
}
|
||||
@ -175,16 +180,34 @@ function uupGetFiles(
|
||||
if(isset($filesInfoList[$val])) unset($filesInfoList[$val]);
|
||||
}
|
||||
|
||||
$baseless = preg_grep('/^baseless_|Windows(10|11)\.0-KB.*-EXPRESS|SSU-.*-EXPRESS/i', array_keys($filesInfoList));
|
||||
$baseless = preg_grep('/^baseless_/i', array_keys($filesInfoList));
|
||||
foreach($baseless as $val) {
|
||||
if(isset($filesInfoList[$val])) unset($filesInfoList[$val]);
|
||||
}
|
||||
|
||||
$expresscab = preg_grep('/Windows(10|11)\.0-KB.*-EXPRESS|SSU-.*-EXPRESS/i', array_keys($filesInfoList));
|
||||
|
||||
$expresspsf = array();
|
||||
foreach($expresscab as $val) {
|
||||
$name = preg_replace('/-EXPRESS.cab$/i', '', $val);
|
||||
$expresspsf[] = $name;
|
||||
if(isset($filesInfoList[$val])) unset($filesInfoList[$val]);
|
||||
}
|
||||
unset($index, $name, $expresscab);
|
||||
|
||||
foreach($expresspsf as $val) {
|
||||
if(isset($filesInfoList[$val.'.cab'])) {
|
||||
if(isset($filesInfoList[$val.'.psf'])) unset($filesInfoList[$val.'.psf']);
|
||||
}
|
||||
}
|
||||
unset($expresspsf);
|
||||
|
||||
$psf = array_keys($filesInfoList);
|
||||
$psf = preg_grep('/\.psf$/i', $psf);
|
||||
|
||||
$psfk = preg_grep('/Windows(10|11)\.0-KB.*/i', $psf);
|
||||
$psfk = preg_grep('/.*-EXPRESS/i', $psfk, PREG_GREP_INVERT);
|
||||
if($build < 17763) $psfk = preg_grep('/Windows(10|11)\.0-KB.*_\d\.psf$/i', $psfk, PREG_GREP_INVERT);
|
||||
foreach($psfk as $key => $val) {
|
||||
if(isset($psf[$key])) unset($psf[$key]);
|
||||
}
|
||||
@ -227,7 +250,7 @@ function uupGetFiles(
|
||||
switch($fileListSource) {
|
||||
case 'UPDATEONLY':
|
||||
$skipPackBuild = 1;
|
||||
$removeFiles = preg_grep('/Windows(10|11)\.0-KB.*-EXPRESS|Windows(10|11)\.0-KB.*-baseless|SSU-.*-.{3,5}-EXPRESS/i', $filesInfoKeys);
|
||||
$removeFiles = preg_grep('/Windows(10|11)\.0-KB.*-baseless/i', $filesInfoKeys);
|
||||
|
||||
foreach($removeFiles as $val) {
|
||||
if(isset($filesInfoList[$val])) unset($filesInfoList[$val]);
|
||||
@ -273,7 +296,7 @@ function uupGetFiles(
|
||||
unset($removeMSUs);
|
||||
$filesInfoKeys = array_keys($filesInfoList);
|
||||
|
||||
$temp = preg_grep('/Windows(10|11)\.0-KB.*-EXPRESS|Windows(10|11)\.0-KB.*-baseless|SSU-.*-.{3,5}-EXPRESS/i', $filesInfoKeys, PREG_GREP_INVERT);
|
||||
$temp = preg_grep('/Windows(10|11)\.0-KB.*-baseless/i', $filesInfoKeys, PREG_GREP_INVERT);
|
||||
if($appEdition) {
|
||||
$temp = preg_grep('/.*?AggregatedMetadata.*?\.cab|.*?DesktopDeployment.*?\.cab/i', $temp);
|
||||
} else if($build > 21380) {
|
||||
@ -361,7 +384,7 @@ function uupGetFiles(
|
||||
}
|
||||
|
||||
function uupGetOnlineFiles($updateId, $rev, $info, $cacheRequests, $type) {
|
||||
$res = "api-get-online-${updateId}_rev.$rev";
|
||||
$res = "api-get-online-{$updateId}_rev.$rev";
|
||||
$cache = new UupDumpCache($res);
|
||||
$fromCache = $cache->get();
|
||||
$cached = ($fromCache !== false);
|
||||
|
@ -166,7 +166,7 @@ function uupListIds($search = null, $sortByDate = 0) {
|
||||
$cache->put($builds, 60);
|
||||
}
|
||||
|
||||
if($search != null) {
|
||||
if(count($builds) && $search != null) {
|
||||
if(!preg_match('/^regex:/', $search)) {
|
||||
$searchSafe = preg_quote($search, '/');
|
||||
|
||||
|
@ -10,7 +10,7 @@ Parameters:
|
||||
- **Supported values:** `amd64`, `x86`, `arm64`, `all`
|
||||
|
||||
- `ring` - Channel to use when fetching information (Previously called Ring)
|
||||
- **Supported values:** `Dev`, `Beta`, `ReleasePreview`, `Retail`
|
||||
- **Supported values:** `Canary`, `Dev`, `Beta`, `ReleasePreview`, `Retail`
|
||||
- **Supported Ring values :** `WIF`, `WIS`, `RP`
|
||||
|
||||
- `flight` - Content type to use when fetching information (Previously called Flight)
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
function uupApiVersion() {
|
||||
return '1.39.3';
|
||||
return '1.40.3';
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__).'/auths.php';
|
||||
|
@ -63,6 +63,7 @@ function uupGetInfoTexts() {
|
||||
|
||||
$fancyEditionNames = array(
|
||||
'APP' => 'Microsoft Store Inbox Apps',
|
||||
'APP_MOMENT' => 'Microsoft Store Moment Apps',
|
||||
'FOD' => 'Features on Demand (Capabilities)',
|
||||
'CLOUD' => 'Windows S',
|
||||
'CLOUDN' => 'Windows S N',
|
||||
|
@ -94,6 +94,11 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
$fltRing = 'Internal';
|
||||
}
|
||||
|
||||
if($ring == 'CANARY') {
|
||||
$fltBranch = 'CanaryChannel';
|
||||
$ring = 'WIF';
|
||||
}
|
||||
|
||||
$bldnum = explode('.', $build);
|
||||
$bldnum = $bldnum[2];
|
||||
|
||||
@ -107,14 +112,22 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
$attrib = array(
|
||||
'App=WU_OS',
|
||||
'AppVer='.$build,
|
||||
'AttrDataVer=177',
|
||||
'AttrDataVer=247',
|
||||
'AllowInPlaceUpgrade=1',
|
||||
'AllowOptionalContent=1',
|
||||
'AllowUpgradesWithUnsupportedTPMOrCPU=1',
|
||||
'BlockFeatureUpdates='.$blockUpgrades,
|
||||
'BranchReadinessLevel=CB',
|
||||
'CIOptin=1',
|
||||
'CurrentBranch='.$branch,
|
||||
'DataExpDateEpoch_CU23H2='.(time()+82800),
|
||||
'DataExpDateEpoch_CU23H2Setup='.(time()+82800),
|
||||
'DataExpDateEpoch_NI22H2='.(time()+82800),
|
||||
'DataExpDateEpoch_NI22H2Setup='.(time()+82800),
|
||||
'DataExpDateEpoch_CO21H2='.(time()+82800),
|
||||
'DataExpDateEpoch_CO21H2Setup='.(time()+82800),
|
||||
'DataExpDateEpoch_23H2='.(time()+82800),
|
||||
'DataExpDateEpoch_22H2='.(time()+82800),
|
||||
'DataExpDateEpoch_21H2='.(time()+82800),
|
||||
'DataExpDateEpoch_21H1='.(time()+82800),
|
||||
'DataExpDateEpoch_20H1='.(time()+82800),
|
||||
@ -122,14 +135,21 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
'DataVer_RS5=2000000000',
|
||||
'DefaultUserRegion=191',
|
||||
'DeviceFamily='.$dvcFamily,
|
||||
'DeviceInfoGatherSuccessful=1',
|
||||
'EKB19H2InstallCount=1',
|
||||
'EKB19H2InstallTimeEpoch=1255000000',
|
||||
'FlightingBranchName='.$fltBranch,
|
||||
//'FlightContent='.$fltContent,
|
||||
'FlightRing='.$fltRing,
|
||||
'Free=gt64',
|
||||
'GStatus_CU23H2=2',
|
||||
'GStatus_CU23H2Setup=2',
|
||||
'GStatus_NI22H2=2',
|
||||
'GStatus_NI22H2Setup=2',
|
||||
'GStatus_CO21H2=2',
|
||||
'GStatus_CO21H2Setup=2',
|
||||
'GStatus_23H2=2',
|
||||
'GStatus_22H2=2',
|
||||
'GStatus_21H2=2',
|
||||
'GStatus_21H1=2',
|
||||
'GStatus_20H1=2',
|
||||
@ -150,7 +170,8 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
'DUScan=1',
|
||||
'OEMModel=Asus ROG Maximus Z690 Extreme',
|
||||
'OEMModelBaseBoard=ROG MAXIMUS Z690 EXTREME',
|
||||
'OEMName_Uncleaned=ASUSTeK COMPUTER INC.',
|
||||
'OEMName_Uncleaned=Contoso Corporation',
|
||||
'OemPartnerRing=UPSFlighting',
|
||||
'OSArchitecture='.$arch,
|
||||
'OSSkuId='.$sku,
|
||||
'OSUILocale=en-US',
|
||||
@ -163,8 +184,14 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
'SdbVer_19H1=2000000000',
|
||||
'SecureBootCapable=1',
|
||||
'TelemetryLevel=3',
|
||||
'TimestampEpochString_CU23H2='.(time()-3600),
|
||||
'TimestampEpochString_CU23H2Setup='.(time()-3600),
|
||||
'TimestampEpochString_NI22H2='.(time()-3600),
|
||||
'TimestampEpochString_NI22H2Setup='.(time()-3600),
|
||||
'TimestampEpochString_CO21H2='.(time()-3600),
|
||||
'TimestampEpochString_CO21H2Setup='.(time()-3600),
|
||||
'TimestampEpochString_23H2='.(time()-3600),
|
||||
'TimestampEpochString_22H2='.(time()-3600),
|
||||
'TimestampEpochString_21H2='.(time()-3600),
|
||||
'TimestampEpochString_21H1='.(time()-3600),
|
||||
'TimestampEpochString_20H1='.(time()-3600),
|
||||
@ -172,18 +199,27 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
'TPMVersion=2',
|
||||
'UpdateManagementGroup=2',
|
||||
'UpdateOfferedDays=0',
|
||||
'UpgEx_CU23H2=Green',
|
||||
'UpgEx_NI22H2=Green',
|
||||
'UpgEx_CO21H2=Green',
|
||||
'UpgEx_23H2=Green',
|
||||
'UpgEx_22H2=Green',
|
||||
'UpgEx_21H2=Green',
|
||||
'UpgEx_21H1=Green',
|
||||
'UpgEx_20H1=Green',
|
||||
'UpgEx_19H1=Green',
|
||||
'UpgEx_RS5=Green',
|
||||
'UpgradeAccepted=1',
|
||||
'UpgradeEligible=1',
|
||||
'UserInPlaceUpgrade=1',
|
||||
'Version_RS5=2000000000',
|
||||
'WuClientVer='.$build,
|
||||
);
|
||||
|
||||
if(uupApiConfigIsTrue('fetch_sync_current_only')) {
|
||||
$attrib[] = 'MediaBranch='.$branch;
|
||||
}
|
||||
|
||||
if($ring == 'MSIT' && uupApiConfigIsTrue('allow_corpnet')) {
|
||||
$attrib[] = 'DUInternal=1';
|
||||
}
|
||||
@ -237,7 +273,6 @@ function branchFromBuild($build) {
|
||||
|
||||
case 20348:
|
||||
case 20349:
|
||||
case 20350:
|
||||
$branch = 'fe_release';
|
||||
break;
|
||||
|
||||
@ -246,9 +281,14 @@ function branchFromBuild($build) {
|
||||
break;
|
||||
|
||||
case 22621:
|
||||
case 22631:
|
||||
$branch = 'ni_release';
|
||||
break;
|
||||
|
||||
case 25398:
|
||||
$branch = 'zn_release';
|
||||
break;
|
||||
|
||||
default:
|
||||
$branch = 'rs_prerelease';
|
||||
break;
|
||||
@ -372,6 +412,8 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
|
||||
$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";
|
||||
$products[] = "PN=Windows.Autopilot.$currArch&Repairable=1&V=0.0.0.0";
|
||||
$products[] = "PN=Windows.AutopilotOOBE.$currArch&Repairable=1&V=0.0.0.0";
|
||||
$products[] = "PN=Windows.Appraiser.$currArch&Repairable=1&V=$build";
|
||||
$products[] = "PN=Windows.AppraiserData.$currArch&Repairable=1&V=$build";
|
||||
$products[] = "PN=Windows.EmergencyUpdate.$currArch&V=$build";
|
||||
|
Reference in New Issue
Block a user