tried to get command logging working, but differences in docker and normal environment makes it behave differently. Unsure what the deal is right now.

This commit is contained in:
sog 2020-04-18 11:08:29 -04:00
parent ffe6f44e15
commit bb30b82b72
3 changed files with 7 additions and 8 deletions

View File

@ -11,7 +11,7 @@ FROM ubuntu:19.10
ENV LC_CTYPE C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
COPY dot_radare2rc /root/.radare2rc
COPY dot_bashrc /root/.bashrc
#COPY dot_bashrc /root/.bashrc
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y build-essential jq strace ltrace curl wget rubygems gcc dnsutils netcat gcc-multilib net-tools \

View File

@ -1,8 +1,7 @@
[ -z "$PS1" ] && return
HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
HISTSIZE=5000
HISTFILESIZE=5000
export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=5000
export HISTFILESIZE=5000
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
@ -24,7 +23,7 @@ ps1_state(){
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xB4->$ret "
fi
}
PS1='${debian_chroot:+($debian_chroot)}$(ps1_state)\[\033[01;31m\]\u\[\033[00m\][ \[\033[01;34m\]\w\[\033[00m\] ]\$ '
export PS1='${debian_chroot:+($debian_chroot)}$(ps1_state)\[\033[01;31m\]\u\[\033[00m\][ \[\033[01;34m\]\w\[\033[00m\] ]\$ '
# From https://twitter.com/n00py1/status/1230755337797394434
script -f /logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log

2
run.sh
View File

@ -1,2 +1,2 @@
#!/bin/sh
docker run --rm -v "$(pwd):/pwd" -v "$(pwd)/logs:/logs" --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -d --name docker-binaryexploitation -i docker-binaryexploitation:ubuntu19.10
docker run --rm -v "$(pwd)/host:/host" -v "$(pwd)/logs:/logs" --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -d --name docker-binaryexploitation -i docker-binaryexploitation:ubuntu19.10