3 liens privés
PID=12345
for ((a=1; a <= 60; a++)); do jstack $PID > thread-dump.$PID.$a; sleep 5; echo $PID.$a; done
Pour synchroniser un répertoire et son distant sans le git :
rsync -avirzh --exclude '.git' . <destserver>:~/path/to/dest
rsync -avirzh -e 'ssh -p 2222' . root@IP.IP.IP.IP:~/path/to/dest
With partial, progressive a restart on error :
rsync -Pavirzh -e 'ssh -p 2222' . root@IP.IP.IP.IP:~/path/to/dest
Short explanation :
-P : retry a long transfer that may be interrupted.
-a, --archive : a quick way of saying you want recursion and want to preserve almost everything (also include -r)
-v, --verbose
-i, --itemize-changes : show changes
o A < means that a file is being transferred to the remote host (sent).
o A > means that a file is being transferred to the local host (receive).
o A c means that a local change/creation is occurring for the item
o A h means that the item is a hard link to another item (requires --hard-links).
o A . means that the item is not being updated
o A * means that the rest of the itemized-output area contains a message (e.g. "deleting").
o A s means the size of a regular file is different and will be updated by the file transfer.
o A t means the modification time is different and is being updated to the sender’s value
(requires --times).
o A p means the permissions are different and are being updated to the sender’s value
(requires --perms).
o An o means the owner is different and is being updated to the sender’s value (requires
--owner and super-user privileges).
o A g means the group is different and is being updated to the sender’s value (requires
--group and the authority to set the group).
o The u slot is reserved for future use.
o The a means that the ACL information changed.
o The x means that the extended attribute information changed.
-r, --recursive
-z, --compress
-h, --human-readable
Outils de decryptage des ransomware
Serve all requests via proxy except a specific one
ProxyPass /lib !
ProxyPass / http://127.0.0.1:5012/
ProxyPassReverse / http://127.0.0.1:5012/
Delete the key :
The ultimate fix is to rename or delete HKLM\software\microsoft\AppModel
Pense bête figure de style
L'allégorie
L'anacoluthe
L'anaphore
L'antiphrase
L'antithèse
Le chiasme
La comparaison
L'ellipse
L'euphémisme
La gradation
L'hyperbole
La litote
La metaphore
La métonymie
L'oxymore
La périphrase
La synecdoque
Le zeugma
Un petit helper pour gérer le positionnement flexbox
Parce qu'à chaque fois je recherche :
A la place de CCleaner :
BleachBit : https://www.bleachbit.org/
A la place de Recuva :
TestDisk : https://www.cgsecurity.org/wiki/TestDisk
PhotoRec : https://www.cgsecurity.org/wiki/PhotoRec
A la place de SIW :
WinAudit : http://www.parmavex.co.uk/winaudit.html
Construction des configurations SSL
Dans mon cas (partage temporaire windows / linux) :
setsebool -P samba_export_all_rw=1
Calculateur de Masque IPv4
Tout est dans le titre.
Mapping IANA / OpenSSL :
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 / ECDH-RSA-AES128-SHA256
Tel qu'utilisé sur https://www.ssllabs.com/ssltest
Supprimer une ip virtuelle (ou pas !)
sudo ip addr del 10.0.100.1/28 dev ens160
Parce que certains client VPN supporte le proxy seulement sous Windows.... (coucou NetExtender !)
proxychains netExtender bla bla
C'est beau Linux.
Parce que j'oublie tout le temps :
dig shaarli.hoab.fr @8.8.8.8
Et pour suivre la propagation DNS, exemple : https://www.whatsmydns.net/#A/mangrove.finalpledge.fr
Test if user is not able to open a shell or login
Petite commande pour savoir si un user a accès à un répertoire.
sudo -u www-data ls /home/user
Une bonne information sur le lastlog, c'est un sparse file : la taille affichée n'est pas la taillé réellement consommé.
Seuls les blocs réellement utilisé sont consommés.
du -h /var/log/lastlog
du -h --apparent-size /var/log/lastlog
ls -lsh /var/log/lastlog
Quand la machine est connecté à un AD avec plusieurs milliers d'entrées....
Pense bête routing :
route -n
route add -net 10.0.101.0 netmask 255.255.255.0 gw 12.34.56.1
route add -net 10.0.100.0 netmask 255.255.255.0 gw 12.34.56.1
route delete -net default gw 12.34.56.1
route del -net 192.168.100.0 gw 12.34.56.1 netmask 0.0.0.0 dev eth0
route add -host 98.76.54.32 gw 12.34.56.1
IP route
ip route show
ip route del default via 12.34.56.1 dev ppp0 scope link
ip route add 10.0.0.0/1 via 12.34.56.1 dev ppp0 scope link
ip route add 10/1 via 12.34.56.1 dev ppp0 scope link
ip route add 10.0.0.0/16 via 12.34.56.1 dev ppp0 scope link
Voir si il y a des données en transfert
cat /sys/block/<dev>/stat
watch grep ^Dirty /proc/meminfo
Roadmap to become a developer in 2019
C'est assez complet.