2020-11-25 11:54:06 -06:00
|
|
|
execDir=/usr/local/bin
|
|
|
|
optDir=/opt/aninix/CryptoWorkbench
|
|
|
|
|
2019-05-01 16:39:45 -05:00
|
|
|
compile: /usr/bin/mcs CryptoWorkbench.csharp /opt/aninix/Uniglot/
|
2020-11-25 11:54:06 -06:00
|
|
|
/usr/bin/mcs -out:shell.exe /opt/aninix/Uniglot/CSharp/*.csharp *.csharp 2>&1
|
2016-08-04 12:10:50 -05:00
|
|
|
|
|
|
|
test: /usr/bin/mono compile
|
2019-05-01 16:39:45 -05:00
|
|
|
# TODO This needs to be a pytest battery across the input.
|
2020-11-25 11:54:06 -06:00
|
|
|
echo quit | /usr/bin/mono shell.exe ./sample.txt
|
2016-08-04 12:10:50 -05:00
|
|
|
|
|
|
|
clean:
|
2019-05-01 16:39:45 -05:00
|
|
|
for i in `cat .gitignore`; do rm -Rf $$i; done
|
2016-08-04 12:10:50 -05:00
|
|
|
|
2020-11-25 11:54:06 -06:00
|
|
|
install: compile /bin/bash cryptoworkbench captivecrypto
|
|
|
|
mkdir -p ${pkgdir}${optDir}
|
|
|
|
mkdir -p ${pkgdir}${execDir}
|
|
|
|
install -m 555 -o 0 -g 0 shell.exe ${pkgdir}${optDir}
|
|
|
|
install -m 555 -o 0 -g 0 regex-lookup.bash ${pkgdir}${optDir}
|
|
|
|
install -m 755 -o 0 -g 0 cryptoworkbench ${pkgdir}${execDir}
|
|
|
|
install -m 755 -o 0 -g 0 captivecrypto ${pkgdir}${execDir}
|
2016-08-04 12:10:50 -05:00
|
|
|
|
2017-06-19 13:16:59 -05:00
|
|
|
checkperm:
|
2020-11-25 11:54:06 -06:00
|
|
|
chmod 0555 ${pkgdir}${optDir}shell.exe
|
|
|
|
chmod 0755 ${pkgdir}${execDir}cryptoworkbench ${pkgdir}${execDir}captivecrypto
|
|
|
|
chown root:root ${pkgdir}${execDir}cryptoworkbench ${pkgdir}${execDir}captivecrypto ${pkgdir}${optDir}shell.exe
|
2016-08-04 12:10:50 -05:00
|
|
|
|
2020-11-25 11:54:06 -06:00
|
|
|
sshuser: install ForceCommand.txt pwgen /usr/sbin/ssh /usr/sbin/sshd
|
|
|
|
grep captivecrypto /etc/shells || echo '${execDir}captivecrypto' /etc/shells
|
|
|
|
if ! id crypto &>/dev/null; then useradd -k -d /home/crypto -s ${execDir}captivecrypto crypto; fi
|
2019-05-01 16:39:45 -05:00
|
|
|
echo "crypto:$(pwgen 24 1)" | chpasswd;
|
2016-08-04 12:10:50 -05:00
|
|
|
cat ./ForceCommand.txt >> /etc/ssh/sshd_config
|
|
|
|
echo crypto | passwd --stdin crypto
|
|
|
|
|
|
|
|
tmux: /usr/bin/tmux
|
|
|
|
@echo Making sure cryptoworkbench setting isn\'t already in /etc/tmux.conf...
|
2017-07-06 12:10:56 -05:00
|
|
|
[ `grep -c "cryptoworkbench" /etc/tmux.conf` -eq 0 ]
|
2016-08-04 12:10:50 -05:00
|
|
|
echo "bind-key -T prefix x new-window cryptoworkbench" >> /etc/tmux.conf
|
|
|
|
echo 'bind-key -T prefix X confirm-before -p "kill-pane #P? (y/n)" kill-pane' >> /etc/tmux.conf
|
2017-06-19 13:16:59 -05:00
|
|
|
|
2020-11-25 11:54:06 -06:00
|
|
|
diff: ${execDir}captivecrypto ${execDir}cryptoworkbench
|
|
|
|
diff ./captivecrypto ${execDir}captivecrypto
|
|
|
|
diff ./cryptoworkbench ${execDir}cryptoworkbench
|
2017-06-19 13:16:59 -05:00
|
|
|
|
2020-11-25 11:54:06 -06:00
|
|
|
reverse: ${execDir}captivecrypto ${execDir}cryptoworkbench
|
|
|
|
cat ${execDir}captivecrypto > ./captivecrypto
|
|
|
|
cat ${execDir}cryptoworkbench > ./cryptoworkbench
|