Possibility to fake OS and client version

Bug #146849 reported by sander
2
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Wishlist
Mats

Bug Description

A config file-only option to fake OS and client version can be useful for some people. For example when the server only allows clients with a specific OS/client version to connect.

URL: http://www.jivesoftware.com/products/openfire/features/clientcontrol.jsp

sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
importance: Undecided → Wishlist
Revision history for this message
Mats (matsben) wrote :

Just added config elements for the presence caps but need to fix the disco stuff also.

Changed in coccinella:
status: New → In Progress
Revision history for this message
Mats (matsben) wrote :

It now can fake the presence caps element as well as incoming disco queries.
I saw that XEP-0115 is redesigned which needs some more work to be up to date.

Changed in coccinella:
status: In Progress → Fix Committed
Revision history for this message
sander (s-devrieze) wrote : Re: [Bug 146849] Re: Possibility to fake OS and client version

Don't forget to add the version number! ;-)

2007/10/1, Mats <email address hidden>:
> It now can fake the presence caps element as well as incoming disco queries.
> I saw that XEP-0115 is redesigned which needs some more work to be up to date.

--
Mvg, Sander Devrieze.

Revision history for this message
sander (s-devrieze) wrote :

How does it work btw?

2007/10/1, Mats <email address hidden>:
> It now can fake the presence caps element as well as incoming disco queries.
> I saw that XEP-0115 is redesigned which needs some more work to be up to date.

Revision history for this message
Mats (matsben) wrote :

In jabber/Jabber.tcl

    # This is a method to show fake caps responses.
    set ::config(caps,fake) 0
    set ::config(caps,node) ""
    set ::config(caps,vers) ""

but it is untested. Note that the caps XEP is essentially completely rewritten
so its not entirely uptodate.

Revision history for this message
sander (s-devrieze) wrote :

2007/10/2, Mats <email address hidden>:
> In jabber/Jabber.tcl
>
> # This is a method to show fake caps responses.
> set ::config(caps,fake) 0
> set ::config(caps,node) ""
> set ::config(caps,vers) ""

Yes, but is there no config file option to set these?

--
Mvg, Sander Devrieze.

Revision history for this message
sander (s-devrieze) wrote :

2007/10/2, Mats <email address hidden>:
> but it is untested. Note that the caps XEP is essentially completely rewritten
> so its not entirely uptodate.

It does not work. I tried to enter:
    set ::config(caps,fake) 1
    set ::config(caps,node) "Windows Live Messenger"
    set ::config(caps,vers) "9"

But when I look up the version information using the view business
card dialog, I see:
name: JabberLib
version: 1.0
OS: Linux

btw, the first should be by default %theappname% and the second %theappversion%.

--
Mvg, Sander Devrieze.

Revision history for this message
Mats (matsben) wrote :

On 10/2/07, sander <email address hidden> wrote:
> 2007/10/2, Mats <email address hidden>:
> > In jabber/Jabber.tcl
> >
> > # This is a method to show fake caps responses.
> > set ::config(caps,fake) 0
> > set ::config(caps,node) ""
> > set ::config(caps,vers) ""
>
> Yes, but is there no config file option to set these?
>

See coccinella/resources/

Revision history for this message
Mats (matsben) wrote :

On 10/2/07, sander <email address hidden> wrote:
> 2007/10/2, Mats <email address hidden>:
> > but it is untested. Note that the caps XEP is essentially completely
> rewritten
> > so its not entirely uptodate.
>
> It does not work. I tried to enter:
> set ::config(caps,fake) 1
> set ::config(caps,node) "Windows Live Messenger"
> set ::config(caps,vers) "9"
>

The node must be a uri like:
 set ::config(caps,fake) 1
 set ::config(caps,node) "http://www.microsoft.com/msn"
 set ::config(caps,vers) "9"

And it only affects disco/caps which is used by clients to identify
other clients.
It works, just tested. (The url is fake.)

> But when I look up the version information using the view business
> card dialog, I see:
> name: JabberLib
> version: 1.0
> OS: Linux
>

This is a different story
> btw, the first should be by default %theappname% and the second
> %theappversion%.
>

Fixed. It turned out I had jabberlib handler for this which wasn't
verriden by the
application handler.

Revision history for this message
Mats (matsben) wrote :

Forgot to say that prefs(appName) is something different than the disco nodes.
If you want to fake the coccinella completely you must fake both.

On 10/2/07, Mats Bengtsson <email address hidden> wrote:
> On 10/2/07, sander <email address hidden> wrote:
> > 2007/10/2, Mats <email address hidden>:
> > > but it is untested. Note that the caps XEP is essentially completely
> > rewritten
> > > so its not entirely uptodate.
> >
> > It does not work. I tried to enter:
> > set ::config(caps,fake) 1
> > set ::config(caps,node) "Windows Live Messenger"
> > set ::config(caps,vers) "9"
> >
>
> The node must be a uri like:
> set ::config(caps,fake) 1
> set ::config(caps,node) "http://www.microsoft.com/msn"
> set ::config(caps,vers) "9"
>
> And it only affects disco/caps which is used by clients to identify
> other clients.
> It works, just tested. (The url is fake.)
>
> > But when I look up the version information using the view business
> > card dialog, I see:
> > name: JabberLib
> > version: 1.0
> > OS: Linux
> >
>
> This is a different story
> > btw, the first should be by default %theappname% and the second
> > %theappversion%.
> >
>
> Fixed. It turned out I had jabberlib handler for this which wasn't
> verriden by the
> application handler.
>

Revision history for this message
sander (s-devrieze) wrote :

how?

2007/10/2, Mats <email address hidden>:
> Forgot to say that prefs(appName) is something different than the disco nodes.
> If you want to fake the coccinella completely you must fake both.

Revision history for this message
Mats (matsben) wrote :

You have to read the:
coccinella/resources/README-config
coccinella/resources/README-resources
coccinella/resources/post/README-post

I don't remember if the associated files can be placed in the prefs folder.
Seems not: ::Init::Config , ::PrefUtils::Init

/Mats

On 10/2/07, sander <email address hidden> wrote:
> how?
>
> 2007/10/2, Mats <email address hidden>:
> > Forgot to say that prefs(appName) is something different than the disco
> nodes.
> > If you want to fake the coccinella completely you must fake both.
>
> --
> Possibility to fake OS and client version
> https://bugs.launchpad.net/bugs/146849
> You received this bug notification because you are a bug assignee.
>

Revision history for this message
sander (s-devrieze) wrote :

But it did not worked when directly changing the source...

2007/10/2, Mats <email address hidden>:
> You have to read the:
> coccinella/resources/README-config
> coccinella/resources/README-resources
> coccinella/resources/post/README-post
>
> I don't remember if the associated files can be placed in the prefs folder.
> Seems not: ::Init::Config , ::PrefUtils::Init
>
> /Mats
>
> On 10/2/07, sander <email address hidden> wrote:
> > how?
> >
> > 2007/10/2, Mats <email address hidden>:
> > > Forgot to say that prefs(appName) is something different than the disco
> > nodes.
> > > If you want to fake the coccinella completely you must fake both.
> >
> > --
> > Possibility to fake OS and client version
> > https://bugs.launchpad.net/bugs/146849
> > You received this bug notification because you are a bug assignee.
> >
>
> --
> Possibility to fake OS and client version
> https://bugs.launchpad.net/bugs/146849
> You received this bug notification because you are a direct subscriber
> of the bug.
>
>

--
Mvg, Sander Devrieze.

Revision history for this message
Mats (matsben) wrote :

In Jabber.tcl you'll find:
    if {0} {
 set ::config(caps,fake) 1
 set ::config(caps,node) "http://www.microsoft.com/msn"
 set ::config(caps,vers) "9"
    }
for testing this. Then you Disco/Add Server and add your own *full* JID.
The tooltip windows show the exact node. Test also change your presence and
look at the caps element which shows the above.

/Mats

On 10/2/07, sander <email address hidden> wrote:
> But it did not worked when directly changing the source...
>
> 2007/10/2, Mats <email address hidden>:
> > You have to read the:
> > coccinella/resources/README-config
> > coccinella/resources/README-resources
> > coccinella/resources/post/README-post
> >
> > I don't remember if the associated files can be placed in the prefs
> folder.
> > Seems not: ::Init::Config , ::PrefUtils::Init
> >
> > /Mats
> >
> > On 10/2/07, sander <email address hidden> wrote:
> > > how?
> > >
> > > 2007/10/2, Mats <email address hidden>:
> > > > Forgot to say that prefs(appName) is something different than the
> disco
> > > nodes.
> > > > If you want to fake the coccinella completely you must fake both.
> > >
> > > --
> > > Possibility to fake OS and client version
> > > https://bugs.launchpad.net/bugs/146849
> > > You received this bug notification because you are a bug assignee.
> > >
> >
> > --
> > Possibility to fake OS and client version
> > https://bugs.launchpad.net/bugs/146849
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
> >
>
>
> --
> Mvg, Sander Devrieze.
>
> --
> Possibility to fake OS and client version
> https://bugs.launchpad.net/bugs/146849
> You received this bug notification because you are a bug assignee.
>

Revision history for this message
sander (s-devrieze) wrote :

ok, I see now. But this does not changes the information provided by this XEP:
http://www.xmpp.org/extensions/xep-0092.html

Revision history for this message
Mats (matsben) wrote :

Now added. I choose to keep them separate:

    # This is a method to show fake caps responses.
    set ::config(caps,fake) 0
    set ::config(caps,node) ""
    set ::config(caps,vers) ""

    # Method to fake jabber:iq.version response.
    set ::config(vers,full) ""

    if {0} {
 set ::config(caps,fake) 1
 set ::config(caps,node) "http://www.microsoft.com/msn"
 set ::config(caps,vers) "9.9"
 set ::config(vers,full) "9.9"
    }

On 10/3/07, sander <email address hidden> wrote:
> ok, I see now. But this does not changes the information provided by this
> XEP:
> http://www.xmpp.org/extensions/xep-0092.html
>
> --
> Possibility to fake OS and client version
> https://bugs.launchpad.net/bugs/146849
> You received this bug notification because you are a bug assignee.
>

Revision history for this message
sander (s-devrieze) wrote :

And how to fake the client name? Everything needs to be fakable...yes
I am demanding ;-)

Revision history for this message
Mats (matsben) wrote :

You create a file coccinella/resources/post/prefs.rdb
with content:

*appName: Microstuff Sucks
*theAppName: Microstuff Sucks

Code:
::PrefUtils::Init

    # Post prefs file if any.
    if {[file exists $this(postPrefsFile)]} {
 catch {option readfile $this(postPrefsFile)} err
    }

On 10/3/07, sander <email address hidden> wrote:
> And how to fake the client name? Everything needs to be fakable...yes
> I am demanding ;-)
>
> --
> Possibility to fake OS and client version
> https://bugs.launchpad.net/bugs/146849
> You received this bug notification because you are a bug assignee.
>

sander (s-devrieze)
Changed in coccinella:
milestone: none → 0.96.4
sander (s-devrieze)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.