Monthly Shaarli

All links of one month in a single page.

March, 2018

Canarytokens
thumbnail

être alerté gratuitement sur des comportements suspects.

Tweet de MalwareHunterTeam (@malwrhunterteam), à 28 mars à 19:41

Just found this njRAT 0.7d sample: https://t.co/uvr0lwB8sm
Campaign: "Gerador SkyMinigames"
C2: njdoander.duckdns[.]org:1177
Would be nothing interesting... If the source link wasn't this: http://ftp.mcs[.]anl[.]gov/incoming/WindowsDefender.exe
🤔
@Techhelplistcom @bry_campbell https://t.co/GiZUmKGI27

-> se tape la tête sur une table vigoureusement

postgresql - Alternate output format for psql - Stack Overflow
thumbnail

\x on
pour l'équivalent de \G à la fin d'une requète Mysql

rsnapshot - Documentation Ubuntu Francophone

basé sur rsync. c'est pas réellement du backup mais c'est efficace pour ce que ça fait.

Ransomware Decryption Tools – Unlock Your Data for Free
thumbnail

au cas où ...

MySQL “show users”: How to show/list the users in a MySQL database | alvinalexander.com

select host, user, password from mysql.user;

Tweet de Google en France (@GoogleEnFrance), à 15 mars à 17:32
thumbnail

ou sinon tu payes tes impôts...
#merci

Aspartam et édulcorants : les « faux-sucres » des produits allégés qui font grossir - Pourquoi Docteur ?
thumbnail

à vérifier.

Note - Le Hollandais Volant
thumbnail

...
Mes condoléances...
...

MariaDB(MySQL) Master-Master Replication | Marko Sutic's Database Blog
thumbnail

Coudé, il parait qu'elle est bien !

Les huiles essentielles à utiliser en cas d'urgence - Tout le monde devrait les avoir avec lui - Favoris

heu non, en cas d'urgence, on va aux.... Urgences ! Arrêtez avec vos "médecines douces" dans des cas comme ça, vous vous mettez en danger ou pire vous mettez en danger vos proches !
Sinon, pour la bobologie ou les petits tracas tant qu'ils sont rares et pas trop douleurs, j'ai rien à dire, faites ce que vous voulez.

Carbonara aux escargots et lardons | La cuisine de Valérie

ça semble sympa.

Note: - Doo's links

ça fait quoi ?

Tweet de 📷🐧Dave Null🐧📸 (@devnull), à 8 mars à 16:31
thumbnail

à tester
#bashtips #bashrc

function setproxy() {
export {http,https,ftp}_proxy='http://greatfirewall.bullshit.tld:<PORT>'
}

function unsetproxy() {
unset {http,https,ftp}_proxy
}

function httpretcode {
curl -sIL $1 | grep HTTP | tail -n1 | cut -d " " -f 2
}

Tweet de Metrokun (@Metrokun), à 7 mars à 22:37
thumbnail

Les gens qui vont chez le docteur : "Je vais mal, et voici en détail tous mes symptômes."
Les gens qui vont chez le garagiste : "Ma voiture ne marche plus, voici tout ce que j'ai noté"
Les gens qui ont un souci informatique : "CA MARCHE PAS. VOILA MERCI AU REVOIR."
-> tellement vrai

Tweet de x0rz (@x0rz), à 5 mars à 19:06

outch...

hosts - Don't add hostkey to known_hosts for SSH - Super User
thumbnail

Pour empécher à ssh de mettre les clefs dans le know_hosts (parce que sur un réseau en dhcp, c'est ****)
Host
.mydomain.com
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel QUIET

Tarte citron amande d'Estelle - Un Zeste d'Estelle
thumbnail

envie de tester avec une pâte brisée.

Idée recette : une messagerie cryptée aux morilles
thumbnail

belle analyse.

Drupal core - Critical - Multiple Vulnerabilities - SA-CORE-2018-001 | Drupal.org

pour les drupaliens/drupaliennes.

Pause and resume hot_standby replication on Postgres database

Vérif de réplication :
sur le master :
select * from pg_stat_replication;
sur le slave :
SELECT
CASE
WHEN pg_last_xlog_receive_location() = pg_last_xlog_replay_location() THEN 0
ELSE EXTRACT (EPOCH FROM now() - pg_last_xact_replay_timestamp())::INTEGER
END
AS replication_lag;
(0 si tout va bien sinon secondes de délai)

ou

select pid, client_addr, state, sync_state,
pg_xlog_location_diff(sent_location, write_location) as write_lag,
pg_xlog_location_diff(sent_location, flush_location) as flush_lag,
pg_xlog_location_diff(sent_location, replay_location) as replay_lag
from pg_stat_replication ;

To pause, run the following query on the slave server:

select pg_xlog_replay_pause();

To resume, run
select pg_xlog_replay_resume();

à compléter.

"Il est important que la loi interdise de menacer des femmes dans l’espace public", défend Marlène Schiappa
thumbnail

comme il est important que ça soit appris à l'école et que ça s'appelle le respect.

εxodus INDIGO weel

l'application pour louer des vélos à Tours... pas trop clean...

Meteociel.fr - Radar de précipitations pluie et neige - Radar France

tremble parisien !!!

Jeux paralympiques : avec vingt médailles, la France arrive quatrième et fait mieux qu'à Sotchi
thumbnail

yeahhhh !

Tweet de FF Rugby (@FFRugby), à 16 mars à 20:53
thumbnail

chapeau !

Au revoir Stephen Hawking | CommitStrip
thumbnail

ha ! bien !

Debian Stretch Dynamic MOTD

parce que ça claque mieux et que c'est toujours bien de savoir comment va une machine en se connectant.

This feature is very nice as it will give you a quick look at useful information. Unfortunately, Debian Server does not include the dynamic MOTD. First you will need to install some prerequisites and build the directory structure. To do so, run the following commands in terminal. If you would like to add update notification, I have written another article detailing the steps at Debian MOTD Update Notifier.

Shell

install lsb-release

sudo apt-get install lsb-release

install figlet to enable ASCII art

sudo apt-get install figlet

create directory

mkdir /etc/update-motd.d/

change to new directory

cd /etc/update-motd.d/

create dynamic files

touch 00-header ; touch 10-sysinfo; touch 90-footer

make files executable

chmod +x /etc/update-motd.d/*

remove MOTD file

rm /etc/motd

Once the above commands have been run, you can move on to populating the files you created. Below you can copy and paste.
Header (00-header)

!/bin/sh

#

00-header - create the header of the MOTD

Copyright (c) 2013 Nick Charlton

Copyright (c) 2009-2010 Canonical Ltd.

#

Authors: Nick Charlton hello@nickcharlton.net

Dustin Kirkland kirkland@canonical.com

#

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation; either version 2 of the License, or

(at your option) any later version.

#

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

#

You should have received a copy of the GNU General Public License along

with this program; if not, write to the Free Software Foundation, Inc.,

51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

[ -r /etc/lsb-release ] && . /etc/lsb-release

if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then

Fall back to using the very slow lsb_release utility

    DISTRIB_DESCRIPTION=$(lsb_release -s -d)

fi

figlet $(hostname)
printf "\n"

printf "Welcome to %s (%s).\n" "$DISTRIB_DESCRIPTION" "$(uname -r)"
printf "\n"

System Information (10-sysinfo)

!/bin/bash

#

10-sysinfo - generate the system information

Copyright (c) 2013 Nick Charlton

#

Authors: Nick Charlton hello@nickcharlton.net

#

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation; either version 2 of the License, or

(at your option) any later version.

#

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

#

You should have received a copy of the GNU General Public License along

with this program; if not, write to the Free Software Foundation, Inc.,

51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

date=date
load=cat /proc/loadavg | awk '{print $1}'
root_usage=df -h / | awk '/\// {print $(NF-1)}'
memory_usage=free -m | awk '/Mem:/ { total=$2 } /buffers\/cache/ { used=$3 } END { printf("%3.1f%%", used/total*100)}'
swap_usage=free -m | awk '/Swap/ { printf("%3.1f%%", $3/$2*100) }'
users=users | wc -w
time=uptime | grep -ohe 'up .*' | sed 's/,/\ hours/g' | awk '{ printf $2" "$3 }'
processes=ps aux | wc -l
#ip=ifconfig $(route | grep default | awk '{ print $8 }') | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'
#ip=hostname --all-ip-addresses || hostname -I
ip=ip a | grep 'inet ' | awk '{print $2}' | tr '\n' ' '

echo "System information as of: $date"
echo
printf "System Load:\t%s\tIP Address:\t%s\n" $load "$ip"
printf "Memory Usage:\t%s\tSystem Uptime:\t%s\n" $memory_usage "$time"
printf "Usage On /:\t%s\tSwap Usage:\t%s\n" $root_usage $swap_usage
printf "Local Users:\t%s\tProcesses:\t%s\n" $users $processes
echo

Footer (90-footer)

!/bin/sh

#

90-footer - write the admin's footer to the MOTD

Copyright (c) 2013 Nick Charlton

Copyright (c) 2009-2010 Canonical Ltd.

#

Authors: Nick Charlton hello@nickcharlton.net

Dustin Kirkland kirkland@canonical.com

#

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation; either version 2 of the License, or

(at your option) any later version.

#

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

#

You should have received a copy of the GNU General Public License along

with this program; if not, write to the Free Software Foundation, Inc.,

51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

[ -f /etc/motd.tail ] && cat /etc/motd.tail || true

Once these files are populated with the above, you should now be able to logout and then log back in either using putty or on the console and you will be presented with something that looks like below.

2018, curl a vingt ans

j'ai toujours préféré wget, mais faut avouer que ces deux logiciels sont extraordinaires

VPN Leak - VoidSec
thumbnail

beurk...
en gros c'est pas parce que vous avez un VPN que vous êtes protégé, et c'est pas parce que vous avez un bon VPN que vous n'avez plus rien à faire.

Supervision : désactiver le contrôle de la certification des disques par Dell | memo-linux.com

Désactiver la vérification des disques certifiés par Dell sur le serveur à supervisier

Pour désactiver la certification des disques par Dell, il suffit de changer la valeur yes par no de la variable NonDellCertifiedFlag dans le fichier stsvc.in, puis relancer le service dataeng.
Ces opération sont à faire sur le serveur à superviser.
Changer la valeur yes par no dans le fichier stsvc.ini :
sed -i '/^NonDellCertifiedFlag=/s/yes/no/' /opt/dell/srvadmin/etc/srvadmin-storage/stsvc.ini

Redémarrer le service dataeng :
    systemctl restart dataeng
    ou :
    service dataeng restart

via le fameux Liandri : https://shaar.libox.fr/?th7JHQ !

Gâteau chocolat framboises de Martha - Un Zeste d'Estelle
thumbnail

parce que.

backup - How can I mysqldump all databases except the mysql schema? - Database Administrators Stack Exchange
thumbnail

MYSQL_USER=root
MYSQL_PASS=rootpassword
MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}"
#

Collect all database names except for

mysql, information_schema, and performance_schema

#
SQL="SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN"
SQL="${SQL} ('mysql','information_schema','performance_schema')"

DBLISTFILE=/tmp/DatabasesToDump.txt
mysql ${MYSQL_CONN} -ANe"${SQL}" > ${DBLISTFILE}

DBLIST=""
for DB in cat ${DBLISTFILE} ; do DBLIST="${DBLIST} ${DB}" ; done

MYSQLDUMP_OPTIONS="--routines --triggers --single-transaction"
mysqldump ${MYSQL_CONN} ${MYSQLDUMP_OPTIONS} --databases ${DBLIST} > all-dbs.sql

Raspberry Pi : Une version B+ du Pi 3 pour plus de puissance et une meilleure connectivité - Liens en bazar

hey non, toujours pas du gigabit sur l'Ethernet...

Note: vérification de base après un mysql dump

H1 : mysqldump --all-databases --add-drop-database --skip-comments >/tmp/dumph1.sql
H1 : cat /tmp/dumph1.sql | mysql -h H2 -uroot -p
H1 : cat /tmp/dumph1.sql | md5sum
H2 : mysqldump --all-databases --add-drop-database --skip-comments | md5sum

EDIT : attention aux bases "système"

Le célèbre astrophysicien britannique Stephen Hawking est mort à l'âge de 76 ans
thumbnail

hoooo merde !

Dalibo - Formations PostgreSQL
Persistent Undo in Vim - Jovica Ilic
thumbnail

à tester. comment certains peuvent encore prétendre être efficace sur nano...
EDIT:
echo "set undodir=~/.vimundo" >>/etc/vim/vimrc
echo "set undofile" >>/etc/vim/vimrc

et bim !

Tibor Karaszi : Be careful with constraints calling UDFs

USE tempdb
GO
IF OBJECT_ID('t') IS NOT NULL DROP TABLE t
IF OBJECT_ID('t_uq') IS NOT NULL DROP FUNCTION t_uq
GO

CREATE TABLE t(c0 INT, c1 NVARCHAR(50), c2 bit)
GO

CREATE FUNCTION t_uq(@c1 NVARCHAR(50))
RETURNS bit
AS
BEGIN
DECLARE @ret bit
IF (SELECT COUNT(*) FROM t WHERE c1 = @c1 AND c2 = 1) > 1
SET @ret = 0
ELSE
SET @ret = 1
RETURN @ret
END
GO

ALTER TABLE t ADD CONSTRAINT t_c CHECK(dbo.t_uq(c1) = 1)

INSERT INTO t(c0, c1, c2) VALUES(1, 'a', 0) --OK
INSERT INTO t(c0, c1, c2) VALUES(2, 'a', 0) --OK
INSERT INTO t(c0, c1, c2) VALUES(3, 'b', 1) --OK
INSERT INTO t(c0, c1, c2) VALUES(4, 'b', 1) --Fails

--So far so good, but watch now:

UPDATE t SET c2 = 1 WHERE c0 = 2
--No error, the constraint doesn't do its job!

--We have invalid data:
SELECT * FROM t

En Islande, la parité salariale est désormais obligatoire
thumbnail

parfait.

Oscars 2018 : "La Forme de l'eau" sacré meilleur film. Découvrez le palmarès complet de la cérémonie
thumbnail

j'avoue c'est pas mal comme film. C'est un chaînon avec Hellboy mais j'ai trouvé le film plus fin, mieux travaillé.

Using systemd-networkd with bonding on Rackspace's OnMetal servers - major.io

lacp bonding et systemd

CentOS 7 Base.repo - DISI

Ou cas où :

CentOS-Base.repo

#

The mirror system uses the connecting IP address of the client and the

update status of each mirror to pick mirrors that are updated to and

geographically close to the client. You should use this for CentOS updates

unless you are manually picking other mirrors.

#

If the mirrorlist= does not work for you, as a fall back you can try the

remarked out baseurl= line instead.

#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates

[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7