tis-crowdsec icon

CrowdSec Agent

Paquet d’installation silencieuse pour CrowdSec Agent

1.7.4-10
Security
Security

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-crowdsec
  • name: CrowdSec Agent
  • version: 1.7.4-10
  • categories: Security
  • maintainer: Kevin Guerineau
  • editor: CrowdSec
  • licence: MIT license
  • locale: all
  • target_os: debian,ubuntu(<24)
  • architecture: x64
  • signature_date:
  • size: 65.72 Mo
  • homepage : https://www.crowdsec.net/

package           : tis-crowdsec
version           : 1.7.4-10
architecture      : x64
section           : base
priority          : optional
name              : CrowdSec Agent
categories        : Security
maintainer        : Kevin Guerineau
description       : CrowdSec is a free, modern and collaborative behavior detection engine, coupled with a global IP reputation network
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : debian,ubuntu(<24)
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : CrowdSec est un moteur de détection des comportements gratuit, moderne et collaboratif, associé à un réseau mondial de réputation IP
description_pl    : CrowdSec to darmowy, nowoczesny i oparty na współpracy mechanizm wykrywania zachowań, połączony z globalną siecią reputacji IP
description_de    : CrowdSec ist eine kostenlose, moderne und kollaborative Verhaltenserkennungs-Engine, gekoppelt mit einem globalen IP-Reputationsnetzwerk
description_es    : CrowdSec es un motor de detección de comportamientos gratuito, moderno y colaborativo, unido a una red global de reputación IP
description_pt    : O CrowdSec é um motor de deteção de comportamentos gratuito, moderno e colaborativo, associado a uma rede global de reputação de IP
description_it    : CrowdSec è un motore di rilevamento del comportamento gratuito, moderno e collaborativo, abbinato a una rete globale di reputazione IP
description_nl    : CrowdSec is een gratis, moderne en collaboratieve engine voor gedragsdetectie, gekoppeld aan een wereldwijd IP-reputatienetwerk
description_ru    : CrowdSec - это бесплатная, современная и совместная система обнаружения поведения в сочетании с глобальной сетью IP-репутации
audit_schedule    : 
editor            : CrowdSec
keywords          : 
licence           : MIT license
homepage          : https://www.crowdsec.net/
package_uuid      : d2da07f6-48c8-496d-b155-9652a0f59d39
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : ba401cac105d603ac5ab3c3769e77ea42f832031f322613e0580dd946f2240d8
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-01-22T15:20:40.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : o855hrufyEKjLJ1b0qIzcisFd3dDMJHzkgH9G/Cecld+9psrlgOd+ldjm4LmpAc/8v5e7RDWcbGCy4fWN5DM90z792PRmWzAZFonnWHomfGhzfxrtTZVW2egU4sv9F37doYgnHebLkYot7r5wdEhucIyZCI8G0y3oCeDFgRFyim3v2caL6UzDNmytS2kT1rxmAWzGBJmafJ3c8P/82Dv+a67K+nodI/NqS81MhlZb8LLbmJT/RbO/6tMXv+rpjCp6GBs6gtBOZ0v/5DSTiNbp01g1WeGqlkZWU+v3SoqQ3DCXs0BvOtEIf/DVGbycb3sKcSHyATACW3Se1WRyZTUMw==

# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    run('LANG=C DEBIAN_FRONTEND=noninteractive apt-get install -y ./*.deb')

def uninstall():
    uninstall_apt('crowdsec crowdsec-firewall-bouncer-iptables')

# -*- coding: utf-8 -*-
from setuphelpers import *
import gzip
from io import BytesIO
from setuphelpers import Version,wgets
from setupdevhelpers import *

def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies_from_wapt_console()

    if not proxies:
        proxies = get_proxies()

    dict_arch = {"x64": "amd64"}

    urldepot = 'https://packagecloud.io/crowdsec/crowdsec/debian/'
    dist = "bookworm"
    arch = dict_arch[control.architecture]
    package_name_list = ["crowdsec","crowdsec-firewall-bouncer-iptables"]


    with gzip.open(BytesIO(wgets('%s/dists/%s/main/binary-%s/Packages.gz' % (urldepot,dist,arch),proxies=proxies))) as f:
        data = f.read().decode('utf-8')

    list_package = listcontrol_to_dict_data(data,'\nPackage: ')
    all_dep=[]

    last_version= None
    list_deb = []
    for package_name in package_name_list :

        last_package = sorted([u for u in list_package if u['package'] == package_name], key=lambda p: (Version(p['version'].split(':',1)[-1].split('+')[0])), reverse=True)[0]
        if not last_version:
            last_version = last_package['version'].split(':',1)[-1].split('+')[0]

        all_dep.append(last_package)

        for s in last_package.get('depends','').split(','):
            for p in s.split('|'):
                get_all_dep_version_pacakge(list_package,p.split('(')[0].strip(),all_dep)

        for u in all_dep:
            list_deb.append(urldepot + '/' + u['filename'])

    list_all_file = []
    for f in list_deb:
        filename = f.split('/')[-1]
        list_all_file.append(filename)
        if not isfile(filename):
            wget(f,filename,proxies=proxies)

    for f in glob.glob('*.deb'):
        if not f in list_all_file:
            remove_file(f)

    control.set_software_version(last_version)
    control.save_control_to_wapt()



def listcontrol_to_dict_data(data=None, first_entry=None):
    list_package = '\n' + data
    list_control=[]
    for i in list_package.split(first_entry):
        if not i.strip('\n'):
            continue
        list_control.append(first_entry.replace('\n','') + i)

    list_package = []
    for pkg in list_control:
        entry = {}
        gpg = False
        for l in pkg.split('\n'):

            if '-----BEGIN PGP PUBLIC KEY BLOCK-----' in l:
                gpg = True
                continue
            if '-----END PGP PUBLIC KEY BLOCK-----' in l:
                gpg = False
                continue
            if gpg :
                continue

            if not l:
                continue
            if (':' in l) and (not '::' in l) and (not l.startswith(' ')) :
                key = l.split(':',1)[0].strip().lower()
                value = l.split(':',1)[1].strip()
                entry[key] = value.strip('\n')
            else:
                entry[key] =  entry[key].strip('\n') + ' ' if entry[key].strip() else "" + l.strip()

        list_package.append(entry)
    return list_package

def get_all_dep_version_pacakge(list_package,package_name,all_dep):
    last_package = sorted([u for u in list_package if u['package'] == package_name], key=lambda p: (Version(p['version'].split(':',1)[-1].split('+')[0])), reverse=True)
    if last_package:
        last_package = last_package[0]
        all_dep.append(last_package)
    else:
        return
    for k in last_package.get('depends','').split('|'):
        for p in k.split(','):
            get_all_dep_version_pacakge(list_package,p.split('(')[0].strip(),all_dep)

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
4b20bb1e9b1b91ec23cfd9aa896569d5f5c36d562141f6bfb0d800e0b5c2f455 : WAPT/control
ba401cac105d603ac5ab3c3769e77ea42f832031f322613e0580dd946f2240d8 : WAPT/icon.png
7cfff37c8e1cedad2e63d2abff05f0905af23fde1809aacce5d6d6bc09cbc044 : crowdsec-firewall-bouncer-iptables_0.0.34_amd64.deb
e5d6b5c9edb0f09262fdcb77eed8362322613a7a8a3c3f89b6e7aa58b5a1f013 : crowdsec_1.7.4_amd64.deb
1a92169bb5d5e8f4bdd17564ecb342f6731bccd30eef2192f6c00be4232a077b : luti.json
5b4f87531f7e5bde27a6a7b3a8641f8ec493321bb5bdfc728b6d022ff9a9186c : setup.py
338de3a2739c037c3e9c75ef8c93f7e4655c5e901ef4795fc2c9efc9e233bfc8 : update_package.py