Attention : support for WAPT 1.8.2 ended on June the 30th 2022.

There are known vulnerabilities in WAPT dependencies in WAPT 1.8.2 branch. Please upgrade to the latest supported version. CVE listing (non exhaustive) :
  • * python engine : python 2.7 (CVE-2020-10735, CVE-2015-20107, CVE-2022-0391, CVE-2021-23336, CVE-2021-3177, CVE-2020-27619, CVE-2020-26116, CVE-2019-20907, CVE-2020-8492, etc.)
  • * cryptography : openssl : CVE-2022-2068, CVE-2022-1292, CVE-2022-0778, CVE-2021-4160, CVE-2021-3712, CVE-2021-23841, CVE-2021-23840, CVE-2021-23839, CVE-2020-1971, CVE-2020-1968, CVE-2019-1551
  • * python dependencies : cryptography (CVE-2020-36242, CVE-2020-25659), eventlet (CVE-2021-21419), jinja2 (CVE-2020-28493), psutil (CVE-2019-18874), waitress (CVE-2022-31015), lxml (CVE-2021-4381, CVE-2021-28957, CVE-2020-27783, CVE-2018-19787), ujson (CVE-2022-31117, CVE-2022-31116, CVE-2021-45958), python-ldap (CVE-2021-46823)

Recompiling WAPT from source

Building the WAPT Agent for Windows

WAPT requirements

Python environment

  • Python 2.7.13;

  • client python libraries in requirements.txt;

  • server python libraries in requirements-server.txt;

Lazarus environment

WAPT relies on the following third-party freepascal/ lazarus librairies:

Tranquil IT packages

Creating a development environment with virtualenv

With a clean Windows installed:

c:\python27\python -m pip install -U pip setuptools
  • create a development environment with virtualenv;

    mkdir c:\tranquilit
    git clone git@github.com:tranquilit/WAPT.git (ou git clean -fxd ...)
    cd c:\tranquilit\wapt init_workdir.bat
    

Installing the WAPT development environment

On a clean Windows 7 install as a Local Administrator:

Installing Lazarus

wapt-get install tis-pyscripter tis-tortoisegit tis-7zip tis-python27 tis-notepadplusplus tis-firefox tis-putty tis-lazarus tis-openssh tis-signtool

wget https://www.sqlite.org/2018/sqlite-dll-win32-x86-3250200.zip
unzip sqlite3.dll dans C:\Windows\SysWOW64
md c:\tranquilit

REM git.exe clone --recurse-submodules "https://github.com/tranquilit/WAPT.git" "C:\tranquilit\wapt"
git.exe clone --recurse-submodules "https://github.com/tranquilit/WAPT.git" "C:\tranquilit\wapt"
REM git pull --recurse-submodules=yes --ff-only)
cd  \tranquilit\wapt
init_workdir.bat

git clone https://github.com/tranquilit/pltis_indy.git c:\tranquilit\pltis_indy
git clone https://github.com/tranquilit/pltis_utils.git c:\tranquilit\pltis_utils
git clone https://github.com/tranquilit/pltis_sogrid.git  c:\tranquilit\pltis_sogrid
git clone https://github.com/tranquilit/pltis_superobject.git  c:\tranquilit\pltis_superobject
git clone https://github.com/tranquilit/pltis_python4delphi.git c:\tranquilit\pltis_python4delphi
git clone https://github.com/tranquilit/pltis_virtualtrees.git c:\tranquilit\pltis_virtualtrees
git clone https://github.com/tranquilit/pltis_virtualtreesextra.git c:\tranquilit\pltis_virtualtreesextra
git clone https://github.com/tranquilit/pltis_dcpcrypt.git c:\tranquilit\pltis_dcpcrypt
git clone https://github.com/tranquilit/pltis_luipack.git c:\tranquilit\pltis_luipack
git clone https://github.com/tranquilit/pltis_synapse.git c:\tranquilit\pltis_synapse

c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_dcpcrypt\dcpcrypt_laz.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_indy\indylaz.lpk
c:\lazarus\lazbuild.exe c:\tranquilit\pltis_utils\pltis_utils.lpk
c:\lazarus\lazbuild.exe c:\tranquilit\pltis_superobject\pltis_superobject.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_virtualtrees\pltis_virtualtrees.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_virtualtreesextra\pltis_virtualtreesextra.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_sogrid\pltis_sogrid.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_dcpcrypt\dcpcrypt_laz.lpk
c:\lazarus\lazbuild.exe c:\tranquilit\pltis_synapse\laz_synapse.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_luipack\luicomponents\luicomponents.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_luipack\luicomponents\luicomponents.lpk
c:\lazarus\lazbuild.exe --add-package C:\tranquilit\pltis_python4delphi\PythonForDelphi\Components\p4dlaz.lpk
c:\lazarus\lazbuild.exe --add-package C:\lazarus\components\anchordocking\design\anchordockingdsgn.lpk
c:\lazarus\lazbuild.exe --build-ide=
c:\lazarus\lazbuild.exe c:\tranquilit\wapt\wapt-get\pltis_wapt.lpk

REM depending on version, change community to enterprise
waptpython build_exe.py community

Installing the server environment on Windows

cd \tranquilit\wapt
waptpython waptserver\winsetup.py all

Creating the InnoSetup installers

The .iss files are located in C:\tranquilit\wapt\waptsetup;

The waptsetup installer includes the python libraries, the command line tool wapt-get, the local webservice waptservice, the packaging tool and the WAPT console waptconsole.

The file waptserver.iss allows to build an installer that includes a Nginx web server in front and the Flask webservice waptserver.py.

The waptstarter installer only includes the local webservice and the command line tool wapt-get. It does not include the WAPT console waptconsole, nor the packaging tools.

Right-click on the .iss file ‣ Compile ` will compile an installer with :program:`InnoSetup.

or using the command line:

"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" C:\tranquilit\wapt\waptsetup\waptsetup.iss

The installer’s global parameters are defined with #define in the file header.

If you do not sign the installers, you may comment the lines #define signtool ...

Building the WAPT Agent for MacOS

Generating the agent package

  • if you do not have access to the sudo command, you’ll need to enable the root user;

  • from the root of the WAPT directory, navigate to waptservice/pkg;

  • execute the createpkg script with administrator rights;

    sudo ./createpkg.py
    

It may ask for additional software (the Command Line Developer Tools) and install them after a prompt which you should answer Yes to;

  • the agent package should have been generated, under a name along the lines of tis-waptagent-1.7.6.6550-tismacos-fdc24bca.pkg;

Installing the agent package

  • execute the following command on your MacOS:

    sudo installer -pkg tis-waptagent*.pkg -target /
    

If the installation is successful, you should have the wapt files in /opt and access to the wapt, wapt-get, waptpython and waptservice commands.

  • the agent should launch at the next reboot, but you probably want to start it right away with the following command:

    sudo launchctl load -w /Library/LaunchDaemons/wapt.plist
    

Building the WAPT Agent for Linux

Building the environment on Debian Linux

mkdir ~/tranquilit/
cd ~/tranquilit/
git clone git@github.com:tranquilit/WAPT.git
cd ~/tranquilit/wapt/waptserver/deb
python createdeb.py
cd ~/tranquilit/wapt/waptrepo/deb
python createdeb.py