#!/bin/sh # ===================================================================== # Projet : DARKMAKE # Fichier : vars # Auteur : Nicolas "DarkHack" Chapuis (c) 2026 # ================== DARKHACK ================== # [ darkweb.fr - system online ] # Powered by Perplexity, your AI assistant # [https://www.perplexity.ai](https://www.perplexity.ai) # ============================================== # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ===================================================================== #|-------------------------------| #| "PARAMS" | #| pUser | pGroup | pName | pDir | #|-------------------------------| pServiceInfo="Hyper Texte Transfert Protocole (httpd/apache2)" pServiceDoc="man:httpd(8)" pUser="${pUser:-www-data}" pGroup="${pGroup:-www-data}" pName="${pName:-httpd}" #pCacheDir="${pCacheDir:-/var/cache/bind}" pCacheDir="${pCacheDir:-/var/cache/$pName}" pChrootDir="${pChrootDir:-/srv/$pName}" #cmdDaemon="$(which httpd)" # program at : /usr/local/apache2/bin/httpd pFolder="/usr/local/apache2/bin" cmdDaemon="$pFolder/$pName" pIdFile="/usr/local/apache2/logs/httpd.pid" #cmdDaemonFull="$cmdDaemon" pConfFolder="$racine/web/apache2" pDebugFile="$pConfFolder/data/debug" #$(which chroot) --userspec=$pUser:$pGroup $pChrootDir /bin/sh #pParamStart="-k start -f $pConfFolder/data/httpd.conf" pParamStart="-k start -e debug -E /var/log/apache2.log -f $pConfFolder/data/httpd.conf" #pParamStartDebug="-X -e debug -f $pConfFolder/data/httpd.conf" pParamStartDebug="-k start -X -e debug -f $pConfFolder/data/httpd.conf" pStartDebug="$(which sh) -c 'echo \\\"in gdb : run $pParamStartDebug\\\";LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:/usr/local/ssl/lib:/usr/local/lib\" gdb $pFolder/httpd'" #$(which chroot) $pChrootDir pStart="$(which sh) -c \"LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/ssl/lib:/usr/local/lib $pFolder/apachectl $pParamStart\"" pParamStop="" pLibFolders="/usr/local/apache2 /usr/local/ssl /usr/local/lib/php /usr/local/include/php /usr/lib/python2.7" #for pkg in "lib/scm/git" "lib/compression/zlib" "lib/languages/python" "lib/scm/svn" . $racine/lib/scm/git/install/check > /dev/null 2>&1 pLibFiles="/bin/sh $(which head) $(which which) $(which base64) $(which echo) $(which tail) $(which shuf) $(which sleep)" pLibFiles="$pLibFiles $(which tr) $(which cp) $(which sed) $(which grep) $(which md5sum) $(which wc)" pLibFiles="$pLibFiles /etc/resolv.conf /etc/passwd /etc/group /usr/sbin/nologin $(which perl) $(which msmtp)" pLibFiles="$pLibFiles /etc/localtime /dev/urandom" . $racine/lib/compression/zlib/install/check > /dev/null 2>&1 pLibFiles="$pLibFiles /usr/bin/python" pLibFiles="$pLibFiles /usr/local/lib/php.ini" pLibFiles="$pLibFiles /usr/local/libexec/mod_dav_svn.so" pLibFiles="$pLibFiles /usr/local/lib/libsvn_repos-1.so.0.0.0" pLibFiles="$pLibFiles /lib/i386-linux-gnu/libpcre.so.1" if [ -d "/usr/local/ssl" ];then shDebugHidden 1 ""$log" ssl:/usr/local/ssl" pLibFolders="$pLibFolders /usr/local/ssl" pCopyLib="/usr/local/ssl/lib;$usrLib" elif [ -d "/usr/include/openssl" ];then shDebugHidden 1 ""$log" ssl:/usr/include/openssl" pLibFolders="$pLibFolders /usr/include/openssl" pCopyLib="/usr/include/openssl/lib;$usrLib" fi pLibFiles="$pLibFiles $(which svnadmin)" pMountFolders="/proc /etc/ssl /var/www $racine /etc/srvconf/web/apache2 /etc/letsencrypt" # /etc/srvconf /etc/darkmake" # pDirStruct : directory squelton of programme pDirStruct="" pDirStruct="$pDirStruct /var/log/apache2 /var/run /tmp/php" #pEmptyFolders="/var/log/apache2 /var/run" for pythonPath in $(find / 2>&1 | grep python2.7 | grep -v '^/usr/lib/python2.7' | grep -v '^/archives' | grep -v '^/srv' | grep -v '^/opt' | grep -v '/var/cache' | grep -v '^/var/lib/dpkg' | grep -v '^/usr/share/doc' | grep -v '^/proc' | grep -v '^/disk' );do if [ -d "$pythonPath" ];then pLibFolders="$pLibFolders $pythonPath"; else pLibFiles="$pLibFiles $pythonPath"; fi done if [ -f "$racine/web/apache2/data/vars" ];then . "$racine/web/apache2/data/vars" fi if [ -d "/usr/lib/x86_64-linux-gnu" ];then usrLib="/usr/lib/x86_64-linux-gnu" elif [ -d "/usr/lib/i386-linux-gnu" ];then usrLib="/usr/lib/i386-linux-gnu" else usrLib="" fi if [ -d "/lib/x86_64-linux-gnu" ];then lib="/lib/x86_64-linux-gnu" elif [ -d "/lib/i386-linux-gnu" ];then lib="/lib/i386-linux-gnu" else lib="" fi if [ -z "$lib" ];then shDebugHidden 0 ""$log" lib empty : $lib" else shDebugHidden 1 ""$log" check gnutls in /usr/local/lib" for gnutlsFile in libgnutls-dane.la libgnutls-dane.so libgnutls-dane.so.0 libgnutls-dane.so.0.4.1 libgnutls.la libgnutls.so libgnutls.so.30 libgnutls.so.30.14.8 libgnutlsxx.la libgnutlsxx.so libgnutlsxx.so.28 libgnutlsxx.so.28.1.0;do if [ -f "/usr/local/lib/$gnutlsFile" ];then pLibFiles="$pLibFiles /usr/local/lib/$gnutlsFile" fi done # shDebugHidden 1 ""$log" $lib libnss_dns.so.2 libnss_files.so.2" pLibFiles="$pLibFiles $lib/libnss_dns.so.2 $lib/libnss_files.so.2" shDebugHidden 1 ""$log" $lib libnss_files.so.2" pLibFiles="$pLibFiles $lib/libnss_files.so.2" if [ -f "$lib/libz.so.1" ];then pLibFiles="$pLibFiles $lib/libz.so.1" pLibFiles="$pLibFiles /usr/local/lib/libz.a" pLibFiles="$pLibFiles /usr/local/lib/libz.so" pLibFiles="$pLibFiles /usr/local/lib/libz.so.1.2.11" pLibFiles="$pLibFiles /usr/local/lib/pkgconfig/zlib.pc" fi fi for userLocalFullPath in /usr/local/lib/libsvn_* /usr/local/lib/libutf8proc.*;do if [ ! -f "$userLocalFullPath" ];then continue;fi userLocalFile="$(echo $userLocalFullPath | rev | cut -d/ -f1 | rev)" userLocalPath="$(echo $userLocalFullPath | rev | cut -d/ -f2- | rev)" if [ ! -f "/usr/lib/$userLocalFile" ];then cp $userLocalPath/$userLocalFile /usr/lib/$userLocalFile shDebugHidden 1 ""$log" $userLocalPath/$userLocalFile /usr/lib/$userLocalFile" fi # pLibFiles="$pLibFiles $userLocalPath/$userLocalFile /usr/lib/$userLocalFile" pLibFiles="$pLibFiles $userLocalPath/$userLocalFile" done #user:group:rwx,rwx,rwx:file #pDirUserGroupRight="${pDirUserGroupRight} user:group:rwx,rwx,rwx:file" pDirUserGroupRight="${pDirUserGroupRight} ${pUser}:${pGroup}:rw,,:/tmp/php" pDirUserGroupRight="${pDirUserGroupRight} ${pUser}:${pGroup}:rwx,rw,:/tmp/mod_cache-lock" pDirUserGroupRight="${pDirUserGroupRight} ${pUser}:${pGroup}:rwx,rw,:/var/cache/routing" pDirUserGroupRight="${pDirUserGroupRight} ${pUser}:${pGroup}:rw,,:/var/log/apache2/darkweb.fr" #pDirUserGroupRight="$pDirUserGroupRight $pUser:$pGroup:rx,,:$racine/dns/bind/servers/common" #pDirUserGroupRight="$pDirUserGroupRight $pUser:$pGroup:rx,,:/etc/bind" #pDirUserGroupRight="$pDirUserGroupRight $pUser:$pGroup:rw,r,r:/etc/bind/ddns.key" #pDirUserGroupRight="$pDirUserGroupRight $pUser:$pGroup:rwx,,:/var/cache/bind"