[UPDATE] - TP 05
This commit is contained in:
parent
8fd4776f92
commit
2ff5c979b5
BIN
doc/monithor-client.1.gz
Normal file
BIN
doc/monithor-client.1.gz
Normal file
Binary file not shown.
@ -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é
|
||||
|
||||
BIN
doc/monithor-server.1.gz
Normal file
BIN
doc/monithor-server.1.gz
Normal file
Binary file not shown.
36
generate.sh
36
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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 <guillaume@gastier.net>
|
||||
Description: monithor client (with simple http server python)
|
||||
Description: monithor server (netcat & snort)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user