• [^] # Re: Faire remonter les sondages !

    Posté par (site web personnel) . En réponse au journal Faire remonter les sondages !. Évalué à 1.

    Bof, si on voulait vraiment tricher...

    #!/usr/bin/perl --

    use Socket;

    $host = 'www.phpfrance.com';

    $crlf = "015円012円";
    $http = "POST /sondage/phpPollCollector.php3 HTTP/1.0$crlf".
    "Host: $host$crlf".
    "User-Agent: Mozilla GNU/Linux$crlf".
    "Connection: close$crlf".
    "Content-Type: application/x-www-form-urlencoded$crlf".
    "Content-Length: 76$crlf$crlf".
    "poll_id=4&poll_forwarder=somewhere&poll_voteNr=3";

    $tcp = getprotobyname('tcp') or die "getprotobyname\n";
    $hosti = inet_aton($host) or die "inet_aton\n";
    $hosts = sockaddr_in(80, $hosti);

    socket(SOK, PF_INET, SOCK_STREAM, $tcp) or die "socket\n";
    connect(SOK, $hosts) or die "connect\n";

    select SOK; $| = 1; select STDOUT;

    print SOK $http;

    $junk = '';
    while () { $junk .= $_; }

    close SOK or die "close\n";


    Mais sépabien, cémemtrémal (tm)(c) !!!! ;-)

    OK, je ---->[ ]