diff --git a/config/shell_aliases b/config/shell_aliases index f7384de..0182eef 100644 --- a/config/shell_aliases +++ b/config/shell_aliases @@ -1,15 +1,14 @@ #!/bin/bash alias cp="cp -vi" alias sless='less -S -R' -#alias dmcreate='docker-machine create --driver google --google-project crypto-galaxy-182614 --google-zone us-west1-a --google-machine-type f1-micro vm01 ; eval $(docker-machine env vm01)' alias dockerstatus="docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock moncho/dry" alias dockerip="docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'" -alias drit='docker run -i -t --rm ' -alias dritn='docker run -i -t --rm --network=none' -alias dritpw='docker run -i -t --rm -v "$(mktemp -d):/output" -v "$(pwd)":/data' -alias dritpwro='docker run -i -t --rm -v "$(mktemp -d):/output" -v "$(pwd)":/data:ro' -alias dritpwn='docker run -i -t --rm --network=none -v "$(mktemp -d):/output" -v "$(pwd)":/data' -alias dritpwron='docker run -i -t --rm --network=none -v "$(mktemp -d):/output" -v "$(pwd)":/data:ro' +alias dritn='docker run -i -t --rm ' +alias drit='docker run -i -t --rm --network=none' +alias dritpwn='docker run -i -t --rm -v "$(mktemp -d):/output" -v "$(pwd)":/data:ro' +alias dritpwnrw='docker run -i -t --rm -v "$(mktemp -d):/output" -v "$(pwd)":/data:rw' +alias dritpw='docker run -i -t --rm --network=none -v "$(mktemp -d):/output" -v "$(pwd)":/data:ro' +alias dritpwrw='docker run -i -t --rm --network=none -v "$(mktemp -d):/output" -v "$(pwd)":/data:rw' alias kali='docker run --rm -it -v ${workdir-`pwd`}:/root/workdir kalilinux/kali-rolling' alias lazydocker="docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /opt/lazydocker:/.config/jesseduffield/lazydocker lazyteam/lazydocker" alias mv="mv -vi" @@ -37,7 +36,7 @@ alias uniq2='awk '"'"'{a[$0]++; if (a[$0]==1) print $0 }'"'" alias pip='pip3' alias python='python3' function bindiff() { cmp -l "${1}" "${2}" | gawk '{printf "%s,%02X,%02X\n",$1,strtonum(0$2),strtonum(0$3) }' ; } -function avscan(){ av="${1:-kaspersky}" ; if [ "${av}" == "update" ] ; then ( docker pull tabledevil/kaspersky ; docker pull tabledevil/sep ; docker pull tabledevil/clamav) ; elif [[ $# -eq 2 ]] ; then dritpwro "tabledevil/${av}" "${2}" ; else dritpwro --network=none "tabledevil/${av}" scan ; fi ; } +function avscan(){ av="${1:-kaspersky}" ; if [ "${av}" == "update" ] ; then ( docker pull tabledevil/kaspersky ; docker pull tabledevil/sep ; docker pull tabledevil/clamav) ; elif [[ $# -eq 2 ]] ; then dritpw "tabledevil/${av}" "${2}" ; else dritpw "tabledevil/${av}" scan ; fi ; } function dockerfa() { [[ $# -eq 0 ]] && wpd=$(readlink -f . ) || wpd=$(readlink -f "${1}"); docker run -it --rm -v "${wpd}":/data tabledevil/file-analysis;} function docker_killall() { docker rm $(docker stop $(docker ps -a -q --filter ancestor="${1}" --format="{{.ID}}")) ; } function dockertags() { tags=`wget -q https://registry.hub.docker.com/v1/repositories/${1}/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}'`; if [ -n "$2" ] ; then tags=` echo "${tags}" | grep "$2" `; fi ; echo "${tags}" ; }