fixed proxy scripts and added tools dockerfiles
This commit is contained in:
16
dockerfiles/tools/didierstevenssuite.dockerfile
Normal file
16
dockerfiles/tools/didierstevenssuite.dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM alpine
|
||||||
|
|
||||||
|
MAINTAINER tabledevil
|
||||||
|
RUN echo -e "none\nnone\n" | adduser user -u 1001
|
||||||
|
RUN mkdir /data
|
||||||
|
|
||||||
|
RUN apk add -u git python python3 py-olefile
|
||||||
|
|
||||||
|
RUN git clone https://github.com/DidierStevens/DidierStevensSuite /opt/DidierStevensSuite
|
||||||
|
RUN chmod +x /opt/DidierStevensSuite/*
|
||||||
|
ENV PATH="/opt/DidierStevensSuite/:${PATH}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
# USER user
|
||||||
5
dockerfiles/tools/nmap.dockerfile
Normal file
5
dockerfiles/tools/nmap.dockerfile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
FROM alpine
|
||||||
|
|
||||||
|
MAINTAINER tabledevil
|
||||||
|
|
||||||
|
RUN apk add -u nmap
|
||||||
5
dockerfiles/tools/tcpdump.dockerfile
Normal file
5
dockerfiles/tools/tcpdump.dockerfile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
FROM alpine
|
||||||
|
|
||||||
|
MAINTAINER tabledevil
|
||||||
|
|
||||||
|
RUN apk add -u tcpdump
|
||||||
23
proxy/update_bashrc_proxy.sh
Executable file
23
proxy/update_bashrc_proxy.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
proxy_ip="192.168.x.x"
|
||||||
|
proxy_port="8080"
|
||||||
|
|
||||||
|
echo -n "Username: "
|
||||||
|
read username
|
||||||
|
echo -n "Password: "
|
||||||
|
read -s password
|
||||||
|
user=$(logname)
|
||||||
|
bashrc_file=/home/${user}/.bashrc
|
||||||
|
proxy_file=/home/${user}/.http_proxy
|
||||||
|
|
||||||
|
encpassword=$(echo -n ${password} | xxd -p | sed -e 's/\(..\)/%\1/g' )
|
||||||
|
|
||||||
|
if ! grep -qF -e "PROXY_A93JK2" "${bashrc_file}" ; then
|
||||||
|
echo "[ -f ${proxy_file} ] && . ${proxy_file} #PROXY_A93JK2" >> "${bashrc_file}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'export "HTTP_PROXY=http://'"${username}"':"'"${encpassword}@${proxy_ip}:${proxy_port}/" > "${proxy_file}"
|
||||||
|
echo 'export "HTTPS_PROXY=http://'"${username}"':"'"${encpassword}@${proxy_ip}:${proxy_port}/" >> "${proxy_file}"
|
||||||
|
echo 'export "http_proxy=http://'"${username}"':"'"${encpassword}@${proxy_ip}:${proxy_port}/" >> "${proxy_file}"
|
||||||
|
echo 'export "https_proxy=http://'"${username}"':"'"${encpassword}@${proxy_ip}:${proxy_port}/" >> "${proxy_file}"
|
||||||
|
echo 'export "NO_PROXY=localhost,127.0.0.1"' >> "${proxy_file}"
|
||||||
18
proxy/update_docker_proxy.sh
Executable file
18
proxy/update_docker_proxy.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
proxy_ip="192.168.x.x"
|
||||||
|
proxy_port="8080"
|
||||||
|
|
||||||
|
echo -n "Username: "
|
||||||
|
read username
|
||||||
|
echo -n "Password: "
|
||||||
|
read -s password
|
||||||
|
#encpassword=$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "${password}")
|
||||||
|
#encpassword=$(echo -n ${password} | sed -e 's/\@/\\x40/g' -e 's/\!/\\x21/g' -e 's/\$/\\x24/g' -e 's/\*/\\x2a/g' -e 's/\%/\\x25/g' -e 's/\&/\\x26/g' -e 's/\#/\\x30/g')
|
||||||
|
encpassword=$(echo -n ${password} | xxd -p | sed -e 's/\(..\)/%%\1/g' )
|
||||||
|
echo "[Service]" > /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||||
|
echo 'Environment="HTTP_PROXY=http://'"${username}"':"'"${encpassword}@${proxy_ip}:${proxy_port}/" >> /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||||
|
echo 'Environment="HTTPS_PROXY=http://'"${username}"':"'"${encpassword}@${proxy_ip}:${proxy_port}/" >> /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||||
|
echo -n '"NO_PROXY=localhost,127.0.0.1"' >> /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart docker
|
||||||
|
#systemctl show docker -p Environment
|
||||||
Reference in New Issue
Block a user