Recently, I have written a small utility for detecting jabber invisible status that I now want to publish, maybe it will be useful for somebody as an example of pyxmpp module usage. The tool will try to check if the specified jabber resource is actually online or offline regardless of invisible status that she set. I am not sure if the check result is 100% correct, likely not, but it works for me well, you can always send patches to extend the functionality.
As for usage example, I have set my second jabber account email@example.com to invisible status and it really appeared as offline in my roaster, but we can check if he is really offline or not:
antonm@alcor:~/work$ ./jabber_check_invisible.py --firstname.lastname@example.org email@example.com/SPBHome firstname.lastname@example.org password: online ( timeout )
as you see, the tool detected that email@example.com is actually online, now I will log it out to check how the tool will react:
antonm@alcor:~/work$ ./jabber_check_invisible.py --firstname.lastname@example.org email@example.com/SPBHome firstname.lastname@example.org password: offline ( wait_error )
here it outputs that he is offline now, that is really the case.
I have written this utility just for fun, so do not expect much from it, it is really tiny and quickly written. The license is GNU GPL 2 or above at your preference, do not forget to send me patches ;-) The way it works is pretty clear from the source code.
Invisible status is deprecated, it is insecure and has been rejected as XMPP standard. Use privacy lists instead. If you want your client to support ICQ-style UI for switching invisible status, just send appropriate privacy list when needed. Invisible status is a joke, nothing new invented here, all issues are known and were exploited before, I have just written and published the script.
jabber_check_invisible.py (8 Kb)