# User Agent String Spoofing

**URL:** <https://forums.plex.tv/t/user-agent-string-spoofing/3053>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [November 26, 2009, 6:09pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053 "2009-11-26T18:09:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![charleseladams](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/charleseladams/32/607_2.png) [@charleseladams](https://forums.plex.tv/u/charleseladams)\
**Post date:** [November 26, 2009, 6:09pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/1 "2009-11-26T18:09:20Z")

</div>

Hi guys,  
  
  
  
Quick question: How can I change the User Agent String for Plex in a Python script to stop it sending out the default?  
  
  
  
When I get a connection to a server Console is saying   
  
  
  
18:04:26 T:2964090880 M:394350592 DEBUG: Curl:: Debug GET /information/ HTTP/1.1  
  
User-Agent: Plex Firefox/2.0.0.11  
  
  
  
and I would like to change the Firefox/2.0.0.11 bit to another Useragent.  
  
  
  
Is there an xbmc xmbcgui etc function?  
  
  
  
Thanks!

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [November 27, 2009, 5:06am UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/2 "2009-11-27T05:06:49Z")

</div>

There is a way to spoof user agent with a Plex Media Server plug-in, but I think you’re referring to the old-style XBMC plug-ins. There may be a way to do this, but we don’t really support these plug-ins, so I’m afraid I’m not sure ☹

---

<div class="post-metadata">

**Author:** ![charleseladams](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/charleseladams/32/607_2.png) [@charleseladams](https://forums.plex.tv/u/charleseladams)\
**Post date:** [November 27, 2009, 9:29am UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/3 "2009-11-27T09:29:30Z")

</div>

> [@](#):
>
> There is a way to spoof user agent with a Plex Media Server plug-in, but I think you're referring to the old-style XBMC plug-ins. There may be a way to do this, but we don't really support these plug-ins, so I'm afraid I'm not sure :(

  
  
Thanks for the response. What I am trying to do at the moment is extend the PlexAeon Cinema Mode to allow for genre-based streaming from Apple Trailers at the start of a movie. Although I am using xbmc commands in my Python script at the moment I would like to be able to move this over to a proper supported Plex implementation at some point as the theory would (hopefully) be the same.  
How can I interact with the Media Server - is there somewhere you could direct me to read up on it :-)  
  
Thanks again.

---

<div class="post-metadata">

**Author:** ![jam](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jam/32/186050_2.png) [@jam](https://forums.plex.tv/u/jam)\
**Post date:** [November 27, 2009, 11:01pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/4 "2009-11-27T23:01:17Z")

</div>

Plex’s plug-in system is totally different to XBMC’s. Our plug-ins are for the media server, not Plex itself. You can check out the code for any existing plug-ins by looking in “~/Library/Application Support/Plex Media Server/Plug-ins”, and there’s some documentation over at [http://dev.plexapp.com](http://dev.plexapp.com). However, I’m not sure how much luck you’ll have in porting the Cinema Mode script over - Plex’s plug-ins focus more on providing content and metadata, they don’t have the same level of integration with the client as XBMC’s scripts do.

---

<div class="post-metadata">

**Author:** ![charleseladams](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/charleseladams/32/607_2.png) [@charleseladams](https://forums.plex.tv/u/charleseladams)\
**Post date:** [December 2, 2009, 7:39pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/5 "2009-12-02T19:39:18Z")

</div>

> [@](#):
>
> Plex's plug-in system is totally different to XBMC's. Our plug-ins are for the media server, not Plex itself. You can check out the code for any existing plug-ins by looking in "~/Library/Application Support/Plex Media Server/Plug-ins", and there's some documentation over at http://dev.plexapp.com. However, I'm not sure how much luck you'll have in porting the Cinema Mode script over - Plex's plug-ins focus more on providing content and metadata, they don't have the same level of integration with the client as XBMC's scripts do.

  
  
I see, in that case in what file is the user agent "Plex Firefox/2.0.0.11" defined for Plex? What file would I have to edit in the Plex system files to get this running on my machine at the moment?  
  
Thanks

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [December 2, 2009, 8:00pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/6 "2009-12-02T20:00:52Z")

</div>

> [@](#):
>
> I see, in that case in what file is the user agent "Plex Firefox/2.0.0.11" defined for Plex? What file would I have to edit in the Plex system files to get this running on my machine at the moment?

  
  
FileCurl.cpp:411  
  
If it's helpful, we can read this from advanced settings in the future.

---

<div class="post-metadata">

**Author:** ![charleseladams](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/charleseladams/32/607_2.png) [@charleseladams](https://forums.plex.tv/u/charleseladams)\
**Post date:** [December 2, 2009, 9:03pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/7 "2009-12-02T21:03:16Z")

</div>

> [@](#):
>
> FileCurl.cpp:411  
>   
> If it's helpful, we can read this from advanced settings in the future.

  
  
Thanks very much for that, I'll go and investigate. :D   
  
The ability to read it from advanced settings would be a very useful addition.  
  
Thanks again.

---

<div class="post-metadata">

**Author:** ![charleseladams](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/charleseladams/32/607_2.png) [@charleseladams](https://forums.plex.tv/u/charleseladams)\
**Post date:** [December 10, 2009, 9:41pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/8 "2009-12-10T21:41:31Z")

</div>

OK, I’ve compiled my own version of Plex with the user agent changed and the Cinema Mode works great.  
  
  
  
Would it be possible for a change to be made that reads the user agent from the advancesettings.xml file? If so could it be something that will appear in a new version of Plex soon?  
  
  
  
Thanks again.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [December 10, 2009, 9:45pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/9 "2009-12-10T21:45:20Z")

</div>

It’s definitely on the list for the next version!

---

<div class="post-metadata">

**Author:** ![charleseladams](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/charleseladams/32/607_2.png) [@charleseladams](https://forums.plex.tv/u/charleseladams)\
**Post date:** [December 10, 2009, 9:48pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/10 "2009-12-10T21:48:11Z")

</div>

> [@](#):
>
> It's definitely on the list for the next version!

  
  
Sweet :lol:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:36pm UTC](https://forums.plex.tv/t/user-agent-string-spoofing/3053/11 "2019-12-20T20:36:57Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
