Outils pour utilisateurs

Outils du site


blog

Notes Squid

/etc/squid/squidGuard.conf

/etc/squid/squid.conf

cache_peer localhost parent 8118 0 default no-query no-digest no-netdb-exchange

never_direct allow all

redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
redirect_children 20

header_access From deny all
header_access Server deny all
#header_access WWW-Authenticate deny all
header_access Link deny all
header_access Cache-Control deny all
header_access Proxy-Connection deny all
header_access X-Cache deny all
header_access X-Cache-Lookup deny all
header_access Via deny all
header_access Forwarded-For deny all
header_access X-Forwarded-For deny all
header_access Pragma deny all
header_access Keep-Alive deny all
header_access Referer deny all

/etc/privoxy/user.action

safe-imgnotadd      = -filter{banners-by-size}

{ safe-imgnotadd }
michelcollon.info
www..michelcollon.info

{ -block-as-image }
rt.com/files/banners/
.almanar.com.lb/

{ +hide-user-agent{Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0} }
#.yahoo.com

Voir :

/etc/squid3/squid.conf

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
#acl Safe_ports port 1025-65535 # unregistered ports
acl CONNECT method CONNECT

#acl allowedips src 10.8.0.0/24

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager

#http_access allow allowedips
http_access allow all

http_access deny manager
http_access allow localhost
http_access deny all
http_port 3128
coredump_dir /var/spool/squid3
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320

cache_dir ufs /var/spool/squid3 512 16 256
cache_mem 256 MB
maximum_object_size 15 MB

positive_dns_ttl 8 hours
negative_ttl 1 minutes

#visible_hostname proxy.local
#httpd_suppress_version_string on
via off
forwarded_for off
follow_x_forwarded_for deny all
request_header_access X-Forwarded-For deny all

dns_nameservers 8.8.8.8 80.67.169.12 80.67.169.40
Squid2 CentOS5

/etc/squid/squid.conf

http_port 3128

acl all src 0.0.0.0/0.0.0.0
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl CONNECT method CONNECT

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
http_access deny all

coredump_dir /var/spool/squid

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320

cache_dir ufs /var/spool/squid 512 16 256
cache_mem 256 MB

maximum_object_size 15 MB
positive_dns_ttl 8 hours
negative_ttl 1 minutes

via off
forwarded_for off
follow_x_forwarded_for deny all

Rapport

2025/03/24 15:06

Notes Sqlite

Voir :

Voir aussi :

  • unqlite
  • PocketBase (Rest API pour SQLite)
  • SQLCipher
sqlite databasename.sqlite .dump | sqlite3 databasename.sqlite3
sqlite3 base.db VACUUM;
There are a few steps to see the tables in an SQLite database:

    List the tables in your database:

    .tables

    List how the table looks:

    .schema tablename

    Print the entire table:

    SELECT * FROM tablename;

    List all of the available SQLite prompt commands:

    .help

Firefox

cd ~/.mozilla/firefox/*.default

Chercher un motif dans toutes les tables et champs

sqlite3 places.sqlite .dump |grep acme\.fr |awk '{print $3}' |sort -u
"moz_hosts"
"moz_favicons"
"moz_places"
Effacer

A faire : jointures

Méthode 1

sqlite3 places.sqlite
SELECT * FROM moz_hosts WHERE host LIKE "%plop.fr%"
DELETE FROM moz_hosts WHERE host LIKE "%plop.fr%"

Méthode 2

cp -p places.sqlite places.sqlite.bck
sqlite3 places.sqlite.bck .dump | grep -v 'plop\.fr' |sqlite3 places.sqlite

GUI

Liste :

  • Extension Firefox “SQLite Manager”
  • sqlitebrowser
2025/03/24 15:06

Notes souris pave numérique

Voir :

cat /proc/bus/input/devices
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="psmouse.proto=bare"
update-grub
modprobe -r psmouse
modprobe psmouse

Voir /sys/module/psmouse/parameters/

Pb

Pb souris : http://ubuntuforums.org/showthread.php?t=2253552

sudo rmmod psmouse
sleep 3
sudo modprobe psmouse 

Diag

La souris est-elle vraiment détectée ?

xinput --list

Voir

lsusb
dmesg
2025/03/24 15:06

Notes Sonar SonarQube LDAP

Voir :

Voir aussi :

  • Checkmarx - KICS
  • MegaLinter

sonar/sonarqube-6.7.1/conf/sonar.properties

sonar.jdbc.username=sonar
sonar.jdbc.password=P@ssw0rd
sonar.jdbc.url=jdbc:postgresql://localhost/sonar
 
# General Configuration
sonar.security.realm=LDAP
ldap.url=ldap://acme.local:389
ldap.bindDn=admin
ldap.bindPassword=P@ssw0rd
 
# User Configuration
ldap.user.baseDn=DC=acme,DC=local
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))
ldap.user.realNameAttribute=cn
ldap.user.emailAttribute=mail
 
# Group Configuration
#ldap.group.baseDn=ou=Groups,dc=sonarsource,dc=com
#ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))

Err

org.sonar.plugins.ldap.LdapException: Unable to retrieve details for user in <default>

NC

LdapUserMapping{baseDn=cn=users,dc=acme,dc=local, request=(&(objectClass=user)(sAMAccountName={0})), realNameAttribute=cn, emailAttribute=mail}
ldapsearch -D admin -W -h acme.local -b "DC=acme,DC=local" "(&(objectClass=user)(sAMAccountName=user))"

Service SystemD

Voir exemple_4_-_systemd_appelant_un_script_sysv_init systemd_service_-_exemples

2025/03/24 15:06

Notes socket Unix

Voir :

netstat -ln | grep mysql
 
ss -x
netstat --unix
 
 
cat /proc/net/unix

Connect to an existing stream socket

nc -U /path/to/socket

Create a listening stream socket

nc -lU /path/to/socket
# lsof -U -a -p $(pidof mysqld)
COMMAND  PID  USER   FD   TYPE             DEVICE SIZE/OFF  NODE NAME
mysqld  1766 mysql   18u  unix 0xffffa0c0b6f97800      0t0 26264 /var/run/mysqld/mysqld.sock type=STREAM
sudo curl -v --unix-socket /var/run/crio/crio.sock http://localhost/info | jq

Unit socket SystemD

2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki