Commit 0b9750ea authored by Martin Mai's avatar Martin Mai
Browse files

-

parent a4be986b
version: '2'
networks:
# for use with a reverse proxy
backend:
driver: bridge
services:
ubuntu:
build:
context: ./docker/
dockerfile: Dockerfile
image: portscan-itfl-16-04:dirty
restart: always
expose:
- 22
- 80
- 443
ports:
# syntax to specify IP "141.13.240.24:80:80"
# map ssh port to 220 if already used
- "2210:22"
networks:
- backend
volumes:
- ./volumes/var/www:/var/www
- ./volumes/var/lib/mysql:/var/lib/mysql
- ./volumes/opt:/opt
- ./volumes/root/uniba.de/share:/root/uniba.de/share
- ./volumes/.git:/.git
FROM ubuntu:16.04
RUN rm /etc/apt/sources.list
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y \
bash-completion \
vim \
git \
sudo \
rsync \
cron \
byobu
#DEBIAN_FRONTEND=noninteractive
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
openssh-server \
nmap \
python3-pip \
ssmtp \
mailutils
#
#
RUN locale-gen de_DE.utf8 && locale -a
RUN pip3 install python-nmap
#
# RUN a2ensite default-ssl && a2enmod ssl
# RUN make-ssl-cert generate-default-snakeoil --force-overwrite
#
# RUN a2dismod mpm_event && a2enmod mpm_prefork && a2enmod headers
#
#
# RUN mkdir -p /root/uniba.de/initial
# RUN mkdir -p /root/uniba.de/initial/var/lib/mysql/
# RUN rsync -a /var/lib/mysql/ /root/uniba.de/initial/var/lib/mysql/
#
ADD start.sh /start
RUN chmod +x /start
#
RUN mkdir -p /root/uniba.de/initial/remove-after-run
ADD setup.sh /root/uniba.de/initial/remove-after-run/setup.sh
#
RUN mkdir -p /root/.ssh/
ADD authorized_keys2 /root/.ssh/authorized_keys2
CMD ["/start", "-D"]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVhpkCOPHFkPL4+9KkMQ/ZvDZNjs4+ljGSGZdwqYwLD8zGzBBTqRbjtIw/1Vse50uLyCVNld5GdpLr22OCwQyozYxbmJ35D0241jQTJTM6xzWkLw0wEjhjiJyrLmllqeN/FieRvXzLXbbxW8lypYmAAR2JWfAuu11Bub7NuHExEv+KOKbZs8m0gy0Rh9+bDXUlo5MWAgrWk2UYTETuAoyjCbXpcl/1u/Vqj8gHl4VNRdXeyXzPoAvhv0jptoy7RlS3oQoniGDK2ho1WiLY7i4EmC2XJ29v3jGpeQrrcue+Cppx0K+dZVr6wdWJ5Yad03MXCfKBUrQn7/Zb6k4iY/S5 martin@martin-UX305FA
#!/bin/bash
rsync -a -v /root/uniba.de/share/overlay/ /
#cd /
#git reset --hard
#z.B.
#chown -R www-data /opt/otrs/
#a2ensite otrs
#service apache2 restart
\ No newline at end of file
#
# deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ xenial main restricted
#deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial main restricted
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates main restricted
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial universe
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial universe
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates universe
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial multiverse
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu xenial main
# deb-src http://extras.ubuntu.com/ubuntu xenial main
#!/bin/bash
sh /root/uniba.de/initial/remove-after-run/setup.sh
rm /root/uniba.de/initial/remove-after-run/setup.sh
mkdir /root/.ssh/
touch /root/.ssh/authorized_keys2
chmod 700 /root/.ssh/authorized_keys2
/sbin/init
service ssh restart
service rsyslog restart
cron
tail -f /start
Di 14. Mär 22:15:17 UTC 2017
# Nmap 7.01 scan initiated Sat Mar 4 23:39:04 2017 as: nmap -oG 141.13.240.24
# Nmap done at Sat Mar 4 23:39:04 2017 -- 0 IP addresses (0 hosts up) scanned in 0.02 seconds
141.13.240.17
141.13.240.24
141.13.240.100
141.13.240.101
141.13.240.102
141.13.240.103
141.13.240.104
141.13.240.105
141.13.240.106
141.13.240.107
141.13.240.108
141.13.240.109
141.13.240.110
141.13.240.112
141.13.240.113
141.13.240.114
141.13.240.115
141.13.240.116
141.13.240.117
141.13.240.118
141.13.240.119
141.13.240.120
141.13.240.121
141.13.240.122
141.13.240.123
141.13.240.124
141.13.240.125
141.13.240.126
141.13.240.127
141.13.240.128
141.13.240.181
141.13.240.186
141.13.240.189
141.13.240.190
141.13.240.191
141.13.240.192
141.13.240.193
141.13.240.194
141.13.240.195
141.13.241.0
141.13.241.1
141.13.241.2
141.13.241.3
141.13.241.4
141.13.241.5
141.13.241.6
141.13.241.7
141.13.241.8
141.13.241.9
141.13.241.11
141.13.241.12
141.13.241.13
141.13.241.14
141.13.241.15
141.13.241.16
141.13.241.17
141.13.241.18
141.13.241.19
141.13.241.20
141.13.241.45
141.13.241.46
141.13.241.47
141.13.241.48
141.13.241.49
141.13.241.50
141.13.241.51
141.13.241.52
141.13.241.53
141.13.241.54
141.13.250.40
141.13.250.41
141.13.250.42
141.13.250.43
141.13.250.44
141.13.250.45
141.13.250.46
141.13.250.47
141.13.250.48
141.13.250.49
141.13.250.50
141.13.250.60
141.13.250.82
141.13.250.82
141.13.250.83
141.13.250.84
141.13.250.85
141.13.250.86
141.13.250.87
141.13.250.88
141.13.250.89
141.13.250.90
141.13.250.91
141.13.250.92
141.13.250.93
141.13.250.94
141.13.250.95
141.13.250.96
141.13.250.97
141.13.250.98
141.13.250.99
host;hostname;hostname_type;protocol;port;name;state;product;extrainfo;reason;version;conf;cpe
141.13.241.9;baurz2419.urz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.241.9;baurz2419.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.6;api.rz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.6;api.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.5;baurz2415.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.5;baurz2415.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.5;baurz2415.urz.uni-bamberg.de;PTR;tcp;22;ssh;open;;;syn-ack;;3;
141.13.241.54;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.54;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.53;;;tcp;80;http;open;;;syn-ack;;3;
141.13.241.53;;;tcp;443;https;open;;;syn-ack;;3;
141.13.241.51;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.51;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.51;;;tcp;22;ssh;open;;;syn-ack;;3;
141.13.241.50;friendica-test.rz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.50;friendica-test.rz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.49;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.49;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.48;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.48;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.47;;;tcp;80;http;open;;;syn-ack;;3;
141.13.241.47;;;tcp;443;https;open;;;syn-ack;;3;
141.13.241.46;;;tcp;80;http;open;;;syn-ack;;3;
141.13.241.46;;;tcp;443;https;open;;;syn-ack;;3;
141.13.241.45;ubp.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.241.45;ubp.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.3;baurz2413.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.3;baurz2413.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.2;statusnet.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.241.2;statusnet.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.1;baurz2411.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.1;baurz2411.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.1;baurz2411.urz.uni-bamberg.de;PTR;tcp;22;ssh;open;;;syn-ack;;3;
141.13.241.11;feeds.rz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.11;feeds.rz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.240.24;bamberger-hegelwoche.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.24;bamberger-hegelwoche.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.191;evasys.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.191;evasys.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.189;baurz189.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.240.189;baurz189.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.240.17;baurz10a.urz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.17;baurz10a.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.128;piwik.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.128;piwik.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.125;baurz125.urz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.125;baurz125.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.118;wiki.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.118;wiki.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.114;baurz114.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.240.114;baurz114.urz.uni-bamberg.de;PTR;tcp;8080;http-proxy;closed;;;conn-refused;;3;
141.13.240.114;baurz114.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.240.110;mattermost.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.110;mattermost.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.110;mattermost.rz.uni-bamberg.de;PTR;tcp;22;ssh;closed;;;conn-refused;;3;
141.13.240.109;docker-registry.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.109;docker-registry.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.109;docker-registry.rz.uni-bamberg.de;PTR;tcp;22;ssh;open;;;syn-ack;;3;
141.13.240.108;statusnet-test.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.108;statusnet-test.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
host;hostname;hostname_type;protocol;port;name;state;product;extrainfo;reason;version;conf;cpe
141.13.250.92;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.250.92;;;tcp;443;https;open;;;syn-ack;;3;
141.13.250.92;;;tcp;22;ssh;open;;;syn-ack;;3;
141.13.250.91;;;tcp;80;http;open;;;syn-ack;;3;
141.13.250.91;;;tcp;443;https;open;;;syn-ack;;3;
141.13.250.91;;;tcp;22;ssh;open;;;syn-ack;;3;
141.13.250.90;;;tcp;80;http;open;;;syn-ack;;3;
141.13.250.90;;;tcp;443;https;open;;;syn-ack;;3;
141.13.250.90;;;tcp;22;ssh;open;;;syn-ack;;3;
141.13.250.86;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.250.86;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.250.85;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.250.85;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.250.84;pathways.polsys.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.250.84;pathways.polsys.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.250.82;limesurvey.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.250.82;limesurvey.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.250.49;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.250.49;;;tcp;4;unknown;closed;;;conn-refused;;3;
141.13.250.49;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.250.49;;;tcp;22;ssh;open;;;syn-ack;;3;
141.13.250.49;;;tcp;21;ftp;closed;;;conn-refused;;3;
141.13.250.49;;;tcp;20;ftp-data;closed;;;conn-refused;;3;
141.13.250.42;historische-matrikel.archiv.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.250.42;historische-matrikel.archiv.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.9;baurz2419.urz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.241.9;baurz2419.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.6;api.rz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.6;api.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.5;baurz2415.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.5;baurz2415.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.54;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.54;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.53;;;tcp;80;http;open;;;syn-ack;;3;
141.13.241.53;;;tcp;443;https;open;;;syn-ack;;3;
141.13.241.51;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.51;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.51;;;tcp;22;ssh;open;;;syn-ack;;3;
141.13.241.50;friendica-test.rz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.50;friendica-test.rz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.49;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.49;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.48;;;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.48;;;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.47;;;tcp;80;http;open;;;syn-ack;;3;
141.13.241.47;;;tcp;443;https;open;;;syn-ack;;3;
141.13.241.46;;;tcp;80;http;open;;;syn-ack;;3;
141.13.241.46;;;tcp;443;https;open;;;syn-ack;;3;
141.13.241.45;ubp.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.241.45;ubp.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.3;baurz2413.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.3;baurz2413.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.2;statusnet.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.241.2;statusnet.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.241.1;baurz2411.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.1;baurz2411.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.241.1;baurz2411.urz.uni-bamberg.de;PTR;tcp;22;ssh;open;;;syn-ack;;3;
141.13.241.11;feeds.rz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.241.11;feeds.rz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.240.24;bamberger-hegelwoche.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.24;bamberger-hegelwoche.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.191;evasys.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.191;evasys.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.189;baurz189.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.240.189;baurz189.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.240.17;baurz10a.urz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.17;baurz10a.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.128;piwik.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.128;piwik.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.125;baurz125.urz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.125;baurz125.urz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.118;wiki.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.118;wiki.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.114;baurz114.urz.uni-bamberg.de;PTR;tcp;80;http;closed;;;conn-refused;;3;
141.13.240.114;baurz114.urz.uni-bamberg.de;PTR;tcp;8080;http-proxy;closed;;;conn-refused;;3;
141.13.240.114;baurz114.urz.uni-bamberg.de;PTR;tcp;443;https;closed;;;conn-refused;;3;
141.13.240.110;mattermost.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.110;mattermost.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.110;mattermost.rz.uni-bamberg.de;PTR;tcp;22;ssh;closed;;;conn-refused;;3;
141.13.240.109;docker-registry.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.109;docker-registry.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
141.13.240.109;docker-registry.rz.uni-bamberg.de;PTR;tcp;22;ssh;open;;;syn-ack;;3;
141.13.240.108;statusnet-test.rz.uni-bamberg.de;PTR;tcp;80;http;open;;;syn-ack;;3;
141.13.240.108;statusnet-test.rz.uni-bamberg.de;PTR;tcp;443;https;open;;;syn-ack;;3;
Di 14. Mär 22:13:57 UTC 2017
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pip3 install python-nmap
import subprocess
import optparse
import time
import sys
import re
import subprocess
import os
import pprint
import json
import nmap
def scanNmap(ip, ports, VarArguments):
import nmap
try:
nm = nmap.PortScanner() # instantiate nmap.PortScanner object
except nmap.PortScannerError:
print ('Nmap not found', sys.exc_info()[0])
sys.exit(0)
except:
print ("Unexpected error:", sys.exc_info()[0])
sys.exit(0)
nm.scan(ip, ports, arguments=VarArguments) #todo mehr ports # scan host 127.0.0.1, ports from 22 to 443
#nm.scan(arguments='-T5')
if options.verbose=="1":
print(nm.command_line()) # get command line used for the
return nm
p = optparse.OptionParser()
p.add_option('--group', '', default="all")
p.add_option('--verbose', '', default="0")
p.add_option('--scan_ports', '', default="-10000")
#p.add_option('--scan_ports', '', default="21, 22, 80, 443")
p.add_option('--ip', '', default="141.13.240.24")
options, arguments = p.parse_args()
nm = scanNmap(options.ip, options.scan_ports, '-T3 -PN') #-PN: auch ohne ping
print(nm.csv())
#!/bin/ash
id_name="itfl-service--soll-offene-ports-von-extern"
log_target="/var/log/uniba.de/checks/patches"
temp_dir="/var/temp/uniba.de/checks/patches"
com_dir=/root/uniba.de/info
status_dir="/root/uniba.de/info"$0"-"$*
log_mail="itfl-service@uni-bamberg.de"
log_mail="martin.mai@uni-bamberg.de"
flagfile="$status_dir"/flagfile
trenner="\n#############################\n"
##################
mkdir -p $log_target
mkdir -v -p "$status_dir"
mkdir -p $temp_dir
###################
date > $log_target/report
date > 1.txt
#uniba.de/todo
#cat ips-test.txt | while read line
cat ips.txt | while read line
do
echo $line
python3 scan.py --ip=$line >> 1.txt
done
cat 1.txt | sort -r | uniq | \
grep -v 'tcp;113;ident;closed;;;conn-refused' \
> out.csv
header='#diff itfl-service--soll-offene-ports-von-extern'
echo -e "$trenner""$header" >> $log_target/report
diff --ignore-all-space itfl-service--soll-offene-ports-von-extern.csv out.csv \
>> $log_target/report
#header='#ungefilterte ausgabe'
#echo "\n\n\n$trenner""$header" >> $log_target/report
#cat $log_target/1 >> $log_target/report
cat $log_target/report
cat $log_target/report | mail -s "Prozess $id_name $string report" $log_mail
cat $log_target/2 | mail -s "Prozess $id_name $string stderr" $log_mail
exit
echo bla | mail -s "Betreff" martin.mai@uni-bamberg.de
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment