Accueil > > > NEWS K-OTIK.
NEWS K-OTIK.
Information sur la source
Description
Voici un code permettant de recevoir les news d'un site sur la sécurité informatique. Screenshot : http://membres.lycos.fr/xdbconcept/scripting/k-oti k.gif (comme le site accepte pas les .gif et qu'il trouve l'image trop grosse..)
Source
- alias k-otik { if $1 { var %!^ securite,news,virus,exploits
- if $istok(%!^,$1,44) { set %!: $1 | $iif($2 && $2 == html,set %!:: html,) }
- if !$window(@K-otik.news) { window -ae @K-otik.news }
- sockclose k.otik | clear @K-otik.news
- sockopen k.otik www.k-otik.com 80
- }
- else { echo -s /k-otik: paramètres manquants et/ou erronés - /k-otik securite\virus\exploits\news (html) | sockclose k.otik | halt }
- }
-
-
- on *:sockopen:k.otik:{ if $sockerr { echo -a $_sockerr($sockerr) | return }
- if %!:: { write -c K-otik.htm $+(<u><b><font color="#002980"><p style="text-align: center">Liste des News du site K-otik.com</b></u>,$chr(58)</p></font>) <br><hr>
- write K-otik.htm <title>News du site www.k-otik.com par tofu.</title>
- echo @K-otik.news Création de la page Html en cours ... veuillez patienter, elle s'ouvrira automatiquement. }
- else { echo @K-otik.news $+($u(Liste des News du site K-otik.com),$chr(58))) }
- if %!: { sockwrite -n $sockname GET $+($chr(47),$replace(%!:,securite,advisories),.xml) HTTP/1.1 }
- sockwrite -n $sockname Host: k-otik.com $+ $str($crlf,2)
- }
- on *:sockread:k.otik:{
- sockread %!
- if <title> isin %! {
- if !%!:: { echo @K-otik.news - | echo @K-otik.news $str($b($chr(155)),2) $+($b($u($regstrip(%!))),$chr(58)) }
- else { write K-otik.htm <b>››<u><font color="#002980"> $regstrip(%!) $+ </u></font></b>: <br> }
- }
- if <link> isin %! { $iif(!%!::,echo @K-otik.news $+($u(Lien),:) $regstrip(%!),write K-otik.htm <u>Lien</u>: <a href= $+ $regstrip(%!) $+ > $+ $regstrip(%!) </a> <br>) }
- if <description> isin %! { $iif(!%!::,echo @K-otik.news $+($u(Description),:) $regstrip(%!),write K-otik.htm <u>Description</u>: $regstrip(%!) <br><br>) }
- }
- on *:sockclose:k.otik:{
- if %!:: { write K-otik.htm <br><hr> Fin de la liste des news du site <a href= $+ www.k-otik.com >www.k-otik.com</a> <>
- write K-otik.htm addon by <a href=mailto:eric@xdb.exagon.org>tofu</a>
- run iexplore $mircdir $+ K-otik.htm }
- echo @K-otik.news - | echo @K-otik.news Fin des news . | unset %!* }
-
-
- alias _sockerr {
- if $$1 == 0 { return aucune erreur }
- elseif $$1 == 1 { return impossible d'interpréter la requête à cause d'une erreur de format }
- elseif $$1 == 2 { return impossible d'exécuter à cause d'une erreur interne du serveur }
- elseif $$1 == 3 { return l'adresse soumise n'existe pas }
- elseif $$1 == 4 { return type de la requête non supporté }
- elseif $$1 == 5 { return demande refusée }
- else { return erreur non documentée }
- }
- alias u { return $+($chr(31),$1,$chr(31)) }
- alias b { return $+($chr(2),$1,$chr(2)) }
- alias regstrip { var %i,%a = $1-,%b = $regsub(%a,/<[^>]+>/g,,%i) | return $remove(%i,$chr(59),$chr(38)) }
-
- menu menubar,channel,@K-otik.news {
- K-otik
- .$submenu($menu-k($1))
- }
- alias menu-k {
- if ($1 == begin || $1 == 5 || $1 == 10 || $1 == end) { return - }
- if ($1 == 1) return News:/k-otik news
- if ($1 == 2) return Exploits:/k-otik exploits
- if ($1 == 3) return Virus:/k-otik virus
- if ($1 == 4) return Sécurité:/k-otik securité
- if ($1 == 6) return News html:/k-otik news html
- if ($1 == 7) return Exploits html:/k-otik exploits html
- if ($1 == 8) return Virus html:/k-otik virus html
- if ($1 == 9) return Sécurité html:/k-otik securite html
- if ($1 == 11) return Visiter K-otik.com:url www.k-otik.com
- }
alias k-otik { if $1 { var %!^ securite,news,virus,exploits
if $istok(%!^,$1,44) { set %!: $1 | $iif($2 && $2 == html,set %!:: html,) }
if !$window(@K-otik.news) { window -ae @K-otik.news }
sockclose k.otik | clear @K-otik.news
sockopen k.otik www.k-otik.com 80
}
else { echo -s /k-otik: paramètres manquants et/ou erronés - /k-otik securite\virus\exploits\news (html) | sockclose k.otik | halt }
}
on *:sockopen:k.otik:{ if $sockerr { echo -a $_sockerr($sockerr) | return }
if %!:: { write -c K-otik.htm $+(<u><b><font color="#002980"><p style="text-align: center">Liste des News du site K-otik.com</b></u>,$chr(58)</p></font>) <br><hr>
write K-otik.htm <title>News du site www.k-otik.com par tofu.</title>
echo @K-otik.news Création de la page Html en cours ... veuillez patienter, elle s'ouvrira automatiquement. }
else { echo @K-otik.news $+($u(Liste des News du site K-otik.com),$chr(58))) }
if %!: { sockwrite -n $sockname GET $+($chr(47),$replace(%!:,securite,advisories),.xml) HTTP/1.1 }
sockwrite -n $sockname Host: k-otik.com $+ $str($crlf,2)
}
on *:sockread:k.otik:{
sockread %!
if <title> isin %! {
if !%!:: { echo @K-otik.news - | echo @K-otik.news $str($b($chr(155)),2) $+($b($u($regstrip(%!))),$chr(58)) }
else { write K-otik.htm <b>››<u><font color="#002980"> $regstrip(%!) $+ </u></font></b>: <br> }
}
if <link> isin %! { $iif(!%!::,echo @K-otik.news $+($u(Lien),:) $regstrip(%!),write K-otik.htm <u>Lien</u>: <a href= $+ $regstrip(%!) $+ > $+ $regstrip(%!) </a> <br>) }
if <description> isin %! { $iif(!%!::,echo @K-otik.news $+($u(Description),:) $regstrip(%!),write K-otik.htm <u>Description</u>: $regstrip(%!) <br><br>) }
}
on *:sockclose:k.otik:{
if %!:: { write K-otik.htm <br><hr> Fin de la liste des news du site <a href= $+ www.k-otik.com >www.k-otik.com</a> <>
write K-otik.htm addon by <a href=mailto:eric@xdb.exagon.org>tofu</a>
run iexplore $mircdir $+ K-otik.htm }
echo @K-otik.news - | echo @K-otik.news Fin des news . | unset %!* }
alias _sockerr {
if $$1 == 0 { return aucune erreur }
elseif $$1 == 1 { return impossible d'interpréter la requête à cause d'une erreur de format }
elseif $$1 == 2 { return impossible d'exécuter à cause d'une erreur interne du serveur }
elseif $$1 == 3 { return l'adresse soumise n'existe pas }
elseif $$1 == 4 { return type de la requête non supporté }
elseif $$1 == 5 { return demande refusée }
else { return erreur non documentée }
}
alias u { return $+($chr(31),$1,$chr(31)) }
alias b { return $+($chr(2),$1,$chr(2)) }
alias regstrip { var %i,%a = $1-,%b = $regsub(%a,/<[^>]+>/g,,%i) | return $remove(%i,$chr(59),$chr(38)) }
menu menubar,channel,@K-otik.news {
K-otik
.$submenu($menu-k($1))
}
alias menu-k {
if ($1 == begin || $1 == 5 || $1 == 10 || $1 == end) { return - }
if ($1 == 1) return News:/k-otik news
if ($1 == 2) return Exploits:/k-otik exploits
if ($1 == 3) return Virus:/k-otik virus
if ($1 == 4) return Sécurité:/k-otik securité
if ($1 == 6) return News html:/k-otik news html
if ($1 == 7) return Exploits html:/k-otik exploits html
if ($1 == 8) return Virus html:/k-otik virus html
if ($1 == 9) return Sécurité html:/k-otik securite html
if ($1 == 11) return Visiter K-otik.com:url www.k-otik.com
}
Conclusion
C'est un addon en construction, donc il risque d'y avoir des bugs. si je le poste c'est parce que il est tard et j'ai du mal à voir cmt continuer d'optimiser donc si vous pouviez me donner quelques idées, elles seront les bienvenues.
Historique
- 07 août 2004 10:01:28 :
- Correction de la détection des diff pages en racourcissant le tout par un seul if dans le sockopen.
- 07 août 2004 10:22:20 :
- Sur les conseils de Sorn , j'update en me servant des tokken pour évaluer si l'aliase de départ est correct .
- 07 août 2004 12:30:55 :
- add d'un sshot dans la présentation du code .
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
[MIX10] KEYNOTE DEUXIèME JOURNéE - INTERNET EXPLORER 9, HTML5, VISUAL STUDIO 2010, ODATA[MIX10] KEYNOTE DEUXIèME JOURNéE - INTERNET EXPLORER 9, HTML5, VISUAL STUDIO 2010, ODATA par cyril
Le deuxième keynote du mix fut très riche en contenu. Internet Explorer 9 Juste un après le lancement de Internet Explorer 8, Microsoft a dévoilé les nouveautés de Internet Explorer 9. Désormais, IE supportera HTML5, SVG et CSS3. L'élément ...
Cliquez pour lire la suite de l'article par cyril CERTIFICATIONS BETA .NET 4CERTIFICATIONS BETA .NET 4 par KooKiz
Les inscriptions pour les certifications beta .NET 4 ont commencé. L'inscription est offerte pour les examens suivants : - 71-511, TS: Windows Applications Development with Microsoft .NET Framework 4 - 71-515, TS: Web Applications Development with...
Cliquez pour lire la suite de l'article par KooKiz [MIX 2010] - MICROSOFT TRANSLATOR TECHNOLOGY PREVIEW V2[MIX 2010] - MICROSOFT TRANSLATOR TECHNOLOGY PREVIEW V2 par redo
J'imagine que la plupart d'entre vous connaissent bien et utilisent le service de traduction de Google, mais connaissez-vous celui de Microsoft . Microsoft Translator ? Effectivement, Microsoft nous annoncé le lancement version 2 de la Technologie Preview...
Cliquez pour lire la suite de l'article par redo LANCEMENT EN PREVIEW DE CYCLONE LORS DES TECHDAYS 2010!LANCEMENT EN PREVIEW DE CYCLONE LORS DES TECHDAYS 2010! par MPOWARE
Toutes les vidéos de ce lancement sont en ligne!
Partie I - Intro
http://www.youtube.com/watch?v=LkQzTQ8T6CA
Partie II - Démo 1
http://www.youtube.com/watch?v=drAhYQ7lqvo
Partie III - Démo 2
http://www.youtube.com/watch?v=c8KM_1Gqybc...
Cliquez pour lire la suite de l'article par MPOWARE
Logiciels
Academy System (10.9.4.0)ACADEMY SYSTEM (10.9.4.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Xilisoft Convertisseur Vidéo Ultimate (5.1.39.0305)XILISOFT CONVERTISSEUR VIDéO ULTIMATE (5.1.39.0305)Xilisoft Convertisseur Vidéo Ultimate est un outil puissant de conversion vidéo, facile à utilise... Cliquez pour télécharger Xilisoft Convertisseur Vidéo Ultimate Xilisoft DVD Ripper Ultimate (5.0.64.0304)XILISOFT DVD RIPPER ULTIMATE (5.0.64.0304)Xilisoft DVD Ripper Ultimate est un logiciel excellent pour copier et convertir DVD vers presque ... Cliquez pour télécharger Xilisoft DVD Ripper Ultimate Rigs of Rods (63.3)RIGS OF RODS (63.3)c'est un jeu de multi-simulation camions,autobus voitures, avions, bateaux, hélicoptère avec défo... Cliquez pour télécharger Rigs of Rods
|