• shellcheck-list
    Posted on Wednesday July 06, 2022
    SC1000 $ is not used specially and should therefore be escaped. SC1001 This \o will be a regular ‘o’ in this context. SC1003 Want to escape a single quote? echo ‘This is how it’\‘’s done’. SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line. SC1007 Remove space after = if trying to assign a value (or for empty string, use var=’’ … ). SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a ‘shell’ directive to specify. SC1009 The mentioned parser error was in … SC1010 Use semicolon or linefeed before ‘done’ (or quote to make it literal). SC1011 This apostrophe terminated the single quoted string! SC1012 \t is just literal t here. For tab, use "$(printf '\t')" instead. SC1014 Use ‘if cmd; then ..’ to check exit code, or ‘if [ “$(cmd)” = .. ]’ to check output. SC1015 This is a unicode double quote. Delete and retype it. SC1016 This is a Unicode single quote. Delete and retype it. SC1017 Literal carriage return. Run script through tr -d '\r' . SC1018 This is a unicode non-breaking space. Delete it and retype as space. SC1019 Expected this to be an argument to the unary condition. SC1020 You need a space before the if single then “]” else “]]” SC1026 If grouping expressions inside [[..]], use ( .. ). SC1028 In [..] you have to escape or ... Continue Reading »
  • Bridge returned error 503! (19174)
    Posted on Friday July 01, 2022
    Releases was unable to receive or process the remote website's content! Error message: `Unexpected response from upstream` Query string: `action=display&bridge=Gogs&context=Releases&host=https%3A%2F%2Fgit.echosystem.fr&user=Erreur32&project=DayZ-Stat-Server&format=Atom` Version: `git.master.2bba89d` Press Return to check your input parameters Press F5 to retry Check if this issue was already reported on GitHub (give it a thumbs-up) Open a GitHub Issue if this error persists Search GitHub Issues Open GitHub Issue logmanoriginal Continue Reading »
  • Bridge returned error 503! (19174)
    Posted on Friday July 01, 2022
    Releases was unable to receive or process the remote website's content! Error message: `Unexpected response from upstream` Query string: `action=display&bridge=Gogs&context=Releases&host=https%3A%2F%2Fgit.echosystem.fr&user=Erreur32&project=Bash3lper&format=Mrss` Version: `git.master.2bba89d` Press Return to check your input parameters Press F5 to retry Check if this issue was already reported on GitHub (give it a thumbs-up) Open a GitHub Issue if this error persists Search GitHub Issues Open GitHub Issue logmanoriginal Continue Reading »
  • How to automatically update Linux security package with Debian 11 / 10 / 9
    Posted on Friday June 24, 2022
    In two step you're done ! You need to install unattended-upgrades from APT repository. apt install unattended-upgrades Now you need to configure properly the package. dpkg-reconfigure unattended-upgrades Answer YES Finish. :) MORE tips: Enable Email Notification # uncomment in /etc/apt/apt.conf.d/50unattended-upgrades Unattended-Upgrade::Mail "My-super@mail.com"; Check this file /etc/apt/apt.conf.d/50unattended-upgrades many options are available. Enjoy ! TAG: DEBIAN , SECU by 🅴🆁🆁🅴🆄🆁32 🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼 Continue Reading »
  • WINDOWS TIPS
    Posted on Thursday March 10, 2022
    Réparer Windows FIX corrupted files sfc /scannow chdsk : réparer les erreurs de disque chkdsk C: /F /R bootrec : réparer le démarrage de Windows bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd https://www.malekal.com/bcd-boot-configuration-data-windows " /> Link: https://www.malekal.com/bcd-boot-configuration-data-windows Method 2. How to repair Windows 10/11 using DISM Windows 10/11 includes a command-line utility known as DISM (Deployment Image Servicing and Management). DISM command Windows 10/11 can be used to repair and prepare Windows images, including, Windows Setup, Windows Recovery Environment, and Windows PE. Also, DISM can be used to fix the recovery image within an installation of the operating system. To repair Windows 10/11 using DISM commands: To check whether there is any corruption, Run command line as administrator, then type the following syntax and press "Enter". DISM /Online /Cleanup-Image /CheckHealth To scan the Windows image for any corruption, type below command and hit "Enter". DISM /Online /Cleanup-Image /ScanHealth To fix Windows image, type the following command and hit "Enter". DISM /Online /Cleanup-Image /RestoreHealth /Source:repairSource\install.wim REMOVE DLL RIGHT click on the START button and select WINDOWS TERMINAL (ADMIN) You can then list all of the drivers on your computer using pnputil /enum-drivers and find the one with WDCSAM64_PREWIN8.SYS or you can just look at the error message. In my case the driver that needs ... Continue Reading »
  • Windows - Demarrage automatique de Programme avec privilege administrateur.
    Posted on Thursday March 10, 2022
    This is a little old, but I was having the same problems, and none of the above was working. What I did was create a VBScript that ran at startup that opened said program. Right-click on the program, go to properties, then compatibility and check "Run as Administrator" Create the VBScript using a text editor (I use Notepad++) Script: Set WshShell = CreateObject("WScript.Shell" ) WshShell.Run """C:\Program Files (x86)\File\Program.exe""", 0 'Must quote command if it has spaces; must escape quotes Set WshShell = Nothing Note: that C:\Program Files (x86)\File\Program.exe is the full path to the program with extension. Also, make sure to save it as a .vbs Now place the VBScript in the startup folder: %AppData%\Microsoft\Windows\Start Menu\Programs\Startup Or, alternatively access it by Win+R ⇒ shell:startup ⇒ Enter I used this instead of a batch file because I did not want that ugly command window showing up. Continue Reading »
  • Tips Shell
    Posted on Wednesday March 09, 2022
    Moultes TIPS Ajout /ADD certbot plugin apache !! apt-get install python3-certbot-apache ---------- /dev/full Linux has this fun device file called "/dev/full", which is like its more famous cousin "/dev/null", but when you write to "/dev/full", instead of throwing away the data, it fails. It acts like a file on a filesystem that has just run out of space: $ echo "Hello World!" > /dev/full bash: echo: write error: No space left on device $ echo $? 1 ------------ This is a great little tool for testing that programs handle I/O errors correctly. It's inconvenient to create actual filesystems with no space left, or disks that actually fail, but it's really easy to ask a program to write its output to "/dev/full" and see what happens. RCCONF update-rcconf-guide ------------- ERROR: systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service' Create FILE `/etc/NetworkManager/conf.d/no-systemd-resolved.conf` with this content: [main] systemd-resolved=false And then active it ! systemctl status systemd-resolved.service systemctl enable systemd-resolved.service Continue Reading »
  • Windows - Créer un raccourci élevé pour exécuter le programme en contournant l'invite UAC dans Windows 11/10
    Posted on Tuesday March 08, 2022
    Créer un raccourci élevé pour exécuter le programme en contournant l'invite UAC dans Windows 11/10 Le contrôle de compte d'utilisateur ou UAC vous avertit essentiellement avant que des modifications ne soient apportées à votre PC - pas toutes les modifications, mais uniquement celles qui nécessitent des autorisations de niveau administrateur. Chaque fois que vous exécutez certains programmes, vous verrez d'abord l'invite UAC. Ce n'est qu'après avoir donné votre consentement que le programme sera exécuté. Il s'agit d'une fonctionnalité de sécurité qu'il vaut mieux laisser à ce comportement par défaut. Mais vous pouvez avoir des programmes que vous exécutez très fréquemment et auxquels vous faites entièrement confiance . Dans de tels cas, l'invite UAC pourrait devenir un irritant. Bien que vous ne deviez jamais désactiver les invites UAC pour l'ensemble de l'ordinateur, vous pouvez ignorer l'invite UAC et la désactiver pour certaines applications, à l'aide de Microsoft Application Compatibility Toolkit Exécuter des programmes en contournant l'invite UAC Si vous souhaitez désactiver l'invite UAC pour des programmes spécifiques, vous pouvez également créer un raccourci élevé pour le programme, qui vous permettra de contourner l'invite UAC et d'exécuter le programme sans voir l'invite ... Continue Reading »
  • Ping command (how to check jumbo frame)
    Posted on Tuesday March 08, 2022
    Ping command Jumbo Frames = 9100 Standard MTU = 1500 ( but with 1400 should be good for all ) Short Frames = 64 Linux: ping -M do -s [FRAME] [IP] [ -M "do/dont/want" ] define mtu discovery, can be one of ("do|dont|want") [ -s "size"] use as number of data bytes to be sent ping -M do -s 1400 1.1.1.1 PING 1.1.1.1 (1.1.1.1) 1400(1400) bytes of data. 1478 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=5.22 ms Windows: ping [IP] -f -l [FRAME] [ -f ] Active l’indicateur Ne pas fragmenter dans le paquet (IPv4 uniquement). [ -l "size" ] Taille du tampon d’envoi. ping 1.1.1.1 -f -l 1400 Envoi d’une requête 'Ping' 1.1.1.1 avec 1400 octets de données : Réponse de 1.1.1.1 : octets=1400 temps=2 ms TTL=60 Mac OSX: ping -D -s 9100 [destinationIP] HELP COMMAND Linux ping -h Usage ping [options] <destination> Options: <destination> dns name or ip address -a use audible ping ... Continue Reading »
  • APT repository - How to on Debian
    Posted on Saturday November 20, 2021
    How to make your .deb You can use this little script function MONDEB(){ # Go to your repository cd /home/tools/MONDEB/bashelper # make .deb file dpkg-deb --build bashelper # copy .deb on the right place (MONREPO). cp /home/tools/MONDEB/bashelper/bashelper.deb /home/tools/MONREPO/bashelper/ -f } function cdrepo() { # go to the web repo cd /home/tools/MONREPO/bashelper/ # Delete old files rm -rf /home/tools/MONREPO/bashelper/db rm -rf /home/tools/MONREPO/bashelper/pool rm -rf /home/tools/MONREPO/bashelper/dists rm -f /home/tools/MONREPO/bashelper/public.key # Make the magic reprepro -b . includedeb stable /home/tools/MONREPO/bashelper/bashelper.deb # Done ! } MONDEB echo " ✅DEB update OK " cdrepo echo " ✅REPO update OK " echo " gpg starting ... need to put your secret" /usr/bin/gpg --armor --output /home/tools/MONREPO/bashelper/public.key --export contact@echosystem.fr Make REPOSITORY for web APT Exemple of Apache Sub-domain: <VirtualHost *:80> ServerName deb.echosystem.fr RedirectPermanent / https://deb/echosystem.fr/ </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> ServerName deb.echosystem.fr ServerAdmin contact@echosystem.fr DocumentRoot /home/tools/MONREPO Serversignature off # SSL SSLEngine On SSLHonorCipherOrder on SSLCompression off SSLCertificateFile /etc/letsencrypt/live/deb.echosystem.fr/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/deb.echosystem.fr/privkey.pem ##Secu SetEnv nokeepalive ssl-unclean-shutdown <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" Header always set X-Frame-Options SAMEORIGIN Header always set X-Xss-Protection "1; mode=block" Header always set X-Content-Type-Options nosniff Header always set Referrer-Policy origin </IfModule> <Directory /home/tools/MONREPO> Options +Indexes ... Continue Reading »
  • APACHE my /etc/apache2/conf-enabled/security.conf file
    Posted on Wednesday November 03, 2021
    # # Disable access to the entire file system except for the directories that # are explicitly allowed later. # # This currently breaks the configurations that come with some web application # Debian packages. # #<Directory /> # AllowOverride None # Require all denied #</Directory> # Changing the following options will not really affect the security of the # server, but might make attacks slightly more difficult in some cases. # # ServerTokens # This directive configures what you return as the Server HTTP response # Header. The default is 'Full' which sends information about the OS-Type # and compiled in modules. # Set to one of: Full | OS | Minimal | Minor | Major | Prod # where Full conveys the most information, and Prod the least. #ServerTokens Minimal ServerTokens Prod #ServerTokens Full # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail #ServerSignature Off ServerSignature Off # # Allow TRACE method # # Set to "extended" to also reflect the request body (only for testing and # diagnostic purposes). # # Set to one of: ... Continue Reading »
  • Nano rename function Changelog - Debian 11 bullseye
    Posted on Thursday October 21, 2021
    Nano list rename function changelog Changes between v4.9 and v5.0: ------------------------------ options: rename --tempfile to --saveonexit, to be far clearer #set tempfile set saveonexit Changes between v4.8 and v4.9: ------------------------------ options: rename --suspend to --suspendable, to make more sense #set suspend set suspendable Changes between v3.2 and v4.0: ------------------------------ options: actually rename --rebindkeypad to --rawsequences (-K) #set rebindkeypad set rawsequences Changes between v2.8.5 and v2.8.6: ---------------------------------- options: rename --cut to --cutfromcursor, to be clearer #set cut set cutfromcursor Source https://www.nano-editor.org/dist/latest/ChangeLog Continue Reading »
  • Youtube-dl - fix - ERROR: unable to download video data: HTTP Error 403: Forbidden
    Posted on Tuesday April 28, 2020
    Fix - ERROR: unable to download video data: HTTP Error 403: Forbidden When you want to download a youtube video and you have this: $ youtube-dl https://youtu.be/JkeE2O15RFs [youtube] JkeE2O15RFs: Downloading webpage ERROR: unable to download video data: HTTP Error 403: Forbidden You can try to fix with 2 steps: First update youtube-dl with -U $ sudo youtube-dl -U And finally try to remove the cache , yes the cache ... with --rm-cache-dir $ youtube-dl --rm-cache-dir Removing cache dir /root/.cache/youtube-dl ... Try now : $ youtube-dl https://youtu.be/JkeE2O15RFs --no-cache-dir -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" [youtube] JkeE2O15RFs: Downloading webpage [youtube] JkeE2O15RFs: Downloading js player vflset [youtube] JkeE2O15RFs: Downloading js player vflset [download] Destination: Beastie Boys - Alive (Official Music Video)-JkeE2O15RFs.f137.mp4 [download] 100% of 68.01MiB in 00:06 [download] Destination: Beastie Boys - Alive (Official Music Video)-JkeE2O15RFs.f140.m4a [download] 100% of 3.71MiB in 00:00 [ffmpeg] Merging formats into "Beastie Boys - Alive (Official Music Video)-JkeE2O15RFs.mp4" Deleting original file Beastie Boys - Alive (Official Music Video)-JkeE2O15RFs.f137.mp4 (pass -k to keep) Deleting ... Continue Reading »
  • Ne pas copier coller n'importe quel texte de source inconnue
    Posted on Tuesday March 24, 2020
    Ne pas copier coller n'importe quel texte de source inconnue !! Ne pas copier/coller des sources inconnues dans votre terminal SSH On a tous un jour copier ne serait-ce qu'un git clone ou un bout de script (_ou même une toute petite ligne de commande_) sur une page/article d'un site , malheureux qu'a tu fais ... Ne sais tu pas que le texte que tu vois ne correspond pas fatalement au code qu'il renvoie Regardez l'exemple suivant --> copier le code ci-dessous ( ctrl + c ): git clone /dev/null; clear; echo -n "Bonjour ";whoami|tr -d '\n';echo -e '!\nMauvaise idee. Ne copiez pas de code a partir de sites que vous ne connaissez pas! Voici la premiere ligne de votre fichier /etc/passwd: ';head -n1 /etc/passwdgit clone git://git.github.com/dont/copy/paste/from/unknow/source.git Et maintenant collé le dans votre terminal ! (c'est sans risque ... seulement pour l'exemple.) Pour TESTER , Coller ici pour voir le résultat L'idée étant de cacher via la classe CSS dans la balise "< span" le texte en dehors de l'écran , ce qui fait que l'on copie aussi ce texte produit par le bloc HTML "< span". Voici le code utilisé ici: git clone ... Continue Reading »
  • Apache 2.4 Rewrite 404 errors log
    Posted on Tuesday January 30, 2018
    Apache 2.4 Rewrite 404 errors log - Create 1 conf file in apache : $ nano /etc/apache2/conf-available/rewrite-log-404.conf - Paste this code inside /etc/apache2/conf-available/rewrite-log-404.conf RewriteEngine On # exclude directory index RewriteCond %{REQUEST_URI} !/index\.(php|html?)$ # exlcude auto-index of directories RewriteCond %{REQUEST_URI} !/$ # if the request is not a file, directory, or symlink RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l # set the "notfound" environment variable RewriteRule ^ - [E=notfound:true,L] # LogFormat Vhost log LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %X" vhost_combined CustomLog /var/log/apache2/error.log vhost_combined env=notfound CustomLog /var/log/apache2/requests.log vhost_combined env=!notfound - Activate conf with: $ a2enconf rewrite-log-404 ------------------------------- by 🅴🆁🆁🅴🆄🆁32 Hosted on 🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼 Continue Reading »
  • Mise à jour automatique des paquets de sécurité Debian 11 / 10 / 9
    Posted on Monday December 18, 2017
    Mise à jour des paquets de sécurité Debian (toutes versions) automatiquement en installant : unattended-upgrades apt install unattended-upgrades Il suffit de le paramétrer avec cette commande: dpkg-reconfigure unattended-upgrades Bien répondre OUI Il est important de mettre régulièrement son système à jour pour maintenir un haut niveau de sécurité. Par défaut, les mises à jour doivent être appliquées manuellement à l'aide d'un outil de gestion de paquets. Autrement, vous pouvez choisir d'automatiser ce processus de téléchargement et d'installation des mises à jour de sécurité. ... Continue Reading »
  • MOTDs32 The new MODstat for BASH 2017
    Posted on Friday July 21, 2017
    The new MODstat for BASH 2017: https://git.echosystem.fr/Erreur32/MOTDs32 Ce projet MOTDs32 est un fork de l'excelent MODstat , J'avais mis en place un système complémentaire à MODstat, mais cela fesait doublon lors de la connexion SSH. Le dernier push (2015) de MODstat ne me plait pas non plus, avec une banner trop rigolote (laissant apparaitre un âne...) avec Fortune ( proverbe ), inutile pour moi ^^. j'ai donc opté pour une fusion des deux scripts: MODstat + Stats32 = MOTDs32 (2017) New project MOTDs32 by 🅴🆁🆁🅴🆄🆁32 https://git.echosystem.fr/Erreur32/MOTDs32 ,--. ,--. ,-----. ,--------.,------. ,----. ,---. | `.' |' .-. ''--. .--'| .-. \ ,---. '.-. |'.-. \ | |'.'| || | | | | | | | \ :( .-' .' < .-' .' | | | |' '-' ' | | | '--' /.-' `)/'-' |/ '-. `--' `--' `-----' ... Continue Reading »
  • Debian motdstat (le mot du jour avec des stats)
    Posted on Monday July 17, 2017
    NEW project 2017 --> https://gitlab.echosystem.fr/Erreur32/MOTDs32 Pour avoir des jolies stats (à jours) à chaque connexion dans votre terminal, comme l'image ci-dessus ! * Récuperez la dernière version du tar.gz d’installation (oui ça date !!) sur le site officiel (http://www.gelogic.net/download/) Dernière version 2014/07 : MOTDstat-0.0.4.tar.gz ~$ wget http://www.gelogic.net/wp-content/uploads/2014/07/MOTDstat-0.0.4.tar.gz ~$ tar -xvf MOTDstat-0.0.4.tar.gz – Installation: cd MOTDstat && make install – Générez les premières stats du motd avec la commande suivante: ~$ motdstat –generate – Automatisation : CRONTAB  : ~$ crontab -e */5 * * * * /usr/bin/motdstat –generate Voila rien à faire de plus , sauf customiser ces options dans le fichier de config : /etc/motdstat/ fstab_limits motdstat.conf netservice process Enjoy ! by 🅴🆁🆁🅴🆄🆁32 Hosted on 🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼 Continue Reading »
  • debian install Logcheck + config ( sans spam )
    Posted on Sunday June 18, 2017
    Règler Logcheck pour n'avoir que les rapports UNE fois par jour $ apt-get install logcheck Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Les paquets supplémentaires suivants seront installés : libipc-signal-perl libproc-waitstat-perl logcheck-database mime-construct Paquets suggérés : syslog-summary Les NOUVEAUX paquets suivants seront installés : libipc-signal-perl libproc-waitstat-perl logcheck logcheck-database mime-construct 0 mis à jour, 5 nouvellement installés, 0 à enlever et 0 non mis à jour. Il est nécessaire de prendre 221 ko dans les archives. Après cette opération, 843 ko d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer ? [O/n] Editer le fichier du cron pour n'avoir que les check vers minuit. Au lieu d'ètre spamé à chaque action!! nano /etc/cron.d/logcheck # /etc/cron.d/logcheck: crontab entries for the logcheck package PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root @reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi [b]59 23[/b] * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi # EOF by 🅴🆁🆁🅴🆄🆁32 Hosted on 🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼 Continue Reading »
  • Fix error rsyslog : rsyslogd-2007: action 'action 17' suspended, next retry is.
    Posted on Sunday June 18, 2017
    Fix error rsyslog " rsyslogd-2007: action 'action 17' suspended, next retry is ..." cat /var/log/syslog | egrep rsyslog Jun 18 06:25:14 myoueb rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="19466" x-info="http://www.rsyslog.com"] rsyslogd was HUPed Jun 18 06:25:41 myoueb rsyslogd0: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/0 ] Jun 18 06:25:41 myoueb rsyslogd-2359: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/2359 ] Jun 18 07:39:01 myoueb rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jun 18 07:39:31 2017 [try http://www.rsyslog.com/e/2007 ] # The named pipe /dev/xconsole is for the `xconsole' utility. To use it, # you must invoke `xconsole' with the `-file' option: # # $ xconsole -file /dev/xconsole [...] # # NOTE: adjust the list below, or you'll go crazy if you have a reasonably # busy site.. # daemon.*;mail.*;\ news.err;\ *.=debug;*.=info;\ *.=notice;*.=warn |/dev/xconsole $ sed -i '/# The named pipe \/dev\/xconsole/,$d' /etc/rsyslog.conf Continue Reading »