diff --git a/doc/monithor-client.1.gz b/doc/monithor-client.1.gz new file mode 100644 index 0000000..7d80141 Binary files /dev/null and b/doc/monithor-client.1.gz differ diff --git a/doc/monithor-client.md b/doc/monithor-client.md index f048aec..9949679 100644 --- a/doc/monithor-client.md +++ b/doc/monithor-client.md @@ -7,7 +7,7 @@ date: 20220320 # SYNOPSIS -`/usr/local/bin/monithor-client [start/stop]` +`/etc/init.d/monithor-c [start/stop]` `/etc/init.d/monithor-c [start/stop]` @@ -40,8 +40,6 @@ le service peut être démarré et arrêté via system V `$ cat etc/monithor-client/service.cfg ` -`RemoteIp=10.10.10.3:1666 ` - `LocalPassword='Evil@MonitoR-666'` `Crypted=no` @@ -52,8 +50,6 @@ le service peut être démarré et arrêté via system V `WebPort=80` -* RemoteIp : correspond au couple adresse IP/Port de l'interface réseau utilisée - * LocalPassword : correspond au mot de passe utilisé pour chiffré la connexion si Crypted est à "yes" * Crypted : si la valeur est à "yes" le binnaire crypcat est utilisé, si non netcat est utilisé diff --git a/doc/monithor-server.1.gz b/doc/monithor-server.1.gz new file mode 100644 index 0000000..ffa29dc Binary files /dev/null and b/doc/monithor-server.1.gz differ diff --git a/generate.sh b/generate.sh index 04601b9..875e59c 100755 --- a/generate.sh +++ b/generate.sh @@ -30,7 +30,10 @@ GitVersion() { } CpArchName() { - cp -Rf monithor-${1} /tmp/monithor-${1}_${2}_all + + rm -Rf /tmp/monithor-* + cp -Rf ${Wai}/monithor-${1} /tmp/monithor-${1}_${2}_all + } @@ -46,6 +49,7 @@ BuildDeb(){ [[ $Dist == "ubuntu" ]] && Compress=' -Z gzip -S fixed ' dpkg-deb ${Compress} --build --root-owner-group monithor-${1}_${2}_all &> /dev/null [[ "$?" -eq "0" ]] && echo "OK" || echo "FAILED" + cp monithor-*deb ${Wai}/build } @@ -57,18 +61,10 @@ CleanTemp() { ManPage() { - if [[ $2 == "create" ]] - then - pandoc -s -t man ${Wai}/doc/monithor-${1}.md -o ${Wai}/doc/monithor-${1}.1 - [[ -f ${Wai}/doc/monithor-${1}.1.gz ]] && rm -f ${Wai}/doc/monithor-${1}.1.gz - gzip ${Wai}/doc/monithor-${1}.1 - cp ${Wai}/doc/monithor-${1}.1.gz ${Wai}/monithor-${1}/usr/share/man/man1/ - fi - if [[ $2 == "delete" ]] - then - rm ${Wai}/monithor-${1}/usr/share/man/man1/*gz - rm ${Wai}/doc/monithor-${1}.1.gz - fi + mkdir -p /tmp/monithor-${1}_${2}_all/usr/share/man/man1/ + + pandoc -s -t man ${Wai}/doc/monithor-${1}.md -o /tmp/monithor-${1}_${2}_all/usr/share/man/man1/monithor-${1}.1 + gzip /tmp/monithor-${1}_${2}_all/usr/share/man/man1/monithor-${1}.1 } [[ ! -z $1 ]] && usage @@ -77,13 +73,11 @@ CheckDep GitVersion CpArchName server $NewTag -CpArchName client $NewTag SedControl server $NewTag -SedControl client $NewTag -ManPage client create -ManPage server create -BuildDeb client $NewTag +ManPage server $NewTag BuildDeb server $NewTag -ManPage client delete -ManPage server delete -CleanTemp + +CpArchName client $NewTag +SedControl client $NewTag +ManPage client ${NewTag} +BuildDeb client $NewTag diff --git a/monithor-client/usr/local/bin/monithor-client b/monithor-client/usr/local/bin/monithor-client index 45436e1..71fac8a 100755 --- a/monithor-client/usr/local/bin/monithor-client +++ b/monithor-client/usr/local/bin/monithor-client @@ -1,12 +1,10 @@ #!/bin/bash source /etc/monithor-client/service.cfg -Ip=$(echo $RemoteIp| cut -d":" -f1) Exit () { [[ "$1" == "root" ]] && echo "You have to be root ..." - [[ "$1" == "Config" ]] && echo "Ip configuration will failed" exit } @@ -16,8 +14,6 @@ if [[ $(id -u) != "0" ]] Exit root fi -[[ ! -z $(ifconfig | grep inet | awk '{print $2}' | grep $Ip) ]] && Exit Config - if [[ "$1" == "start" ]] then [[ -f /tmp/endmonitor ]] && rm -f /tmp/endmonitor diff --git a/monithor-server/DEBIAN/control b/monithor-server/DEBIAN/control index 6de64a4..563d539 100644 --- a/monithor-server/DEBIAN/control +++ b/monithor-server/DEBIAN/control @@ -1,6 +1,6 @@ -Package: monithor-client +Package: monithor-server Version: 1.0 Architecture: all Dependsd:netcat,cryptcat,screen,python,netcat,cryptcat,elinks Maintainer: Guillaume Astier -Description: monithor client (with simple http server python) +Description: monithor server (netcat & snort)