Working 64 bit version

This commit is contained in:
Adam Morris
2022-03-30 21:27:27 -07:00
parent 6755c5ac13
commit a879e32621
2 changed files with 65 additions and 12 deletions

View File

@@ -4,7 +4,5 @@ su - dt
git clone https://github.com/RfidResearchGroup/proxmark3
cd proxmark3
echo PLATFORM=PM3GENERIC > Makefile.platform
#make clean && make -j
make clean && make
exit
#make install

View File

@@ -1,16 +1,71 @@
#!/bin/bash -e
#cd /usr/local/bin
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.aarch64
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.armhf
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.arm
cd /usr/local/bin
for i in aarch64 arm armhf
do
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.${i}
done
case `uname -m` in
"armv7l") model=armhf ;;
"aarch64") model=aarch64 ;;
*) model=arm ;;
esac
cp ttyd.${model} /usr/local/bin/ttyd
chown root:root /usr/local/bin/ttyd
chmod a+x /usr/local/bin/ttyd
cat > /etc/systemd/system/ttyd-bash.service << EOF
[Unit]
Description=Web Terminal Service running Bash
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
User=dt
WorkingDirectory=/home/dt
ExecStart=/usr/local/bin/ttyd -p 8000 -u dt -m 1 -c dt:proxmark3 /usr/bin/bash
Restart=always
Type=simple
RestartSec=1
cat << EOF > /usr/local/bin/ttyd
#! /bin/bash
/usr/local/bin/ttyd.`/usr/bin/uname -m` $@
EOF
chown root:root /usr/local/bin/ttyd*
chmod a+x /usr/local/bin/ttyd*
cat > /etc/systemd/system/ttyd-pm3.service << EOF
[Unit]
Description=Web Terminal Service for PM3
After=network.target
ConditionFileIsExecutable=/usr/local/bin/pm3
[Install]
WantedBy=multi-user.target
[Service]
User=dt
WorkingDirectory=/home/dt
ExecStart=/usr/local/bin/ttyd -p 8080 -u dt -m 1 /usr/local/bin/pm3
Restart=always
Type=simple
RestartSec=1
EOF
chmod 755 /etc/systemd/system/ttyd*.service
chown root:root /etc/systemd/system/ttyd*.service
if [ ! -L /etc/systemd/system/multi-user.target.wants/ttyd-bash.service ]
then
ln -s /etc/systemd/system/ttyd-bash.service /etc/systemd/system/multi-user.target.wants
fi
if [ ! -L /etc/systemd/system/multi-user.target.wants/ttyd-pm3.service ]
then
ln -s /etc/systemd/system/ttyd-pm3.service /etc/systemd/system/multi-user.target.wants
fi
cd /home/dt/proxmark3
make install