vamp-mcp 0.1.9 → 0.2.3
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.
- package/LICENSE +21 -21
- package/README.md +142 -107
- package/THIRD_PARTY_NOTICES.md +32 -27
- package/bin/vamp-mcp.mjs +37 -37
- package/notices/mcp-virtualbox-LICENSE +21 -21
- package/notices/mcp-virtualbox-PROVENANCE.json +37 -37
- package/package.json +51 -17
- package/runtime/backends/common/Test-Environment.ps1 +7 -6
- package/runtime/backends/common/guest-install.json +58 -0
- package/runtime/backends/common/guest_install.py +57 -0
- package/runtime/backends/common/host-support.cjs +16 -0
- package/runtime/backends/common/packer.cjs +16 -0
- package/runtime/backends/hyperv/scripts/Manage-Desktop.ps1 +40 -67
- package/runtime/backends/hyperv/scripts/Send-InstallerBoot.ps1 +25 -0
- package/runtime/backends/kvm/debian-preseed.cfg +35 -35
- package/runtime/backends/library/registry.py +77 -77
- package/runtime/backends/library/replay.py +154 -154
- package/runtime/backends/packer/answer_media.py +16 -0
- package/runtime/backends/packer/deploy-hyperv.ps1 +10 -0
- package/runtime/backends/packer/drivers.py +49 -0
- package/runtime/backends/packer/hyperv-network.ps1 +10 -0
- package/runtime/backends/packer/images.py +75 -0
- package/runtime/backends/packer/osinfo.py +113 -0
- package/runtime/backends/packer/policy.json +15 -0
- package/runtime/backends/packer/runner.py +224 -0
- package/runtime/backends/packer/templates.py +118 -0
- package/runtime/backends/packer/toolchain.py +80 -0
- package/runtime/backends/remote_ssh/server.mjs +321 -94
- package/runtime/backends/virtualbox/desktop.cjs +37 -0
- package/runtime/backends/virtualbox/display.py +101 -101
- package/runtime/backends/virtualbox/history.py +139 -139
- package/runtime/backends/virtualbox/mouse_click.py +15 -15
- package/runtime/backends/virtualbox/mouse_move.py +18 -18
- package/runtime/backends/virtualbox/profiles.json +46 -46
- package/runtime/backends/virtualbox/provision.py +238 -184
- package/runtime/backends/virtualbox/recording_listener.py +29 -29
- package/runtime/backends/virtualbox/recordings.py +39 -39
- package/runtime/backends/virtualbox/requirements.txt +7 -7
- package/runtime/backends/virtualbox/rpas/debian_first_boot/manifest.json +1 -1
- package/runtime/backends/virtualbox/rpas/debian_first_boot/run.robot +13 -13
- package/runtime/backends/virtualbox/rpas/debian_first_boot/workflow.py +75 -75
- package/runtime/backends/virtualbox/rpas/observe/manifest.json +7 -7
- package/runtime/backends/virtualbox/rpas/observe/run.robot +13 -13
- package/runtime/backends/virtualbox/rpas/observe/workflow.py +14 -14
- package/runtime/backends/virtualbox/server.mjs +440 -63
- package/runtime/backends/virtualbox/setup_windows_sdk.py +58 -58
- package/runtime/backends/virtualbox/shares.py +68 -68
- package/runtime/backends/virtualbox/snapshots.py +53 -53
- package/runtime/backends/virtualbox/transfers.py +89 -89
- package/runtime/backends/virtualbox/vnc.py +61 -61
- package/runtime/guest_keys.py +13 -13
- package/runtime/guest_setup/http/debian-preseed.cfg +39 -0
- package/runtime/guest_setup/http/postdeb.sh +94 -0
- package/runtime/guest_setup/http/postwin.ps1 +53 -0
- package/runtime/guest_setup/http/setup-all.ps1 +25 -0
- package/runtime/guest_setup/http/setup-win.cmd +7 -0
- package/runtime/guest_setup/http/setup.ps1 +44 -0
- package/runtime/guest_setup/http/setup.sh +50 -0
- package/runtime/guest_setup/kvm/setup-debian.sh +73 -0
- package/runtime/guest_setup/kvm/setup-windows.ps1 +52 -0
- package/runtime/guest_setup/recorder/README.txt +12 -8
- package/runtime/guest_setup/recorder/RECORDER-LICENSE +674 -674
- package/runtime/guest_setup/recorder/RECORDING-GUIDE.txt +31 -31
- package/runtime/guest_setup/recorder/apply-display.py +41 -41
- package/runtime/guest_setup/recorder/configure-debian-mirrors.py +62 -62
- package/runtime/guest_setup/recorder/configure-gdm.py +23 -0
- package/runtime/guest_setup/recorder/configure-session.ps1 +14 -0
- package/runtime/guest_setup/recorder/gnome-display.py +60 -60
- package/runtime/guest_setup/recorder/install-display-startup.py +66 -39
- package/runtime/guest_setup/recorder/install-hypervisor-drivers.ps1 +34 -0
- package/runtime/guest_setup/recorder/install-resolution-shortcut.ps1 +36 -0
- package/runtime/guest_setup/recorder/postwin.cmd +10 -10
- package/runtime/guest_setup/recorder/prepare-recording.py +30 -30
- package/runtime/guest_setup/recorder/recorder.zip +0 -0
- package/runtime/guest_setup/recorder/requirements-recorder.txt +2 -2
- package/runtime/guest_setup/recorder/session-policy.py +22 -0
- package/runtime/guest_setup/recorder/setup-user.py +53 -35
- package/runtime/guest_setup/recorder/setup-win.cmd +4 -11
- package/runtime/guest_setup/recorder/setup.ps1 +108 -30
- package/runtime/guest_setup/recorder/setup.sh +19 -1
- package/runtime/guest_setup/recorder/vamp-recorder.py +148 -148
- package/runtime/guest_setup/recorder/verify-recorder.py +4 -4
- package/runtime/guest_setup/recorder/windows-display.py +76 -76
- package/runtime/guest_setup/requirements.txt +2 -0
- package/runtime/guest_setup/setup-all.ps1 +35 -0
- package/runtime/guest_setup/setup-all.sh +22 -0
- package/runtime/guest_setup/vault/Install-VCRuntime.ps1 +26 -0
- package/runtime/guest_setup/vault/setup-guest-vault.ps1 +148 -0
- package/runtime/guest_setup/vault/setup-guest-vault.sh +75 -0
- package/runtime/recording_converter.py +230 -230
- package/runtime/requirements-mcp.txt +11 -11
- package/runtime/rpas/README.md +161 -161
- package/runtime/rpas/captcha_handoff/manifest.json +27 -27
- package/runtime/rpas/captcha_handoff/run.robot +16 -16
- package/runtime/rpas/captcha_handoff/workflow.py +11 -11
- package/runtime/rpas/common.resource +26 -26
- package/runtime/rpas/debian_update/manifest.json +27 -27
- package/runtime/rpas/debian_update/run.robot +17 -17
- package/runtime/rpas/debian_update/workflow.py +13 -13
- package/runtime/rpas/desktop_control/manifest.json +26 -26
- package/runtime/rpas/desktop_control/run.robot +27 -27
- package/runtime/rpas/desktop_control/workflow.py +51 -51
- package/runtime/rpas/firefox_launch/manifest.json +27 -27
- package/runtime/rpas/firefox_launch/run.robot +15 -15
- package/runtime/rpas/firefox_launch/workflow.py +25 -25
- package/runtime/rpas/firefox_naver/manifest.json +27 -27
- package/runtime/rpas/firefox_naver/run.robot +21 -21
- package/runtime/rpas/firefox_naver/workflow.py +28 -28
- package/runtime/rpas/kvm_validation/README.md +11 -11
- package/runtime/rpas/kvm_validation/manifest.json +28 -28
- package/runtime/rpas/kvm_validation/run.robot +30 -30
- package/runtime/rpas/kvm_validation/workflow.py +91 -91
- package/runtime/rpas/manifest.schema.json +105 -105
- package/runtime/rpas/naver_login/login.robot +25 -25
- package/runtime/rpas/naver_login/manifest.json +33 -33
- package/runtime/rpas/naver_login/run.robot +20 -20
- package/runtime/rpas/naver_login/workflow.py +32 -32
- package/runtime/rpas/windows_naver_recorded/README.md +24 -24
- package/runtime/rpas/windows_naver_recorded/conversion.json +25 -25
- package/runtime/rpas/windows_naver_recorded/manifest.json +28 -28
- package/runtime/rpas/windows_naver_recorded/run.robot +37 -37
- package/runtime/rpas/windows_naver_recorded/workflow.py +32 -32
- package/runtime/scripts/build_recorder_media.py +39 -39
- package/runtime/scripts/macos/setup-host.sh +126 -0
- package/runtime/scripts/remote_host_setup.sh +7 -4
- package/runtime/scripts/script_server.py +571 -0
- package/runtime/skills/vamp-rpa-ui-checks/SKILL.md +26 -0
- package/runtime/skills/vamp-rpa-ui-checks/agents/openai.yaml +4 -0
- package/runtime/skills/vamp-rpa-ui-checks/references/display.md +12 -0
- package/runtime/skills/vamp-rpa-ui-checks/references/user-guide.md +49 -0
- package/runtime/skills/vamp-ui-cleanup/SKILL.md +15 -0
- package/runtime/skills/vamp-ui-cleanup/agents/openai.yaml +4 -0
- package/runtime/skills/vamp-ui-validation/SKILL.md +27 -0
- package/runtime/skills/vamp-ui-validation/agents/openai.yaml +4 -0
- package/runtime/third_party/mcp-virtualbox/scripts/mouse_click.py +65 -65
- package/runtime/third_party/pyautogui-recorder/LICENSE +674 -674
- package/runtime/third_party/pyautogui-recorder/PROVENANCE.json +16 -16
- package/runtime/third_party/pyautogui-recorder/PyAutoGuiRecorder.py +169 -169
- package/runtime/third_party/pyautogui-recorder/README.md +53 -53
- package/runtime/scripts/build_debian_installer.py +0 -48
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<#
|
|
2
|
+
.SYNOPSIS
|
|
3
|
+
Installs KeePassXC (with Passkey / Browser Integration), VeraCrypt CLI,
|
|
4
|
+
and configures automatic Removable-USB mounting for the secondary VHD.
|
|
5
|
+
.DESCRIPTION
|
|
6
|
+
Runs in the guest Windows desktop session after VM provisioning.
|
|
7
|
+
1. Installs KeePassXC (winget or direct download).
|
|
8
|
+
2. Registers KeePassXC-Browser native messaging host for Chrome/Edge (Passkey support).
|
|
9
|
+
3. Installs VeraCrypt CLI (winget or silent installer).
|
|
10
|
+
4. Creates Start-MountVault.cmd helper using VeraCrypt '/m rm' flag to expose NPKI as a removable USB drive.
|
|
11
|
+
#>
|
|
12
|
+
|
|
13
|
+
$ErrorActionPreference = 'Stop'
|
|
14
|
+
|
|
15
|
+
Write-Output "=== VAMP Vault Guest Setup: KeePassXC, VeraCrypt & Passkey ==="
|
|
16
|
+
|
|
17
|
+
# The standalone winget path needs the same prerequisite as offline setup.
|
|
18
|
+
# Stop before KeePassXC if the runtime cannot be installed and verified.
|
|
19
|
+
$vcRuntime = & (Join-Path $PSScriptRoot 'Install-VCRuntime.ps1')
|
|
20
|
+
|
|
21
|
+
# 1. Install KeePassXC
|
|
22
|
+
$keepass = Get-Command keepassxc.exe -ErrorAction SilentlyContinue
|
|
23
|
+
if (-not $keepass -and (Test-Path 'C:\Program Files\KeePassXC\keepassxc.exe')) { $keepass = @{Source='C:\Program Files\KeePassXC\keepassxc.exe'} }
|
|
24
|
+
if (-not $keepass) {
|
|
25
|
+
Write-Output "[1/4] Installing KeePassXC via winget..."
|
|
26
|
+
try {
|
|
27
|
+
winget install --exact --id KeePassXCTeam.KeePassXC --scope machine --accept-package-agreements --accept-source-agreements --silent
|
|
28
|
+
if ($LASTEXITCODE -notin @(0, 3010)) { throw "KeePassXC winget exit code: $LASTEXITCODE" }
|
|
29
|
+
} catch {
|
|
30
|
+
throw "KeePassXC installation failed: $_"
|
|
31
|
+
}
|
|
32
|
+
} else {
|
|
33
|
+
Write-Output "[1/4] KeePassXC already installed: $($keepass.Source)"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
# Locate KeePassXC installation
|
|
37
|
+
$proxyPath = "C:\Program Files\KeePassXC\keepassxc-proxy.exe"
|
|
38
|
+
if (-not (Test-Path -LiteralPath $proxyPath)) { throw "KeePassXC proxy was not installed: $proxyPath" }
|
|
39
|
+
|
|
40
|
+
# 2. Register KeePassXC-Browser Native Messaging Host for Passkey support
|
|
41
|
+
Write-Output "[2/4] Registering KeePassXC-Browser native messaging for Chrome/Edge Passkeys..."
|
|
42
|
+
$nmHostDir = Join-Path $env:LOCALAPPDATA 'KeePassXC\NativeMessagingHosts'
|
|
43
|
+
New-Item -ItemType Directory -Force -Path $nmHostDir | Out-Null
|
|
44
|
+
|
|
45
|
+
$manifestPath = Join-Path $nmHostDir 'org.keepassxc.keepassxc_browser.json'
|
|
46
|
+
$manifestContent = @{
|
|
47
|
+
name = "org.keepassxc.keepassxc_browser"
|
|
48
|
+
description = "KeePassXC integration with web browsers (Passkeys)"
|
|
49
|
+
path = $proxyPath
|
|
50
|
+
type = "stdio"
|
|
51
|
+
allowed_origins = @(
|
|
52
|
+
"chrome-extension://oboonakemofpalcgghocfoadofidjkkk/" # KeePassXC-Browser official extension ID
|
|
53
|
+
)
|
|
54
|
+
} | ConvertTo-Json -Depth 4
|
|
55
|
+
|
|
56
|
+
Set-Content -LiteralPath $manifestPath -Value $manifestContent -Encoding utf8
|
|
57
|
+
|
|
58
|
+
# Register in Windows Registry for Chrome and Edge
|
|
59
|
+
$regPaths = @(
|
|
60
|
+
"HKCU:\Software\Google\Chrome\NativeMessagingHosts\org.keepassxc.keepassxc_browser",
|
|
61
|
+
"HKCU:\Software\Microsoft\Edge\NativeMessagingHosts\org.keepassxc.keepassxc_browser"
|
|
62
|
+
)
|
|
63
|
+
foreach ($regPath in $regPaths) {
|
|
64
|
+
if (-not (Test-Path $regPath)) {
|
|
65
|
+
New-Item -Path $regPath -Force | Out-Null
|
|
66
|
+
}
|
|
67
|
+
Set-ItemProperty -Path $regPath -Name "(default)" -Value $manifestPath
|
|
68
|
+
}
|
|
69
|
+
Write-Output "Native messaging registered at: $manifestPath"
|
|
70
|
+
|
|
71
|
+
# 3. Install VeraCrypt CLI
|
|
72
|
+
$veracrypt = Get-Command VeraCrypt.exe -ErrorAction SilentlyContinue
|
|
73
|
+
if (-not $veracrypt -and (Test-Path 'C:\Program Files\VeraCrypt\VeraCrypt.exe')) { $veracrypt = @{Source='C:\Program Files\VeraCrypt\VeraCrypt.exe'} }
|
|
74
|
+
if (-not $veracrypt) {
|
|
75
|
+
Write-Output "[3/4] Installing VeraCrypt via winget..."
|
|
76
|
+
try {
|
|
77
|
+
winget install --exact --id IDRIX.VeraCrypt --scope machine --accept-package-agreements --accept-source-agreements --silent
|
|
78
|
+
if ($LASTEXITCODE -notin @(0, 3010)) { throw "VeraCrypt winget exit code: $LASTEXITCODE" }
|
|
79
|
+
} catch {
|
|
80
|
+
throw "VeraCrypt installation failed: $_"
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
Write-Output "[3/4] VeraCrypt already installed: $($veracrypt.Source)"
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# 4. Create Removable-USB Auto-Mount Helper Script
|
|
87
|
+
Write-Output "[4/4] Creating VHD Removable-USB (/m rm) Mount Helper..."
|
|
88
|
+
$desktop = [Environment]::GetFolderPath('Desktop')
|
|
89
|
+
$toolsDir = Join-Path $desktop 'VAMP-Vault'
|
|
90
|
+
New-Item -ItemType Directory -Force -Path $toolsDir | Out-Null
|
|
91
|
+
|
|
92
|
+
$mountScript = @'
|
|
93
|
+
@echo off
|
|
94
|
+
setlocal enabledelayedexpansion
|
|
95
|
+
echo ========================================================
|
|
96
|
+
echo VAMP Vault: Mounting Secondary VHD as Removable USB
|
|
97
|
+
echo ========================================================
|
|
98
|
+
|
|
99
|
+
:: 1. Search for vault.hc on all attached drives (e.g. D:\, E:\ from secondary VHD)
|
|
100
|
+
set "HC_PATH="
|
|
101
|
+
for %%D in (D E F G H I) do (
|
|
102
|
+
if exist "%%D:\vault.hc" (
|
|
103
|
+
set "HC_PATH=%%D:\vault.hc"
|
|
104
|
+
goto :FOUND
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
:FOUND
|
|
109
|
+
if "%HC_PATH%"=="" (
|
|
110
|
+
echo [ERROR] vault.hc not found on any secondary drive!
|
|
111
|
+
echo Please make sure the secondary vault.vhd is attached to the VM.
|
|
112
|
+
pause
|
|
113
|
+
exit /b 1
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
echo Found vault container: %HC_PATH%
|
|
117
|
+
rem VeraCrypt asks for the password in its guest GUI; never use /p.
|
|
118
|
+
|
|
119
|
+
:: 2. Mount with /m rm (Mount volume as removable media)
|
|
120
|
+
:: Requests VeraCrypt removable media mode; application compatibility needs separate verification.
|
|
121
|
+
set "VC_EXE=C:\Program Files\VeraCrypt\VeraCrypt.exe"
|
|
122
|
+
if not exist "%VC_EXE%" (
|
|
123
|
+
echo [ERROR] VeraCrypt not found at %VC_EXE%!
|
|
124
|
+
pause
|
|
125
|
+
exit /b 1
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
echo Mounting %HC_PATH% as Removable USB drive...
|
|
129
|
+
"%VC_EXE%" /v "%HC_PATH%" /m rm /a
|
|
130
|
+
|
|
131
|
+
if %ERRORLEVEL% equ 0 (
|
|
132
|
+
echo [SUCCESS] Vault mounted successfully as Removable Media!
|
|
133
|
+
echo Check the guest drive before proceeding with authentication.
|
|
134
|
+
) else (
|
|
135
|
+
echo [ERROR] Failed to mount vault (code %ERRORLEVEL%).
|
|
136
|
+
)
|
|
137
|
+
pause
|
|
138
|
+
'@
|
|
139
|
+
|
|
140
|
+
Set-Content -LiteralPath (Join-Path $toolsDir 'Mount-Vault-USB.cmd') -Value $mountScript -Encoding ascii
|
|
141
|
+
|
|
142
|
+
$vcPath = 'C:\Program Files\VeraCrypt\VeraCrypt.exe'
|
|
143
|
+
if (-not (Test-Path -LiteralPath $vcPath)) { throw "VeraCrypt was not installed: $vcPath" }
|
|
144
|
+
$result = @{ status = 'configured'; keepassxc_proxy = $proxyPath; veracrypt = $vcPath; native_messaging_registered = $true; browser_extension_installed = $false; passkey_login_verified = $false }
|
|
145
|
+
$result | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $toolsDir 'setup-result.json') -Encoding utf8
|
|
146
|
+
Write-Output "=== VAMP Vault Guest Setup Configured (passkey login not verified) ==="
|
|
147
|
+
Write-Output "KeePassXC native messaging host: registered for Chrome & Edge"
|
|
148
|
+
Write-Output "Removable Mount helper: $toolsDir\Mount-Vault-USB.cmd"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Run as the guest desktop user. Optional verified CLI media is prepared on host.
|
|
3
|
+
set -eu
|
|
4
|
+
[ "$(id -u)" != 0 ] || { echo 'Run as the desktop user, not root.' >&2; exit 1; }
|
|
5
|
+
state="$HOME/.local/share/vamp/vault-setup"
|
|
6
|
+
mkdir -p "$state"
|
|
7
|
+
printf '{"status":"running","passkey_login_verified":false}\n' > "$state/result.json"
|
|
8
|
+
trap 'printf "{\"status\":\"failed\",\"passkey_login_verified\":false}\n" > "$state/result.json"' 0
|
|
9
|
+
if ! command -v keepassxc-cli >/dev/null 2>&1; then
|
|
10
|
+
command -v apt-get >/dev/null 2>&1 || { echo 'Install KeePassXC first.' >&2; exit 1; }
|
|
11
|
+
sudo -n apt-get update
|
|
12
|
+
sudo -n apt-get install -y keepassxc
|
|
13
|
+
fi
|
|
14
|
+
proxy=$(command -v keepassxc-proxy) || { echo 'keepassxc-proxy is missing.' >&2; exit 1; }
|
|
15
|
+
vc=$(command -v veracrypt || true)
|
|
16
|
+
if [ -z "$vc" ] && [ -n "${VAMP_VAULT_CLI_DIR:-}" ]; then
|
|
17
|
+
media=$VAMP_VAULT_CLI_DIR
|
|
18
|
+
[ -f "$media/SHA256SUMS" ] || { echo 'Verified CLI manifest is missing.' >&2; exit 1; }
|
|
19
|
+
(cd "$media" && sha256sum --strict -c SHA256SUMS > "$state/cli-checksums.log")
|
|
20
|
+
[ -f "$media/veracrypt.tar.gz" ] || exit 1
|
|
21
|
+
dest="$HOME/.local/share/vamp/vault-bin"
|
|
22
|
+
mkdir -p "$dest" "$HOME/.local/bin"
|
|
23
|
+
tar -xzf "$media/veracrypt.tar.gz" -C "$dest"
|
|
24
|
+
cat > "$HOME/.local/bin/veracrypt" <<'EOF'
|
|
25
|
+
#!/bin/sh
|
|
26
|
+
app="$HOME/.local/share/vamp/vault-bin/veracrypt-appimage/squashfs-root"
|
|
27
|
+
export LD_LIBRARY_PATH="$app/usr/lib:$app/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
|
28
|
+
exec "$app/usr/bin/veracrypt" "$@"
|
|
29
|
+
EOF
|
|
30
|
+
chmod +x "$HOME/.local/bin/veracrypt"
|
|
31
|
+
vc="$HOME/.local/bin/veracrypt"
|
|
32
|
+
fi
|
|
33
|
+
[ -n "$vc" ] || { echo 'VeraCrypt is missing. Supply VAMP_VAULT_CLI_DIR from the verified setup media.' >&2; exit 1; }
|
|
34
|
+
keepassxc-cli --version > "$state/keepassxc-version.txt"
|
|
35
|
+
"$vc" --text --version > "$state/veracrypt-version.txt"
|
|
36
|
+
export VAMP_PROXY="$proxy"
|
|
37
|
+
python3 - <<'PY'
|
|
38
|
+
import json, os
|
|
39
|
+
from pathlib import Path
|
|
40
|
+
home=Path.home()
|
|
41
|
+
base={'name':'org.keepassxc.keepassxc_browser','description':'KeePassXC browser integration','path':os.environ['VAMP_PROXY'],'type':'stdio'}
|
|
42
|
+
for directory in [home/'.config/google-chrome/NativeMessagingHosts',home/'.config/chromium/NativeMessagingHosts',home/'.config/microsoft-edge/NativeMessagingHosts']:
|
|
43
|
+
directory.mkdir(parents=True,exist_ok=True)
|
|
44
|
+
(directory/'org.keepassxc.keepassxc_browser.json').write_text(json.dumps({**base,'allowed_origins':['chrome-extension://oboonakemofpalcgghocfoadofidjkkk/']},indent=2)+'\n')
|
|
45
|
+
directory=home/'.mozilla/native-messaging-hosts';directory.mkdir(parents=True,exist_ok=True)
|
|
46
|
+
(directory/'org.keepassxc.keepassxc_browser.json').write_text(json.dumps({**base,'allowed_extensions':['keepassxc-browser@keepassxc.org']},indent=2)+'\n')
|
|
47
|
+
PY
|
|
48
|
+
# Linux has no VeraCrypt 'removable' mount option. Prompt in the guest terminal;
|
|
49
|
+
# never put a volume password in argv or claim this changes the device bus type.
|
|
50
|
+
desktop=$(xdg-user-dir DESKTOP 2>/dev/null || printf '%s/Desktop' "$HOME")
|
|
51
|
+
[ "$desktop" != "$HOME" ] || desktop="$HOME/Desktop"
|
|
52
|
+
mkdir -p "$desktop/VAMP-Vault"
|
|
53
|
+
cat > "$desktop/VAMP-Vault/mount-vault.sh" <<'EOF'
|
|
54
|
+
#!/bin/sh
|
|
55
|
+
set -eu
|
|
56
|
+
container=${1:-}
|
|
57
|
+
if [ -z "$container" ]; then
|
|
58
|
+
for folder in /media/*/* /mnt/*; do
|
|
59
|
+
if [ -f "$folder/vault.hc" ]; then container="$folder/vault.hc"; break; fi
|
|
60
|
+
done
|
|
61
|
+
fi
|
|
62
|
+
[ -f "$container" ] || { echo 'Pass the path to a vault.hc container.' >&2; exit 1; }
|
|
63
|
+
vc=$(command -v veracrypt || printf '%s/.local/bin/veracrypt' "$HOME")
|
|
64
|
+
mkdir -p "$HOME/VAMP-Vault"
|
|
65
|
+
exec "$vc" --text --mount "$container" "$HOME/VAMP-Vault"
|
|
66
|
+
EOF
|
|
67
|
+
chmod +x "$desktop/VAMP-Vault/mount-vault.sh"
|
|
68
|
+
python3 - "$state" "$vc" <<'PY'
|
|
69
|
+
import json,sys
|
|
70
|
+
from pathlib import Path
|
|
71
|
+
state=Path(sys.argv[1]);result={'status':'configured','keepassxc_version':(state/'keepassxc-version.txt').read_text().strip(),'veracrypt_version':(state/'veracrypt-version.txt').read_text().strip(),'veracrypt_path':sys.argv[2],'native_messaging_registered':True,'browser_extension_installed':False,'passkey_login_verified':False}
|
|
72
|
+
(state/'result.json').write_text(json.dumps(result,indent=2)+'\n')
|
|
73
|
+
print(json.dumps(result))
|
|
74
|
+
PY
|
|
75
|
+
trap - 0
|