Comment ça marche, le lien encodé ?
Si le navigateur peut le lire, le robot ne peut-il pas aussi ?
PDC
-----Message d'origine-----
De : Philippe [mailto:spip@le-naour.com]
Envoyé : jeudi 26 septembre 2002 02:14
À : spip@rezo.net
Objet : [Spip] Filtre anti-spam
Voici le code d'un filtre anti-robot spameur, il prend en entrée l'adresse
mail comme retournée par #EMAIL et renvoie un lien cliquable encodé en
hexadécimal.
function antispam($adresse) {
$text = '<a href="mailto:';
for ($i=0; $i< strlen($adresse); $i++) {
$text .= '%'.bin2hex($adresse[$i]);
}
$text .= '">';
for ($i=0; $i< strlen($adresse); $i++) {
$text .= "&#x".bin2hex($adresse[$i]).';';
}
$text .= "</a>";
return $text;
}
Ce qui donne comme résultat pour l'adresse moi@quelquepart.fr:
<a
href="mailto:%6d%6f%69%40%71%75%65%6c%71%75%65%70%61%72%74%2e%66%72">m&
#x6f;i@quelquepar
;t.fr</a>
_______________________________________________
liste spip
spip@rezo.net - désabonnement : spip-off@rezo.net
Infos et archives : http://listes.rezo.net/mailman/listinfo/spip
Documentation de SPIP : http://www.uzine.net/spip
From gvfred@hotmail.com Thu Sep 26 12:05:18 2002
Return-Path: <gvfred@hotmail.com>
Received: from hotmail.com (dav75.sea1.hotmail.com [207.68.162.210])
by miel.brainstorm.fr (Postfix) with ESMTP id A65361C1D9
for <spip@rezo.net>; Thu, 26 Sep 2002 12:05:17 +0200 (CEST)
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Wed, 25 Sep 2002 15:06:16 -0700
X-Originating-IP: [80.65.224.116]
From: "Fred" <gvfred@hotmail.com>
To: <spip@rezo.net>
Date: Thu, 26 Sep 2002 00:05:12 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <DAV756R2GeF04hAsYaK000160a7@hotmail.com>
X-OriginalArrivalTime: 25 Sep 2002 22:06:16.0811 (UTC)
FILETIME=[C5297BB0:01C264DF]
Subject: =?iso-8859-1?q?=5BSpip=5D_?=
=?iso-8859-1?q?Liste_de_breves_d=27une_rubrique?=
X-BeenThere: spip@rezo.net
X-Mailman-Version: 2.1b2+
Precedence: list
List-Help: <mailto:spip-request@rezo.net?subject=help>
List-Archive: <Discuter chez rezo.net;
List-Unsubscribe: <http://listes.rezo.net/mailman/listinfo/spip>,
<mailto:spip-request@rezo.net?subject=unsubscribe>
List-Subscribe: <http://listes.rezo.net/mailman/listinfo/spip>,
<mailto:spip-request@rezo.net?subject=subscribe>
List-Post: <mailto:spip@rezo.net>
List-Id: SPIP : questions/reponses <spip.rezo.net>
X-List-Received-Date: Thu, 26 Sep 2002 10:05:18 -0000
Status: O
Content-Length: 753
Lines: 21
Bonsoir,
Je souhaite dans mon squelette afficher la liste des 10 dernières brèves
publiées.
Jusque là c'est pas très compliqué et je sais faire :
<BOUCLE_rubrique(RUBRIQUES){id_rubrique}>
<BOUCLE_breves(BREVES){id_rubrique}{par date}{inverse}{0,10}>
- <a href="#URL_BREVE">#TITRE</a></font><br>
</BOUCLE_breves>
</BOUCLE_rubrique>
Plus complexe, parmis ces 10 brèves, je souhaite affichier en caractères
gras les brèves publiées dans les 30 derniers jours...
Et là je sais plus faire...
Y a-t-il une subtilité dans la boucle qui me permette de faire ?
Sinon, si je fais 2 boucles consécutives en ajoutant {age<30} dans la
première et {age>29} dans la seconde, y a t il un moyen de faire en sorte
que le nombre total de breves soit fixe ?
Fred
From snowbello@hotmail.com Thu Sep 26 12:04:47 2002
Return-Path: <snowbello@hotmail.com>
Received: from hotmail.com (oe61.law12.hotmail.com [64.4.18.196])
by miel.brainstorm.fr (Postfix) with ESMTP id 24CE41C1D0
for <spip@rezo.net>; Thu, 26 Sep 2002 12:04:47 +0200 (CEST)
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Wed, 25 Sep 2002 10:18:38 -0700
X-Originating-IP: [81.48.177.73]
From: "evelyne" <snowbello@hotmail.com>
To: <spip@rezo.net>
Date: Wed, 25 Sep 2002 19:22:34 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0013_01C264C8.E6DE7290"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <OE61upGtIpqqJgSt51N000016e0@hotmail.com>
X-OriginalArrivalTime: 25 Sep 2002 17:18:38.0334 (UTC)
FILETIME=[964EE1E0:01C264B7]
X-Mailman-Approved-At: Thu, 26 Sep 2002 12:14:54 +0200
Subject: =?iso-8859-1?q?=5BSpip=5D_?= =?iso-8859-1?q?=28sans_objet=29?=
X-BeenThere: spip@rezo.net
X-Mailman-Version: 2.1b2+
Precedence: list
List-Help: <mailto:spip-request@rezo.net?subject=help>
List-Archive: <Discuter chez rezo.net;
List-Unsubscribe: <http://listes.rezo.net/mailman/listinfo/spip>,
<mailto:spip-request@rezo.net?subject=unsubscribe>
List-Subscribe: <http://listes.rezo.net/mailman/listinfo/spip>,
<mailto:spip-request@rezo.net?subject=subscribe>
List-Post: <mailto:spip@rezo.net>
List-Id: SPIP : questions/reponses <spip.rezo.net>
X-List-Received-Date: Thu, 26 Sep 2002 10:04:47 -0000
Status: O
Content-Length: 1721
Lines: 50
This is a multi-part message in MIME format.
------=_NextPart_000_0013_01C264C8.E6DE7290
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Bonjour,
Tout d'abord un grand bravo pour votre travail !
Je voudrais moi aussi participer et fabriquer des squelettes. Je =
d=E9bute et...
J'aimerais pouvoir v=E9rifier mon travail en localhost mais je n'arrive =
pas =E0 y acc=E9der. Alors faut-il un logiciel du genre easy php ?
Merci pour votre r=E9ponse
------=_NextPart_000_0013_01C264C8.E6DE7290
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Bonjour,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Tout d'abord un grand bravo pour votre =
travail=20
!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Je voudrais moi aussi participer et =
fabriquer des=20
squelettes. Je d=E9bute et...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>J'aimerais pouvoir v=E9rifier mon =
travail en=20
localhost mais je n'arrive pas =E0 y acc=E9der. Alors faut-il un =
logiciel du genre=20
easy php ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Merci pour votre =
r=E9ponse</FONT></DIV></BODY></HTML>
------=_NextPart_000_0013_01C264C8.E6DE7290--
From patois@calvix.org Thu Sep 26 12:17:47 2002
Return-Path: <patois@calvix.org>
Received: from mx2.interhost-fr.com (ns.sicfa.org [212.43.217.38])
by miel.brainstorm.fr (Postfix) with ESMTP id 833ED1C113
for <spip@rezo.net>; Thu, 26 Sep 2002 12:17:47 +0200 (CEST)
Received: by mx2.interhost-fr.com (Postfix, from userid 507)
id 2B99A1663C; Thu, 26 Sep 2002 10:23:54 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by mx2.interhost-fr.com (Postfix) with ESMTP id 1778A1659C
for <spip@rezo.net>; Thu, 26 Sep 2002 10:23:54 +0200 (CEST)
Date: Thu, 26 Sep 2002 10:23:53 +0200 (CEST)
From: Yannick Patois <patois@calvix.org>
X-X-Sender: <patois@ns.sicfa.org>
To: <spip@rezo.net>
Subject: RE: [Spip] Filtre anti-spam
In-Reply-To: <BDC4B4608FFCD1118CEE00A0C93D8FB2194507@none.wanadoo.fr>
Message-ID: <Pine.LNX.4.33.0209261017320.27494-100000@ns.sicfa.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: 8BIT
X-BeenThere: spip@rezo.net
X-Mailman-Version: 2.1b2+
Precedence: list
List-Help: <mailto:spip-request@rezo.net?subject=help>
List-Archive: <Discuter chez rezo.net;
List-Unsubscribe: <http://listes.rezo.net/mailman/listinfo/spip>,
<mailto:spip-request@rezo.net?subject=unsubscribe>
List-Subscribe: <http://listes.rezo.net/mailman/listinfo/spip>,
<mailto:spip-request@rezo.net?subject=subscribe>
List-Post: <mailto:spip@rezo.net>
List-Id: SPIP : questions/reponses <spip.rezo.net>
X-List-Received-Date: Thu, 26 Sep 2002 10:17:47 -0000
Status: O
Content-Length: 1148
Lines: 29
Salut,
On Thu, 26 Sep 2002, NTIC.SI wrote:
Comment ça marche, le lien encodé ?
Représentation des caractères en entités numériques.
C'ets pas très différent que de mettre é pour é.
Si le navigateur peut le lire, le robot ne peut-il pas aussi ?
Bien sur. Il faut juste esperer que le robot fase juste un "| grep '@'"
sans avoir au préalable décodé la page, vu que n'importe quel navigateur
le fait, c'est sans doute pas très efficace...
Pour ma part, je ne crois pas que l'on résolve le spam par ce genre de
technique, au final ça gêne plus l'utilisateur légitime (qui veut t'écrire
un mail) que le spammer...
Mais c'est un débat qui dépasse largement le sujet de la liste spip ![]()
Yannick
--
_/ Yannick Patois _________________ Address (home) __________________
| irc(undernet): Garp on #france25+ | 17, rue du Tonkin |
| email : patois@calvix.org | Apt. 9G, 3iem |
| http://garp.feelingsurfer.net/ | 69100 Villeurbanne |
| Tel-home: +33 (0)4 78 89 76 47 | FRANCE |
| Un Petit Agenda Militant Lyonnais - http://expace.lautre.net/ |