From 7d1c569b736ea6fa20588f40e1f7f981c5588e74 Mon Sep 17 00:00:00 2001 From: Bruno Barbieri Date: Wed, 10 Jan 2024 18:38:07 -0500 Subject: [PATCH] initial commit --- .github/workflows/deploy.yml | 21 + package.json | 13 +- src/App.css | 21 +- src/App.js | 60 +- yarn.lock | 9943 ++++++++++++++++++++++++++++++++++ 5 files changed, 10022 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 yarn.lock diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..41082ed --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,21 @@ +name: Build and Deploy +on: [push] +permissions: + contents: write +jobs: + build-and-deploy: + concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. + run: | + npm install + npm run build + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build # The folder the action should deploy. \ No newline at end of file diff --git a/package.json b/package.json index 1f1a6f0..f8fad61 100644 --- a/package.json +++ b/package.json @@ -3,18 +3,15 @@ "version": "0.1.0", "private": true, "dependencies": { - "@testing-library/jest-dom": "^5.17.0", - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-scripts": "5.0.1", - "web-vitals": "^2.1.4" + "@metamask/browser-passworder": "4.3.0", + "buffer": "6.0.3", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-scripts": "5.0.1" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", - "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { diff --git a/src/App.css b/src/App.css index 74b5e05..0d13237 100644 --- a/src/App.css +++ b/src/App.css @@ -1,21 +1,6 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - .App-header { background-color: #282c34; - min-height: 100vh; + height: 200px; display: flex; flex-direction: column; align-items: center; @@ -24,6 +9,10 @@ color: white; } +.App-body { + padding-left: 20px; +} + .App-link { color: #61dafb; } diff --git a/src/App.js b/src/App.js index 3784575..cae17db 100644 --- a/src/App.js +++ b/src/App.js @@ -1,23 +1,59 @@ -import logo from './logo.svg'; import './App.css'; +import { useCallback, useState } from 'react'; +import { decrypt } from '@metamask/browser-passworder'; function App() { + window.Buffer = window.Buffer || require("buffer").Buffer; + + const [vaultData, setVaultData] = useState(''); + const [password, setPassword] = useState(''); + const [decryptedVaultData, setDecryptedVaultData] = useState(''); + const handleTextAreaOnchange = useCallback((e) => { + setVaultData(e.target.value); + }, []); + const handleClick = useCallback(async () => { + const decryptedVault = await decrypt(password, vaultData); + setDecryptedVaultData(JSON.stringify(decryptedVault, null, 2)); + }, [password, vaultData]); + return (
- logo +

Rainbow BX Vault Decryptor

+
+
+ {decryptedVaultData ? ( +
+          {decryptedVaultData}
+        
+ ) : ( +

- Edit src/App.js and save to reload. + Step 1 - Open the extension and right click inside on the top right, above the 3 dots icon.
+ Step 2 - Select "Inspect"
+ Step 3 - Select the "Console" tab
+ Step 4 - Paste the following code in the console and press enter:

+

+           {`const { vault } = await chrome.storage.local.get('vault'); console.log(vault);`}
+          


+ Step 5 - Copy the output and paste it in the text area below.
+ Step 6 - Enter your password and click "Decrypt"

- - Learn React - - + +