The meta-federated social network

Today’s social network are all introvert in a way or an other at varying degrees. Some are fully centralized where interaction is done only with users from the same network and server. Some are decentralized and interactions occur between users on the same network spread on different servers. Some others go even further and let interactions occur between users from different networks and servers. This is the federation. Networks falling in the last category are few and a real federation is not there yet.

The fediverse is not federated

Networks should settle on a common protocol in order to understand each other. This certainly won’t happen. Years have passed and no unified protocol have been defined yet. Who said OStatus? XMPP you say?

I might say that each network speaks its own language and doesn’t do any effort to learn a foreign one. It eventually learns a word or two as a second languages like « Hello », and « show me your picture pelase ». Please take note of the typo the the second sentence.

A huge hindrance to federation on the one hand is jailing networks like the Eff, Tee or Gee+ ones that are completely centralized and introverts by design. On the other hand federated networks provide the poorest and outdated documentation possible making it difficult for other developers to bypass the lack of a standard protocol.

The current state of things is that if a network talks to another, the communication is poor. For example, a user from GNU Social can subscribe to a user from diaspora* but not the inverse. More than that, the GNU Social user would stop receiving updates from that diaspora* user after a period of time.

You cannot subscribe to a user living in a jail network.

There exist bridges that allows a user post on a jail network and have his updates mirrored on an open network and vice versa. Even though, you still need to have two accounts to use a bridge.

My proposition

I propose to create a network that is polyglot. A network that thinks in its own way and expresses itself in the language of the one it communicates with. Lets name this social network The Polyglot.

A polyglot account would provide access to as many networks as network-languages it can speak. E.g. A polyglot account gives an account on GNU Social, diaspora*, Redmatrix, pump.io, friendica, and XMPP all in the same place under one user identifier. Speak to it in OStatus, it replies in OStatus. Ask it in pump.io, it answers in pump.io.

The polyglot, like humans, can understand (read-only) what jail networks say, but is too afraid to speak to them. It may resort to brokers or intermediaries to speak to them.

How to achieve this is rather simple. The polyglot needs to know the basics of all the networks-languages it wants to talk to. Those basics are:

  1. Get a user’s profile including his avatar, header, bio, location, email and URL
  2. Get a user’s publications. Also known as notices, dents, updates, statuses, queets, tweets, etc.
  3. Post a publication

These basics can be extended by basics level 2:

  1. Post a reply
  2. Get replies to a notice.

A post has a textual content, a posting user, a created at date and can have a type or not. It has also many meta-data.

A reply is a post that replies to another post. Depending on the network, a reply may be considered a comment.

The polyglot is intelligent enough to understand if it dealing with posts, replies, comments, photos, videos, check-ins or a personalized post type.

When the polyglots learns how to talk to enough networks, it can then formulate complex sentences and take complex actions like one-click remote subscriptions, reply to any post anywhere or populate a user photo gallery from a user on a network with no gallery notion. It is real smart a polyglot, isn’t it?

On a more technical side this polyglot should know all the important API end-points and how to use them. The polyglot should be developed in Object Oriented Programming and makes extensive use of Inheritance and abstraction.

This network is better written in a framework like symfony2 so it benefits from a strong MVC architecture, routing and templating. By templating I mean it either replies in HTML5, JSON, plain XML, Atom, RSS, RSS2, ActivityStream or anything.

Lets say we have an abstract base class Polyglot defining all the vital and necessary operations. This is what I referred to as thinking in its own way. The common parts would take care of storing updates, profile information and all the data in a unified and structured way. The remaining methods will all be abstract, obliging any class inheriting from it to implement the basic operation we want.

What I want to come to is that if we need our polyglot to speak a new network-language, we just create a new class defining how those basic operations work on that new network.

When we have all the data we want, we do what ever we want with it like translating it to other networks in their own languages.

For jail networks, we only need an API key and secret that would power a broker. This broker will get a list of users, read what they say, and replicate their statements locally. In other words, the broker monitors the subscription process and look for all the remote that are in the jail it is in charge of, and dresses a list of them. It will then, depending on the configuration of the local server, retrieve all the updates and data of the selected users in real-time, near real-time or at intervals. Once the brokers does its work, the polyglot knows what the jailed users said, and inform its local users. Local users might also ask the broker to transmit messages to jailed users.

Practically, you might subscribe to @user@twitter.com, mention him and the broker will take care of informing the polyglot and thus the local user of all what @user@twitter.com says, and even transmit queets to him inform tweets. Obviously, those tweet will be posted by a bot, the broker, and contain the original user username and all the data needed by the jail network in the format it wants. Given enough permissions, the broker can do the same for any network of any kind as long as it has public API or is decentralized.

Eventual problem we might face

We might have a problem if two networks use the same API end point while using different data structure and format. API end points are the principal indicator of the protocol. If a social network doesn’t identify itself in the headers, which certainly no network does, then there is no other way than the API end point to identify it. This can be problematic. Really.

An eventual solution is to give a Schrodinger reply. We first determine all networks using this API endpoint and generate a response to all of them. Then if all those networks use the same data structure. e.g. all use JSON, try to put somehow all the response one after the other hoping the network would choose the right one for it. If they use different data structure, it is more problematic. We may give a response using some kind of separator, or multiple successive replies. If the network doesn’t understand the response will drop it but hopefully takes the next one in consideration.

A real solution is prefixing APIs with the name of the protocol. Instead of having example.com/api/ as the base, we would have example.com/ostatus and example.com/diaspora as bases. This is possible since networks have absolutely no clue on how that base should look like and just search for it in the <head> section of a DOM page.

Conclusion

Only a polyglot can decide what language (protocol) is the most practical and efficient. So while nobody knows what any protocol should look like, how efficient it should be federation wise, lets all feed our polyglot so it tells us. This proposition is practical and feasible. Clients like Andstatus can operate on many networks, but they don’t do so under one and same identity.

 

Update

Friendica apparently does most of what I describe and is the most federated. It can interact with, GNU Social, diaspora, redmatrix and itself. Why isn’t as wide spread as others?

Utiliser la même adresse Gmail sur plusieurs comptes twitter ou autre services.

Une astuce bien simple pour pouvoir vous servir d’une seul et même adresse e-mail sur plusieurs comptes distincts d’un service web.

Plusieurs services web ne permettent pas d’utiliser la même adresse e-mail sur plusieurs compte. C’est le cas de twitter notamment, où le besoin d’une tell pratique se fait assez vite ressentir car plusieurs sont ceux qui on un compte personnel et un autre pour leur blog. Pourtant, il y a une petite astuce qui permet de surpasser cette limitation.

L’astuce ici réside dans le système de Gmail qui fait que les points « . » ne sont pas pour grand chose pour identifier une adresse Gmail. En effet, truc.bidul@gmail.com, trucbidul@gmail.com ou tru.c.bi.dul@gmail.com renvois tous à la même adresse. Vous avez le droit de mettre autant de point que vous voulez et n’importe où ! Cependant deux points successifs, un au tout début ou à la fin ne sont pas permit.

Je crois que vous savez déjà ce que vous avez a faire pour utiliser une seul est même adresse e-mail pour plusieurs comptes twitter, facebook ou n’importe quel autre services.

Il vous suffit donc n’indiquez votre adresse e-mail de façon différente (sans les point, avec un ou plusieurs points, et dans différent endroit) sur chaque compte. Vous pourrez ainsi utiliser autant de compte avec la même adresse que vous avez de possibilité d’insérer des point. Les possibilités sont énorme.

J’ai pour l’instant tester cette technique qu’avec twitter, et sa marche a merveille.

Youtube-dl : Télécharger les vidéos YouTube

Youtube-dl est un logiciel en ligne de commande qui vous permet de télécharger des vidéos YouTube et autres services.

Youtube-dl : téléharger les vidéos YouTube et autres services.

Installation

Fedora

# yum install youtube-dl

Ubuntu

$ sudo apt-get install youtube-dl

Téléchargement simple d’une vidéo

L’utilisation la plus basique de youtube-dl est la suivante :

youtube-dl url-de-la-video

Remplacer url-de-la-video par le lien de la vidéo visible dans le navigateur quand vous regarder la vidéo. Peu importe comment il est, s’il comporte beaucoup de paramètre ou pas. Il faut quand même qu’il y est un watch?v=xxxxxxxx ou un playlist?list=xxxxxxxx

Par exemple :

youtube-dl https://www.youtube.com/watch?v=QG6EWqhaydI

Le résultat sera un fichier nommé QG6EWqhaydI.webm, suivant l’identifiant dans l’URL.
Pour avoir un fichier avec le nom réel de la vidéo poursuivez la lecture.

 

 

Utilisation avancé

Ce n’est pas réellement une utilisation avancé, mais ça permet d’avoir plus d’options et de contrôle sur le téléchargement.

Nommé le fichier avec le nom de la vidéo

On vas utilisé le paramètre -o comme suit :

youtube-dl -o "%(stitle)s.%(ext)s" url-de-la-video

Ou bien on peut on peu faire plus facile; utiliser l’un des paramètre -t ou -l. -l pour avoir le nom littérale de la vidéo et -t pour avoir un nom simplifié avec seulement des caractères alphanumérique. Le fichier enregistré aura la forme : nom_de_la_video-XXXXXX.ext ou bien nom de la video.ext.

Extraire le son seulement

youtube-dl --extract-audio url-de-la-video

Youtube-dl télécharge d’abord la vidéo et extrait le son après et fini par supprimé la vidéo, ne gardant ainsi que le fichier audio. Si vous préférez garder le fichier vidéo, ajouter le paramètre -k.

Télécharger plusieurs vidéos d’un coup

À partir d’une playlist

Pour télécharger toute une playlist, il faut indiquer l’URL de la playlist et non une URL vers une simple vidéo. Un lien de playlist est de la forme https://www.youtube.com/playlist?list=PLC24E7FE05C04C4B6

youtube-dl https://www.youtube.com/playlist?list=xxxxxxxx

À partir d’un fichier de URLs

Il faut utiliser le paramètre -a et indiquer après le nom d’un fichier contenant une liste d’URL vers les vidéos.

youtube-dl -a /fichier/contenat/les/liens

 

Téléchargement sélectif

Je vais simplement vous présenter les paramètres et leurs effets du moment qu’ils sont simple d’utilisation, comme tout ce qui précède d’ailleurs. Ils n’ont de sens que quand on télécharge plusieurs vidéos.

--playlist-start NUMERO  commencer à télécharger à partir de de cette vidéo (1 par défaut)
--playlist-end NUMERO    finir le téléchargement à cette vidéo (jusqu’à la fin par défaut)
--match-title REGEX      télécharger seulement les vidéos qui correspondent à ce titre (expression régulière ou texte simple)
--reject-title REGEX     ne PAS télécharger les vidéos correspondant à ce titre. (expression régulière ou texte simple)
--max-downloads NUMERO   nombre maximal de vidéos à télécharger.
-A                       numérote les fichier automatiquement

Autre paramètres utiles

-g, --get-url            Retourne l'URL
-e, --get-title          Retourne le titre
--get-thumbnail          retourne l'URL vers la miniature de la vidéo
--get-description        affiche la description de la vidéo
--get-filename           retourne le nom du fichier a enregistré
--get-format             retourne le format enregistré
-w, --no-overwrites      ne pas écraser les fichiers.

Site web de youtube-dl [en]

Bypasser les filtres anti-spam : L’homographie

Ceci est un article purement éducatif. Il n’a pour objectif que vous prévenir et vous mettre dans la capacité de reconnaitre un spam.

La technique que je vais vous dévoiler permet au spammeur de bypaser les filtres anti-spam. Les homographe sont des lettre qui ressemble fortement mais n’ont pas le même Unicode. Comme, par exemple, le « 0 » zéro et le « O » oh majuscule. Le « 1 » un, le « I » i majuscule et le « l » elle minuscule.

Bon, cette technique est assez simple, mais pour mieux la comprendre, vous devez d’abord connaitre comment fonctionnent les filtres anti-spam.

Comment marche un filtre anti-spam

Je vais fair simple et court. Pour déterminer si un message est un spam ou non, le filtre lui attribue un score en fonction du quelle il tranche si c’est du spam. Cette analyse se base sur trois points, en incrémentant le score à chaque critère de trouvé :

  1. La provenance du message : Les filtres vérifie si le message provient d’un réseau de confiance. Ceci peut être baypassé en utilisant un réseau de confiance.
  2. L’outil utiliser pour envoyer le message : Les filtres cherche des indice dans le entête du message cherchant si le message a été envoyer un outil de spam. Ceci peut être facilement être baypassé en utilisant un spammeur assez intelligent simulant un vrai et authentique outils d’envoi de message ou le fait de réellement utiliser un vrai mailer.
  3. Le contenue du message : C’est ce qui nous intéresse le plus. Ici le filtre cherche dans le contenue du message des phrases comme « CLICK HERE » ou les fameux « FREE! BUY NOW » mais aussi :
    • Si le message parle trop d’argent
    • Décrit une sorte de découverte
    • Ressemble à de la pub
    • Contient un truc super urgent
    • Garantit satisfait ou remboursé
    • Pourquoi payer plus ?

C’est la troisième partie qui est la plus intéressante. Les deux premier n’étant que des détails facilement solutionné. C’est là où vont intervenir les homographes.

Comment les spammeur bypass les filtres anti-spam

En effet, il existe des symboles en grec et en cyrillique qui ressemble à certains caractère latin mais qui n’ont pas les même Unicode, et sont donc deux caractère complètement différent pour l’ordinateur. Par exemple « CLICK HERE » en latin est détectable, mais « СLIС НЕRЕ », qui contient des caractères cyrillique ne l’est absolument pas. Je crois que maintenant vous avez saisie le truc; il suffit de changez certains caractères latin par leurs équivalent grec ou cyrillique pour que le message soit incompréhensible par le filtre mais en même temps lisible par la victime.

J’ai trouver sur internet un script nomé Homographit qui permet de simplifier cette tache en transformant la majorité des lettres latine par des cyrilliques. Il est téléchargeable par ici.

Teste d’efficacité de la technique par homographie

Pour tester l’efficacité de la téchnique par homographie, on va utiliser le site emailspamtest.com qui se base sur les règles de Spam Assassin.

On va se servir d’un mail que j’ai récemment reçu dans ma boite à spam.

Dr Salif Tendogo

Le score du message spam non homographié

From Dr Salif Tendogo
Manager Audit & Account Dept
Bank of Africa B.O.A Ouagadougou
Burkina Faso West Africa.

Dear Friend,
Greeting's to you and your entire family!
I am Dr Salif Tendogo , a banker with the above mentioned bank in Ouagadougou Burkina Faso in West Africa, holding the post of Manager Audit & Account Dept.

On December, 25, 2003, one Mr Ron Morris,an American who base in Lebanor, An Astute Business man of international repute, a contractor with ecowas country, whose endeavors spans various areas of Business interest, (Real estate, contract and Farming .etc) made a numbered time (Fixed) Deposit, valued at $25,000.000.00 (Twenty Five Million, United States Dollars) for twelve calendar months in my Bank Branch.

Upon Maturity, we sent a routine notification to his forwarding address but got no reply. After a month, we sent a reminder and finally we discovered from his company that Mr. Ron Morris was aboard the AF4590 plane, which crashed December, 25 2003.

After further investigation, it was discovered that he died without making a WILL and all attempts to trace his next of kin proved fruitless,On further investigation, it was discovered that Late Mr.Ron Morris did not declare any next of kin or relatives in all his official documents, including his Bank Deposit paper deposited here in our Bank.

The total sum of $(25,000.000.00)twenty five million united state dollars is still in my bank and the interest is being rolled over with the principal sum at the end of each year, All efforts to trace and locate his next of kin proved abortive.

In accordance with the country’s banking laws and constitution guiding this banking institution stated that after the expiration of (10) ten years, if no body or person comes for the claim as the next of kin , such money will be revert to the Burkina Faso government treasury if nobody applies as the next of Kin to claim of the fund. Consequently, It is upon this respect, I seek to present you since no one will come up for the claim.

Upon your acceptance of this proposal, I shall send to you by mail the (B.O.A) Bank "Next of Kin Payment Application Text Form" as well as detailed information on how this deal would be carried out.

The money will be shared in the ratio: 60% for me, 30% percent for you and 10% percent for any arising contingencies during the Course of this transaction. I guarantee that this will be executed under legitimate arrangement that will protect you from any breach of the law, as I will use my position in the Bank's here to perfect this business transaction & secure Approvals and guarantee the successful execution of this transaction.

Please be informed that your utmost confidentiality is required. If this interests you, I want to remind you of the confidentiality of this Transaction at hand whatever your decision is.

I await your urgent response. Your detailed reply should contain your telephone and fax numbers for easier communication for onward proceeding.

Best Regards
Dr Salif Tendogo
Manager Audit & Account Dept

Ce message reçoi le scrore de 21.2, qui est un spam selon Spam Assassin car supérieur à 5.

Si on le transforme avec homographit (je ne metterais pas le résultat ici pour ne pas avoir un article ultra long 😉 ), le score redescend à 2.5, Il n’est donc plus considéré comme étant spam.

Le score du message spam homographié

Conclusion

Maintenant que vous savez comment fonctionnent les filtre anti-spam et comment il peuvent facilement être bypass, vous pouvez jouer le rôle de filtre par vous même, du simple fait que vous ne vous ferais pas avoir par l’homographie.

Arrangement du blog

Je viens de faire un peut de ménage et améliorations sur ce foutu blog.

D’abord pour gagner en légèreté, j’ai donc commencer par installer un thème léger et responsive qui s’appelle Portfolio Press. C’est la 3éme fois que je change de thème. Les thème gratuit c’est pas le paradis. J’ai ainsi pu supprimer le plugin WPtouch, vue que le thème s’adapte de lui même au mobile et ainsi gagner encore plus en légèreté. J’ai également supprimer disqus car il prend du temps pour se chargé, et je n’ai pas eu la nouvel jolie interface, je n’avais que la moche d’avant. J’ai aussi supprimer beaucoup d’autre plugins en interne comme StatPressVisitor et autre scanner de sécurité complétement inutile, pour ne garder que essentiel.

J’ai également passer le blog en dofollow. Ça permettra au visiteurs de se construire des backlink tout en commentant aux article qui leurs plaise, car moi je sais la galère pour avoir des backlink et leur importance.

Dans le même cadre, j’ai installer le plugin KeywordLuv. Il m’a été inspiré par helran. C’est un plugins qui vous permet, quand vous poster un commentaire, de séparer votre nom de votre site. Ceci à un effet esthétique, mais il met aussi votre site en valeur. Son utilisation est très simple. Dans la case où vous entrer votre nom, vous mettez votre nom comme d’habitude suivit d’un arobase « @ » puis le mot clé ou le nom de votre site. Le liens sera celui que vous mettez dans la case « siteweb » habituel. Donc vous rentrez dans la case nom quelque chose comme ça : Dragnucs@Blog de dragnucs. Ce ci aura pour effet : Dragnucs de Blog de dragnucs. où le pseudo ne porte pas de lien sauf le mot clé Blog de dragnucs. Vous pouvez mettre un commentaire sur cette article pour faire un teste. Ah et, le lien est en DoFllow !

Ah et, il y a aussi un autre plugin qui vous permet de vous abonner par e-mail au commentaire. Vous recevrez donc une notification e-mail, selon votre choix, lorsque qu’un  commentaire et poster sur l’article, ou seulement s’il est en réponse au votre.

Alors, vous en penser quoi de cette nouvel merde ?