• [CSS] The Black Hexagon
    Posted on Thursday May 12, 2022
    body { font-family: 'Share Tech', sans-serif; font-size: 68px; color: white; display: flex; jsutify-content: center; align-items: center; margin: 0; width: 100vw; height: 100vh; text-shadow: 8px 8px 10px #0000008c; background-color: #343a40; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%239C92AC' fill-opacity='0.25' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"), linear-gradient(to right top, #343a40, #2b2c31, #211f22, #151314, #000000); } h1 { margin: 20px; } // https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2022/05/1-The-black-hexagon-background-pattern.jpg?q=50&fit=crop&w=1500&dpr=1.5 Continue Reading »
  • php:index - créée
    Posted on Monday April 11, 2022
    phppingCréer une page... Continue Reading »
  • js:index - créée
    Posted on Monday April 11, 2022
    jstipsCréer une page... Continue Reading »
  • GRAV CMS - CSS Dark
    Posted on Thursday March 17, 2022
    .CodeMirror-cursor { background: #fff!important; } .code-mirrored { width: 1px; background: rgba(255, 255, 255, 0.6) !important; } .breadcrumb-node:hover span { text-decoration: none; color: #242526; } .breadcrumb-node span { text-decoration: none; color: #242526; } Continue Reading »
  • SQL progress import
    Posted on Monday December 20, 2021
    Import SQL avec barre de progression Vous avez un dump sql de 15 Go à remonter sur votre base de données, vous le lancez et pendant de longues minutes vous contemplez quelque chose comme ceci : $ zcat data-export.gz | mysql -u measuser -p -h db_host -P 3306 mydatabase Enter password: Est-ce que cela fonctionne ? Combien de temps avant la fin ? Est-ce que le terminal à freeze ? Pipe View pv est un outil qui permet d’avoir en temps réel l’état d’avancement d’une tache ou d’un flux de données (https://man7.org/linux/man-pages/man1/pv.1.html). Pour l’installer : sudo apt install pv Utilisation La commande devient alors : $ zcat data-export.gz | pv --progress --size $(zcat data-export.gz | wc -c) --name ' Importing.. ' \ | mysql -u measuser -p -h db_host -P 3306 mydatabase Enter password: Importing.. [=========> ] 15% Et voilà ! Une barre de progression qui ... Continue Reading »
  • RSS-bridge ( filtre perso )
    Posted on Monday December 13, 2021
    #cat whitelist.txt AllocineFRBridge AmazonBridge AmazonPriceTrackerBridge Arte7 Bandcamp BlaguesDeMerde CNETBridge DailymotionBridge DansTonChat DuckDuckGo DuckDuckGoBridge Facebook Flickr FlickrExploreBridge FuturaSciencesBridge GOG GogsBridge GoogleSearch HDWallpapersBridge Identica IdenticaBridge Instagram InstagramBridge LeBonCoinBridge LesJoiesDuCode MozillaSecurity OpenClassrooms Pinterest PinterestBridge Scmb Soundcloud Steam Telegram TheCodingLoveBridge ThePirateBayBridge TheTVDBBridge TwitchBridge Twitter TwitterBridge WikiLeaksBridge Wikipedia WikipediaBridge WikipediaENBridge WikipediaEOBridge WikipediaFRBridge YGGTorrentBridge Youtube ZatazBridge ZoneTelechargementBridge Continue Reading »
  • [SHELL] FAIL2BAN TIPS
    Posted on Saturday December 11, 2021
    Check ALL ban with fail2ban: # fail2ban-client -V 0.11.2 # (we removed some character for more visibility) fail2ban-client banned | tr " " "\n" | sed "s/',\|'\|{\|\[\|]}\|]\|,//g" # Or fail2ban-client banned | tr "]}" "\n" | sed "s/',\|'\|{\|\[\|]}\|]\|,//g" Continue Reading »
  • DNS 2021
    Posted on Sunday November 28, 2021
    # DNS - NextDNS: Bloquer les publicités et les traqueurs Serveurs DNS IPV4 45.90.28.91 45.90.30.91 Serveurs DNS IPV6 2a07:a8c0::cf:3a39 2a07:a8c1::cf:3a39 DNS-over-TLS cf3a39.dns.nextdns.io DNS-over-HTTPS https://dns.nextdns.io/cf3a39 -------------------------------- - DNSFILTER Le réseau mondial anycast s'étend sur 48 centres de données, garantissant une faible latence et une disponibilité de 100 %. Les adresses des serveurs DNS de DNSFilter (avec DNSSEC) : 103.247.36.9 103.247.37.9 ------------------------------- Quelles adresses DNS ? 💻 Google propose deux adresses : 8.8.8.8 et 8.8.4.4. Une option efficace mais qui offre vos données sur un plateau à la firme de Mountain View. Les serveurs DNS de Cloudflare sont par exemple bien plus protecteurs des données : 1.1.1.1 et 1.0.0.1. On peut aussi vous conseiller la solution OpenDNS (208.67.222.222 et 208.67.220.220) qui, on vous prévient, appartient à Cisco. Et enfin, les serveurs associatifs et réputés sécurisés FDN (80.67.169.12 et 80.67.169.40), en sachant qu'il en existe beaucoup d'autres. Continue Reading »
  • REGEX
    Posted on Saturday November 13, 2021
    Pour utiliser ces expression régulières, il vous faudra utiliser en JavaScript les fonctions match et replace et en PHP les fonctions preg_match et preg_replace soit par exemple : // PHP function checkMail($email) { return preg_match("/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/", $email); } // Javascript function checkMail(email) { return email . match(/^[_a - z0 - 9 -] + (.[_a - z0 - 9 -] +)*@[a - z0 - 9 -] + (.[a - z0 - 9 -] +)*(.[a - z]{ 2,3})$/); } Voici quelques unes des expressions régulières que je me garde toujours sous le coude en cas de besoin : // tester un email ^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$ // tester une url ^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$ // tester une adresse ip ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ // récupérer le contenu entre deux balises strong (à adapter, en php utilisez preg_match_all ) ^(.*)$ // tester un code postale ^((0[1-9])|([1-8][0-9])|(9[0-8])|(2A)|(2B))[0-9]{3}$ // tester sur le texte fait bien entre 4 et 128 caractères ^(.){4,128}$ // tester un numéro de téléphone américain (333-333-3333) ^[0-9]{3,3}[-]{1,1}[0-9]{3,3}[-]{1,1}[0-9]{4,4}$ // tester un numéro de téléphone anglais (01614840484) ^[0-9]{11,11}$ // tester un code postale anglais (55416) ^[0-9]{5,5}$ // tester un code postale américain (AL42PT) ^[A-Z]{1,2}([0-9]{1,2}|[0-9]{1,1}[A-Z]{1,1})( |)[0-9]{1,1}[A-Z]{2,2}$ // tester une adresse IP V6 ^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$ ######################################## # Variant ^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\-]*[a-fA-F0-9])\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|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){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$ # ipv4 et ipv6 ? regex='(?>(?>([a-f\d]{1,4})(?>:(?1)){3}|(?!(?:.*[a-f\d](?>:|$)){})((?1)(?>:(?1)){0,6})?::(?2)?)|(?>(?>(?1)(?>:(?1)){5}:|(?!(?:.*[a-f\d]:){6,})(?3)?::(?>((?1)(?>:(?1)){0,4}):)?)?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)(?>\.(?4)){3}))\/\d{1,2}' # JSON (?(DEFINE) # Note that everything is atomic, JSON does not need backtracking if it's valid # and this prevents catastrophic backtracking (?<json>(?>\s*(?&object)\s*|\s*(?&array)\s*)) (?<object>(?>\{\s*(?>(?&pair)(?>\s*,\s*(?&pair))*)?\s*\})) (?<pair>(?>(?&STRING)\s*:\s*(?&value))) (?<array>(?>\[\s*(?>(?&value)(?>\s*,\s*(?&value))*)?\s*\])) (?<value>(?>true|false|null|(?&STRING)|(?&NUMBER)|(?&object)|(?&array))) (?<STRING>(?>"(?>\\(?>["\\\/bfnrt]|u[a-fA-F0-9]{4})|[^"\\\0-\x1F\x7F]+)*")) (?<NUMBER>(?>-?(?>0|[1-9][0-9]*)(?>\.[0-9]+)?(?>[eE][+-]?[0-9]+)?)) ) \A(?&json)\z Continue Reading »
  • php:ping
    Posted on Thursday March 17, 2022
    I just needed to see if a remote web server was alive, so it didn't really matter to me whether I used ping or a curl command like this. Here's a modified version of the original source code: You can find the original source code at this “Lost in Code Continue Reading »
  • js:tips
    Posted on Thursday March 17, 2022
    TIPS How to make JavaScript execute after page load? These solutions will work: As mentioned in comments use defer: or or or even Note that the last option is a better way to go since it is unobstrusive and is considered more standard. ---------- Continue Reading »
  • network:knowledge
    Posted on Friday March 11, 2022
    Quelques définitions sur le réseau Ping (Packet INternet Groper) Le Ping permet de donner à l'administrateur réseau des informations très intéressantes quant à la qualité de la connexion Internet. RTT ou RTD (Round-Trip Time ou Round-Trip Delay) Continue Reading »
  • secu:portsentry
    Posted on Wednesday February 23, 2022
    Portsentry (scan de ports) Article reference: Cet utilitaire permet de bloquer en temps réel la plupart des scans de port connus (même très discrets et échappant aux règles de filtrage du firewall basiques). Installation $ apt-get install portsentry Continue Reading »
  • secu:lire
    Posted on Wednesday February 23, 2022
    Lire lr_log2report -- help dlf-converters Quoi de plus désagréable et rébarbatif que l’analyse de ses fichiers de “ logs ” réseau. Oui, vous savez ces innombrables fichiers qui vous informent de l’état de votre machine, des attaques qu'elle subit et des problèmes qu'elle rencontre. Continue Reading »
  • scripts:quoting - [See also]
    Posted on Wednesday February 23, 2022
    Quotes and escaping Quoting and escaping are important, as they influence the way Bash acts upon your input. There are three recognized types: * per-character escaping using a backslash: \$stuff * weak quoting with double-quotes: “stuff” Continue Reading »
  • scripts:positional-parameters - [Production examples]
    Posted on Wednesday February 23, 2022
    Handling positional parameters Intro The day will come when you want to give arguments to your scripts. These arguments are known as positional parameters. Some relevant special parameters are described below: Parameter(s)Description$0the first positional parameter, equivalent to Continue Reading »
  • scripts:redirection - [See also]
    Posted on Wednesday February 23, 2022
    Redirection Fix me: To be continued Redirection makes it possible to control where the output of a command goes to, and where the input of a command comes from. It's a mighty tool that, together with pipelines, makes the shell powerful. The redirection operators are checked whenever a Continue Reading »
  • nimp:scripts
    Posted on Wednesday February 23, 2022
    La tete a l'envers Oui cela ne sert à rien :-) donc indispensable! Putty An open source telnet and SSH Client for the Windows and Unix. from PuTTY Colour Schemes Default Foreground: 255/255/255 Default Background: 51/51/51 ANSI Black: 77/77/77 ANSI Green: 152/251/152 ANSI Yellow: 240/230/140 ANSI Blue: 205/133/63 ANSI Blue Bold 135/206/235 ANSI Magenta: 255/222/173 or 205/92/92 ANSI Cyan: 255/160/160 ANSI Cyan Bold: 255/215/0 ANSI White: 245/222/179 Continue Reading »
  • terminal:putty - créée
    Posted on Wednesday February 23, 2022
    Putty An open source telnet and SSH Client for the Windows and Unix. from PuTTY Colour Schemes Default Foreground: 255/255/255 Default Background: 51/51/51 ANSI Black: 77/77/77 ANSI Green: 152/251/152 ANSI Yellow: 240/230/140 ANSI Blue: 205/133/63 ANSI Blue Bold 135/206/235 ANSI Magenta: 255/222/173 or 205/92/92 ANSI Cyan: 255/160/160 ANSI Cyan Bold: 255/215/0 ANSI White: 245/222/179 Continue Reading »
  • feed:php
    Posted on Wednesday February 23, 2022
    Création RSS par PHP rss script Continue Reading »