Afficher/masquer le menu
Liens Ecyseo
  • Tags cloud
  • Daily
  • Pictures wall
  • Search
  • Display options
    • Links per page :
    • 20 links
    • 50 links
    • 100 links
  • RSS Feed
  • Login

J'ai besoin d'intimité. Non pas parce que mes actions sont douteuses, mais parce que votre jugement et vos intentions le sont.

5169 links 

page 3 / 11

Liste des liens

218 results tagged php x
PHP - Connexion à un annuaire LDAP - Comment Ça Marche
2020-02-13 18:14 - permalink -

PHP permet la connexion et l'envoi de requêtes sur un annuaire LDAP, c'est-à-dire un serveur permettant de stocker des informations de manière hiérarchique. Un serveur LDAP est conçu pour être capable de gérer les opérations suivantes : établir la...

LDAP php
- https://www.commentcamarche.net/contents/798-php-connexion-a-un-annuaire-ldap
GitHub - kornrunner/php-blurhash: Pure PHP implementation of Blurhash (https://github.com/woltapp/blurhash)
2020-01-6 10:41 - permalink -
image librairie optimisation php
- https://github.com/kornrunner/php-blurhash
Développeur PHP - OpenLDAP - Fusiondirectory est une solution de gestion des identités
2020-01-3 16:26 - permalink -
emploi php
- https://www.fusiondirectory.org/job/developpeur-php-openldap/
Welcome to FusionDirectory User Manual’s documentation! — FusionDirectory User Manual 1.3 documentation
2020-01-3 16:23 - permalink -
LDAP Libre php webdev
- https://fusiondirectory-user-manual.readthedocs.io/en/1.3/index.html
Tutoriel Vidéo Les nouveautés de PHP 7.4
2019-12-27 11:29 - permalink -
php
- https://www.grafikart.fr/tutoriels/nouveaute-php-74-1220
delight.im · GitHub
2019-12-26 15:58 - permalink -

Un dépôt qu'il est bien d'aller faire un tour dedans...

bibliothèque librairie php sécurité webdev
- https://github.com/delight-im
PHP: mysqli::set_charset - Manual
2019-12-18 16:35 - permalink -

Définit le jeu de caractères par défaut à utiliser lors de l'envoi de données depuis et vers le serveur de base de données.

Pour ne pas avoir de surprise lors de l'enregistrement en base de données avec des accents.

MySQL php
- https://www.php.net/manual/fr/mysqli.set-charset.php
Creating a traceroute program in PHP
2019-11-13 11:40 - permalink -

http://www.adayinthelifeof.nl/2010/07/30/creating-a-traceroute-program-in-php/


define ("SOL_IP", 0);
define ("IP_TTL", 2);    // On OSX, use '4' instead of '2'.

$dest_url = "www.google.com";   // Fill in your own URL here, or use $argv[1] to fetch from commandline.
$maximum_hops = 30;
$port = 33434;  // Standard port that traceroute programs use. Could be anything actually.

// Get IP from URL
$dest_addr = gethostbyname ($dest_url);
print "Tracerouting to destination: $dest_addr\n";

$ttl = 1;
while ($ttl < $maximum_hops) {
    // Create ICMP and UDP sockets
    $recv_socket = socket_create (AF_INET, SOCK_RAW, getprotobyname ('icmp'));
    $send_socket = socket_create (AF_INET, SOCK_DGRAM, getprotobyname ('udp'));

    // Set TTL to current lifetime
    socket_set_option ($send_socket, SOL_IP, IP_TTL, $ttl);

    // Bind receiving ICMP socket to default IP (no port needed since it's ICMP)
    socket_bind ($recv_socket, 0, 0);

    // Save the current time for roundtrip calculation
    $t1 = microtime (true);

    // Send a zero sized UDP packet towards the destination
    socket_sendto ($send_socket, "", 0, 0, $dest_addr, $port);

    // Wait for an event to occur on the socket or timeout after 5 seconds. This will take care of the
    // hanging when no data is received (packet is dropped silently for example)
    $r = array ($recv_socket);
    $w = $e = array ();
    socket_select ($r, $w, $e, 5, 0);

    // Nothing to read, which means a timeout has occurred.
    if (count ($r)) {
        // Receive data from socket (and fetch destination address from where this data was found)
        socket_recvfrom ($recv_socket, $buf, 512, 0, $recv_addr, $recv_port);

        // Calculate the roundtrip time
        $roundtrip_time = (microtime(true) - $t1) * 1000;

        // No decent address found, display a * instead
        if (empty ($recv_addr)) {
            $recv_addr = "*";
            $recv_name = "*";
        } else {
            // Otherwise, fetch the hostname for the address found
            $recv_name = gethostbyaddr ($recv_addr);
        }

        // Print statistics
        printf ("%3d   %-15s  %.3f ms  %s\n", $ttl, $recv_addr,  $roundtrip_time, $recv_name);
    } else {
        // A timeout has occurred, display a timeout
        printf ("%3d   (timeout)\n", $ttl);
    }

    // Close sockets
    socket_close ($recv_socket);
    socket_close ($send_socket);

    // Increase TTL so we can fetch the next hop
    $ttl++;

    // When we have hit our destination, stop the traceroute
    if ($recv_addr == $dest_addr) break;
}

You need to be root. This means it probably is not going to work when running it from a web-server, you have to run it from the command line:

jthijssen@tarabas:~/traceroute$ sudo php traceroute.php
Tracerouting to destination: 199.6.1.164
  1   192.168.1.1      0.004 ms  192.168.1.1
  2   *                0.005 ms  static.kpn.net
  3   (timeout)
  4   139.156.113.141  0.005 ms  nl-asd-dc2-ias-csg01-ge-3-2-0-kpn.net
  5   195.190.227.221  0.005 ms  asd2-rou-1022.nl.euroringen.net
  6   134.222.229.105  0.005 ms  asd2-rou-1001.NL.eurorings.net
  7   134.222.97.186   0.007 ms  kpn-1402.xe-0-0-0.jun1.galilei.network.bit.nl
  8   213.154.236.75   0.012 ms  213.154.236.75
  9   199.6.1.164      0.012 ms  pub3.kernel.org

This is a traceroute to www.kernel.org. I’ve removed the second hop (because that’s the IP at my place). The 3rd hop returned a timeout. Probably the station there did not return a ICMP packet back to use.

The above code can be found on github: https://github.com/jaytaph/traceroute

ip outils php
- https://stackoverflow.com/questions/12463819/php-script-to-traceroute
Vulnérabilité dans PHP – CERT-FR
2019-10-29 17:30 - permalink -

Si vous utilisez nginx, il faut mettre à jour php !!!

Bug NGINX php
- https://www.cert.ssi.gouv.fr/alerte/CERTFR-2019-ALE-014/
How to Create a Simple PHP Templating Function - Daggerhart
2019-10-9 16:56 - permalink -

A lire plus tard

php tutoriels
- https://www.daggerhart.com/create-simple-php-templating-function/
PHP: intl - Manual
2019-09-30 15:51 - permalink -

Fonctions d'internationalisation en PHP mais aussi en C, C++ et JAVA (même API).

L'extension d'Internationalization (qui est aussi appelée Intl) est une interface pour la bibliothèque » ICU, qui permet aux développeurs PHP d'effectuer des opérations compatibles avec les paramètres régionaux incluant, mais non limité à cette liste, le formatage, la translitération, la conversion d'encodage, les opérations de calendrier, la collation » UCA-conforme, la localisation des limites du texte et l'utilisation des identificateurs de paramètres régionaux, des fuseaux horaires et des graphèmes.

Cette extension tend à suivre de près l'API ICU, ce qui fait que ceux qui ont l'expérience de cette bibliothèque en C, C++ ou Java pourront facilement s'y retrouver dans l'API PHP. De plus, la documentation ICU peut être très utile pour comprendre les fonctions ICU.

internationalisation php
- https://www.php.net/manual/fr/book.intl.php
Typed properties in PHP 7.4 - stitcher.io
2019-09-23 12:42 - permalink -

Le typage en php 7.4

php tutoriels
- https://stitcher.io/blog/typed-properties-in-php-74
GitHub - phpstan/phpstan: PHP Static Analysis Tool - discover bugs in your code without running it!
2019-09-23 12:33 - permalink -

PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code can be checked before you run the actual line.

debug developpement php
- https://github.com/phpstan/phpstan
Xdebug: Documentation
2019-09-20 15:0 - permalink -

Profiler du code php

php
- https://xdebug.org/docs/profiler
[Libox Wiki] system:linux:debian:5.1-apache
2019-08-26 11:52 - permalink -

Troll avec redirection

Dans un .htaccess , on va rediriger l'url de la page de login Wordpress (qui n'est pas présent) vers un script de zipbomb (voir : https://blog.haschek.at/post/f2fda) :

RedirectPermanent "/wp-login.php" "/zipbomb.php"

Mais c'est très bon ça !
:-D

Apache bombe php redirection
- https://wiki.libox.fr/system/linux/debian/5.1-apache
[Snippet #05 - PHP] téléchargement de fichiers par lots - Yosko.net
2019-08-26 11:40 - permalink -
fichiers php script téléchargement
- https://www.yosko.net/article32/snippet-05-php-telechargement-de-fichiers-par-lots
Executing a callback for all files in a directory
2019-08-20 13:10 - permalink -

Brillant !

/**
 * Allows running a callback on all files in a deep directory structure
 *
 * @author Aidan Lister <aidan@php.net>
 * @param string $dirname The directory to walk
 * @param callable $callable The callable to execute on all files found
 * @param mixed $arg{n} Extra parameters to be passed to the callable
 * @return mixed The return value of the last callable run
 */
function directory_walk($dirname, $callable)
{
    $ignore = array('.', '..', '.DS_Store');
    $args = func_get_args();
    array_shift($args);

    // Sanity check    
    if (!file_exists($dirname)) {
        return false;
    }

    // Create and iterate stack
    $stack = array($dirname);
    while ($entry = array_pop($stack)) {
        if (is_link($entry)) continue;

        // Run the action
        if (is_file($entry)) {
          $ret = call_user_func_array($callable, array($entry) + $args);
          continue;
        }

        // Add the directory into the stack
        $dh = opendir($entry);
        while (false !== $child = readdir($dh)) {
            if (in_array($child, $ignore)) continue;
            $child = $entry . DIRECTORY_SEPARATOR . $child;
            $stack[] = $child;
        }
        closedir($dh);
    }

    return $ret;
}

So, for some examples. We’ll start simple and simply print the directory:

$func = create_function('$file', 'echo "found $file";');
directory_walk('target-dir', $func);

Which for me outputs: found target-dir/foo found target-dir/bar found target-dir/baz found target-dir/baz/ding found target-dir/baz/dong found target-dir/baz/dong/witch

What if we wanted to add a .txt extension to all of these files? We could write:

function my_rename($entry, $extension) {
if (is_file($entry)) {
rename($entry, $entry . $extension);
}
}
directory_walk('target-dir', 'my_rename', '.txt');

Another example might be deleting all the .svn or CVS folders in a directory. We could write:

function delsvn($file) {
$ext = substr($file, strlen($file)-4,strlen($file));
if ($ext === '.svn') rmdirr($ext);
}
directory_walk('test', 'delsvn');

Note that the above example used the recursive delete function also.

Happy stacking.

dossier php
- http://www.aidanlister.com/2009/06/executing-a-callback-for-all-files-in-a-directory/
Fichiers · master · jerry wham / PasswordTools · GitLab
2019-07-25 0:34 - permalink -

Une classe de mon cru pour gérer les mots de passe.

php sécurité
- https://framagit.org/jerrywham/passwordtools/tree/master
Tiny File Manager | Help Documentation
2019-07-17 10:40 - permalink -

Attention avec cette application : voir https://bookmarks.ecyseo.net/?1Sd-1g

php sécurité vie-privée
- https://tinyfilemanager.github.io/docs/
GitHub - nahidacm/tinyfilemanager: Web based File Manager in single PHP file, Manage your files efficiently and easily with Tiny File Manager
2019-07-15 11:42 - permalink -

Attention de ne pas l'utiliser tel quel.
Il logue par défaut l'utilisation de l'application

  • https://github.com/prasathmani/tinyfilemanager/issues/164
  • https://github.com/nahidacm/tinyfilemanager/blob/master/authentication.php ligne 74

et sa gestion des mots de passe n'est pas claire. Il faut générer un hash du mot de passe en php (ok) mais il propose de le faire via une seconde application dédiée hébergée ailleurs : pourquoi ne pas l'avoir directement utilisée dans ce projet là ? Que deviennent les mots de passe qui ont été saisis via cette deuxième appli ?
Et je ne parle pas de l'utilisation des variables globales...

Clairement, ça pue.

php sécurité vie-privée
- https://github.com/nahidacm/tinyfilemanager
page 3 / 11


Tags


  • shaarli
  • wikipedia

Tags cloud

Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation
Affiches "loi aviva" créées par Geoffrey Dorne le 13 Mai, 2020 - Mastodon 1 - Mastodon 2