| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #!/bin/bash
- #
- # Copyright (c) 2019 Clementine Computing LLC.
- #
- # This file is part of PopuFare.
- #
- # PopuFare is free software: you can redistribute it and/or modify
- # it under the terms of the GNU Affero General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- #
- # PopuFare is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU Affero General Public License for more details.
- #
- # You should have received a copy of the GNU Affero General Public License
- # along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
- #
- # Helper script to setup the PIU system.
- # Meant to be run as root.
- #
- # Remove bloat.
- # Note this is mainly a note as in the future,
- # the system will have these packages already
- # removed.
- #
- apt-get purge -y wolfram-engine wolframscript \
- scratch scratch2 \
- libreoffice-core libreoffice-base-core
- # For development
- #
- apt-get install -y vim
- # For HID (magstripe)
- #
- apt-get install -y python3-evdev
- # proxmark3 install
- #
- apt-get install -y p7zip git build-essential \
- libreadline5 libreadline-dev libusb-0.1-4 \
- libusb-dev libqt4-dev perl pkg-config wget \
- libncurses5-dev gcc-arm-none-eabi \
- libstdc++-arm-none-eabi-newlib libpcsclite-dev pcscd
- # video and opencv install
- #
- apt-get install -y motion v4l2loopback-utils v4l2loopback-source \
- python3-opencv python-opencv \
- libzbar-dev libzbar0 python-zbar python-qrtools zbar-tools
- pip install pyzbar imutils
- pip3 install pyzbar imutils
- # misc
- #
- apt-get install -y jq
- useradd bus
- mkdir -p git
- pushd git
- git clone https://tree.clementinecomputing.com/clementinecomputing/popufare
- git clone https://github.com/proxmark/proxmark3.git
- pushd proxmark3
- git pull
- sudo cp -rf driver/77-mm-usb-device-blacklist.rules /etc/udev/rules.d/77-mm-usb-device-blacklist.rules
- sudo udevadm control --reload-rules
- adduser pi dialout
- adduser bus dialout
- make clean && make all
- # Flash most recent firmware onto proxmark.
- # Assumes proxmark3 on /dev/ttyACM0 (`udevadm info /dev/ttyACM0` should show appropriate
- # proxmark information)
- #
- client/flasher /dev/ttyACM0 -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf
- popd
- popd
- # setup `proxmark3` client program state
- #
- mkdir -p /home/bus/bin
- cp /root/git/proxmark3/client/proxmark3 /home/bus/bin
- cp -R /root/git/proxmark3/client/lualibs /home/bus/bin/
- cp -R /root/git/proxmark3/client/scripts /home/bus/bin/
- cp /root/git/popufare/busunit-PIU/scripts/proxmark3-lf-hid-read.lua /home/bus/bin/scripts
- chown -R bus:bus /home/bus
|