Skip to content

Commit

Permalink
Merge pull request #76 from mbrg/dev-container-prereqs
Browse files Browse the repository at this point in the history
install prereqs on the devcontainer
  • Loading branch information
AvishaiEZen authored Nov 5, 2024
2 parents 4ae3035 + feaf417 commit 14b8a27
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
"name": "PowerPwn",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.8",

Expand All @@ -13,7 +13,7 @@

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
"postCreateCommand": "pip install .",
"postCreateCommand": "chmod +x .devcontainer/setup.sh && .devcontainer/setup.sh",
"postStartCommand": "git config --add safe.directory ${containerWorkspaceFolder}",

// Configure tool-specific properties.
Expand Down
64 changes: 64 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# npm
sudo apt update
sudo apt install nodejs npm -y
# ffuf
wget https://github.com/ffuf/ffuf/releases/download/v2.1.0/ffuf_2.1.0_linux_arm64.tar.gz
tar -xzf ffuf_2.1.0_linux_arm64.tar.gz ffuf
rm -rf ffuf_2.1.0_linux_arm64.tar.gz
sudo mv ffuf /usr/local/bin/ffuf
# amass
wget https://github.com/owasp-amass/amass/releases/download/v4.2.0/amass_Linux_arm64.zip
unzip -j amass_Linux_arm64.zip "amass_Linux_arm64/amass"
rm -rf amass_Linux_arm64.zip
sudo mv amass /usr/local/bin/amass
# puppeteer prereqs
sudo apt-get install -y \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgbm1 \
libgcc1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
lsb-release \
wget \
xdg-utils
# puppeteer
npm i puppeteer
# puppeteer in dir
cd puppeteer_get_substrate_bearer
npm install
npx puppeteer browsers install chrome
cd ..
# powerpwn
pip install .
# set env vars
export PYTHONPATH=/workspaces/power-pwn/src/:$PYTHONPATH
export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,6 @@ tokens.json
.dump
node_modules/
whoami_*
copilot_dump_*
copilot_dump_*
ffuf*
amass*

0 comments on commit 14b8a27

Please sign in to comment.