7 Commits
v0.5 ... v1.0

Author SHA1 Message Date
4def754c3e ajout scan nmap 2022-03-31 10:58:56 +02:00
f13393316d dau.sh et dau2.sh correction marche 2022-03-31 09:44:16 +02:00
3ba2ed5140 dau.sh et dau2.sh correction marche 2022-03-31 09:43:03 +02:00
4bcc3b86fd correction dau.sh , marche 2022-03-31 08:41:07 +02:00
6e7a12f55b correction dau.sh 2022-03-24 11:55:43 +01:00
115a001933 correction dau.sh 2022-03-24 11:13:52 +01:00
42904de026 ajout ScriptDokuwikiv2.sh et dau.sh 2022-03-24 11:09:27 +01:00
4 changed files with 111 additions and 0 deletions

39
ap23/script/ScriptDokuWikiv2.sh Executable file
View File

@ -0,0 +1,39 @@
#!/bin/bash
set -e
#ip dans la variable $3
ip=$(ip -br a|grep UP|awk '{print $3}'|cut -f1 -d'/')
#dependances
apt install apache2 php php-mbstring php-xml php-gd -y
#telechargement dokuwiki et deplacement dans /var/www/html/dokuwiki et suppression archive plus utile
cd /tmp
wget http://depl.sio.lan/store/dokuwiki-stable.tgz
tar -xzvf dokuwiki-stable.tgz
rm dokuwiki-stable.tgz
#check si bonne version de dokuwiki extraite
if [ ! -d dokuwiki-2020-07-29 ] ; then
echo "Erreur de version dokuwiki : version attendue : dokuwiki-2020-07-29"
exit 1
fi
#deplacement dans le repertoire de base apache2/dokuwiki
mv dokuwiki-2020-07-29 dokuwiki
mv dokuwiki /var/www/html
cd /var/www/html
#suppresion index.html pas necessaire si present
if [ -d index.html ] ; then
rm index.html
fi
cd /var/www/html/dokuwiki
chown -R root:root .
chown -R www-data:www-data data lib conf
#nettoyage affichage et resultat
clear
echo "Installation de dokuwiki terminee."
echo "Connectez-vous avec un navigateur à l'adresse http://$ip/dokuwiki/install.php"

14
ap23/script/dau.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
set -u
#check si il y a un argument et exit 1 si y'a pas
if [ ! "$1" ] ; then
echo "Usage : $0 user >> /var/www/html/dokuwiki/conf/users.auth.php"
exit 1
fi
# chiffremment du mot de passe $1 avec bcrypt
hashpass=$(htpasswd -bnBC 10 "$1" "$1")
echo "${hashpass}:${1}:${1}@localhost:${1},user"

11
ap23/script/dau2.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
set -u
./dau.sh anthony >> /var/www/html/dokuwiki/conf/users.auth.php
./dau.sh rayan >> /var/www/html/dokuwiki/conf/users.auth.php
./dau.sh mathis >> /var/www/html/dokuwiki/conf/users.auth.php
./dau.sh lucas >> /var/www/html/dokuwiki/conf/users.auth.php
./dau.sh adrien >> /var/www/html/dokuwiki/conf/users.auth.php

47
ap23/script/nmap.txt Normal file
View File

@ -0,0 +1,47 @@
Starting Nmap 7.80 ( https://nmap.org ) at 2022-03-31 09:49 CEST
Nmap scan report for ap23 (10.121.38.78)
Host is up (0.00089s latency).
Not shown: 997 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.4p1 Debian 5 (protocol 2.0)
80/tcp open http Apache httpd 2.4.52
| http-ls: Volume /
| SIZE TIME FILENAME
| - 2022-03-17 15:36 AP23/
| 465K 2021-05-14 07:40 adminer.php
| - 2020-07-29 11:35 dokuwiki/
|_
|_http-server-header: Apache/2.4.52 (Debian)
|_http-title: Index of /
3306/tcp open mysql?
| fingerprint-strings:
| NULL, TLSSessionReq:
|_ Host 'gwsio2.sio.lan' is not allowed to connect to this MariaDB server
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port3306-TCP:V=7.80%I=7%D=3/31%Time=62455D05%P=x86_64-pc-linux-gnu%r(NU
SF:LL,4D,"I\0\0\x01\xffj\x04Host\x20'gwsio2\.sio\.lan'\x20is\x20not\x20all
SF:owed\x20to\x20connect\x20to\x20this\x20MariaDB\x20server")%r(TLSSession
SF:Req,4D,"I\0\0\x01\xffj\x04Host\x20'gwsio2\.sio\.lan'\x20is\x20not\x20al
SF:lowed\x20to\x20connect\x20to\x20this\x20MariaDB\x20server");
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=7.80%E=4%D=3/31%OT=22%CT=1%CU=44627%PV=Y%DS=2%DC=T%G=Y%TM=62455D1
OS:7%P=x86_64-pc-linux-gnu)SEQ(SP=FF%GCD=1%ISR=103%TI=Z%CI=Z%II=I%TS=A)OPS(
OS:O1=M5B4ST11NW7%O2=M5B4ST11NW7%O3=M5B4NNT11NW7%O4=M5B4ST11NW7%O5=M5B4ST11
OS:NW7%O6=M5B4ST11)WIN(W1=FE88%W2=FE88%W3=FE88%W4=FE88%W5=FE88%W6=FE88)ECN(
OS:R=Y%DF=Y%T=40%W=FAF0%O=M5B4NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS
OS:%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=
OS:Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=
OS:R%O=%RD=0%Q=)T7(R=N)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%R
OS:UCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)
Network Distance: 2 hops
Service Info: Host: ap23.sio.lan; OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE (using port 143/tcp)
HOP RTT ADDRESS
1 0.43 ms 192.168.0.1
2 0.95 ms 10.121.38.78
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 18.75 seconds