mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Merge branch 'master' of https://github.com./Matir/skel
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
exec xdg-open $(dirname $0)/cyberchef.html
|
set -u
|
||||||
|
|
||||||
|
CHEF_FILE=${HOME}/tools/cyberchef/cyberchef.html
|
||||||
|
|
||||||
|
if [ ! -f ${CHEF_FILE} ] ; then
|
||||||
|
${HOME}/bin/install_tool cyberchef
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec xdg-open ${CHEF_FILE}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -31,10 +31,16 @@ if [ $# -ne 1 ] ; then
|
|||||||
fi
|
fi
|
||||||
TOOL=${1}
|
TOOL=${1}
|
||||||
|
|
||||||
|
function die {
|
||||||
|
echo $* >/dev/stderr
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
function install_pkgs {
|
function install_pkgs {
|
||||||
if [ ${PACKAGES} -eq 0 ] ; then
|
if [ ${PACKAGES} -eq 0 ] ; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
# TODO: check if packages are already installed
|
||||||
if [ `id -u` -ne "0" ] ; then
|
if [ `id -u` -ne "0" ] ; then
|
||||||
sudo apt-get -y install $* || (
|
sudo apt-get -y install $* || (
|
||||||
echo -n "Unable to install packages, please ensure these " >/dev/stderr
|
echo -n "Unable to install packages, please ensure these " >/dev/stderr
|
||||||
@@ -50,6 +56,7 @@ function download {
|
|||||||
SRC=${1}
|
SRC=${1}
|
||||||
DST=${2}
|
DST=${2}
|
||||||
echo -n "Downloading ${SRC} to ${DST}..." >&2
|
echo -n "Downloading ${SRC} to ${DST}..." >&2
|
||||||
|
# TODO: consider curl instead?
|
||||||
wget --no-server-response -q -O ${DST} --content-disposition ${SRC}
|
wget --no-server-response -q -O ${DST} --content-disposition ${SRC}
|
||||||
echo " done." >&2
|
echo " done." >&2
|
||||||
}
|
}
|
||||||
@@ -137,8 +144,7 @@ case ${TOOL} in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
mitmproxy)
|
mitmproxy)
|
||||||
# Find a better way to get the latest
|
src=$(python -c 'import urllib2; import json; print(filter(lambda x: x["name"].endswith("-linux.tar.gz"), json.load(urllib2.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["assets"])[0]["browser_download_url"])')
|
||||||
src="https://github.com/mitmproxy/mitmproxy/releases/download/v2.0.1/mitmproxy-2.0.1-linux.tar.gz"
|
|
||||||
download ${src} /tmp/mitmproxy.tar.gz
|
download ${src} /tmp/mitmproxy.tar.gz
|
||||||
mkdir -p ${DESTDIR}
|
mkdir -p ${DESTDIR}
|
||||||
tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz
|
tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz
|
||||||
@@ -176,6 +182,11 @@ case ${TOOL} in
|
|||||||
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
|
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
|
||||||
udevadm control --reload-rules"
|
udevadm control --reload-rules"
|
||||||
;;
|
;;
|
||||||
|
cyberchef)
|
||||||
|
mkdir -p ${DESTDIR}
|
||||||
|
src=$(python -c 'import urllib2; import json; print(filter(lambda x: x["name"]=="cyberchef.htm", json.load(urllib2.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"])[0]["browser_download_url"])')
|
||||||
|
download ${src} ${DESTDIR}/cyberchef.html
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# For interactive shells
|
# For interactive shells
|
||||||
HISTFILE=~/.histfile
|
HISTFILE=~/.zhistory
|
||||||
HISTSIZE=1000
|
HISTSIZE=10000
|
||||||
SAVEHIST=1000
|
SAVEHIST=10000
|
||||||
setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases
|
setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases
|
||||||
unsetopt beep histbeep listbeep flowcontrol
|
unsetopt beep histbeep listbeep flowcontrol
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
|||||||
Reference in New Issue
Block a user