change user agent in mplayer windows cmd? - mplayer

I am viewing a video from rtsp://r5---sn- link and i wish to change the current user agent that shows up as
User-Agent: MPlayer (LIVE555 Streaming Media v2013.04.30)\r\n
in wireshark.
I also tried the command
mplayer -user-agent "QuickTime" rtsp://r5---sn-q4flrne6.googlevideo.com/Cj0LENy73wIaNAkbOZCZD61_VhMYESARFC3vKLxZMOCoAUIASARgxPz01cadit5ZigELM3cxNEhielBxdzQM/D3EFB0C52E0C6FD06FA36F7D5E413993EB5B33D9.90DD45248D796A1FCF6B0E3031CDB810A641A0D6/yt6/1/video.3gp
it dont change anything still has the default mplayer user agent
how will i go around changing that to a custom one anybody kindly assist

The mplayer help explain this is for HTTP:
-user-agent
Use as user agent for HTTP streaming.
If you look at mpayer source code demux_rtp.cpp you will see that there is no way to specify the user-agent string used by RTSPClient.
In order to set it you could call the live555 API of class RTSPClient:
void setUserAgentString (char const *userAgentName)

Related

how to disable video on command line when .testcafec.json has video options

I enabled video in .testcafec.json file.
But, sometimes I want to disable video on the command line.
For example,
testcafe .... --video-options enable=false,...
At present, you cannot disable video recording via command line. The TestCafe configuration file supports JSON5 syntax, so you can just comment out options related to video recording when it's necessary.
.testcaferc.json
{
//"videoPath": "videos"
}
Old question but maybe someone is still searching for a solution (like me).
As far as I know there is no enable/disable CLI flag yet but you can disable video by adding these two options:
testcafe ... --video "" --video-options ""
(the --video-options "" param is only required if you have declared videoOptions in your .testcaferc.json)

How can I actually download/transfer a file found using UPnP?

I'm completely new to UPnP as a protocol, but I'm hoping to use it to transfer files from a Sony Camera to an iOS app I'm working on. So far I have SSDP discovery setup, I can read the UPnP client's services, search through folders and access file names, but the final hurdle which I'm stuck on is how to actually download/transfer the files once I'm able to list them!
What I end up getting is the below:
<item id="04_02_0624600856_000001_000001_000000" restricted="1" parentID="03_01_0624600856_000001_000000_000000">
<dc:title>DSC05076.ARW</dc:title>
<upnp:class>object.item.imageItem.photo</upnp:class>
<dc:date>2018-08-23T12:24:21</dc:date>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1">http://192.168.122.1:60151/SM_DSC05076.ARW?%2104%5f02%5f0624600856%5f000001%5f000001%5f000000%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fSM%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_CI=1">http://192.168.122.1:60151/LRG_DSC05076.ARW?%2104%5f02%5f0624600856%5f000001%5f000001%5f000000%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fLRG%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1">http://192.168.122.1:60151/TN_DSC05076.ARW?%2104%5f02%5f0624600856%5f000001%5f000001%5f000000%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fTN%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
I would (With my naive experience of simple HTTP APIs) then expect to simply be able to download the file in question by hitting:
http://192.168.122.1:60151/SM_DSC05076.ARW or similar (I'm assuming I have to change this URL slightly as the file is listed as image/jpeg rather than RAW?
Whatever combination I try of the full res object, snipping bits, decoding the url e.t.c. I always get a 404 response when trying to visit the URL in question. Is there something more complex I need to do here? Or something simple that I'm missing?
Thanks in advance!
The problem here was that I was using a url from a previous session. It turns out that the urls change between connection sessions, which is why I was getting a 404.
Lesson learned: UPnP is highly dynamic, and you can’t rely on caching images under their access MRL!

Correct way to submit a phonegap/jQM form.

very new at this. Could someone tell me what is the best method of submitting a form when using phonegap and JMQ? What I want to be able to do is passing the form data to a php file and then having the results passed back into app so that the user isnt directly accessing the php file at any point.
I found the following page link which basically does what I want but I keep getting "Origin null is not allowed by Access-Control-Allow-Origin" when testing out the code. So I'm guessing this will only work if the app is located on a server also?
Any happy would be great. thank <3
To test your solution on the computer you need to launch chrome from the terminal with the argument --disable-web-security. See this answer: Disable same origin policy in Chrome
In your Phonegap application you add a line of code to your config.xml in the www-folder: <access origin="*.yourdomain.com" />. Build, and you are now allowed to request all domains and subdomains from yourdomain.com. For more details on whitelisting see http://docs.phonegap.com/en/3.0.0/guide_appdev_whitelist_index.md.html#Domain%20Whitelist%20Guide
You are not able to make post through the local files, so Yes, you need to have it running in a Web Server.
But if you deploy your application, it should work either in a emulator or in your device.

How can I make dokuwiki shown as PC mode not mobile mode?

I have installed dokuwiki to my server.
It shows in mobile mode when I access to it with Android or iPhone.
But I want to show it as PC mode.
How can I?
Which template are you using?
If it's the default "dokuwiki" template, simply remove the line with css/mobile.css from the style.ini file in ./lib/tpl/dokuwiki/.
Dokuwiki's API let determine if the client is mobile. Then it's up to the template to use this information or not.
You could try grep -rn ismobile . on your template code to see how it is used.
Ideally I would have added a comment to ask which template you use, but I'm afraid I don't have enough reputation to leave comments yet.

How to use Fiddler to check response codes of multiple URLs ?

Please suggest how to use the composer. Is there a way I can just input a file with a list of URLs and have fiddler check those links for me ?
There's no built-in feature that performs exactly that function, but you can easily write script that does this. Use the utilIssueRequest method on the Proxy object to send a request to a target URL. See http://www.fiddler2.com/fiddler/dev/scriptsamples.asp for a full script example.