user-agent

IE 11 sends different User-Agent header to different subdomains

江枫思渺然 提交于 2019-11-30 08:14:56
Well, I've been working on an User-Agent based shared-session protection between subdomains. I was extremely surprised that it's been working well until IE 11 preview was released recently. There are 2 subdomains example.com and sub.example.com I've intercepted requests to both domains and it seems that USER-AGENT HTTP Header being sent to each domain is different. Request to example.com has: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko Request to sub.example.com has: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727;

How to set a custom user agent in ruby

元气小坏坏 提交于 2019-11-30 08:14:07
I've a task to test different user agents on a URL through automation. I'm using ruby to code, and I've been trying to set an user agent using the following method, but it doesn't seem to recognize the user agent. @http = Net::HTTP.new(URL) response = @http.request_get(URL, {'User-Agent' => useragent}) Is there any other way to do this, or what am I doing wrong? http = Net::HTTP.new("your.site.com", 80) req = Net::HTTP::Get.new("/path/to/the/page.html", {'User-Agent' => 'your_agent'}) response = http.request(req) puts response.body Works great for me. Also another that work for me : require

PHP Sessions + Useragent with salt

我只是一个虾纸丫 提交于 2019-11-30 07:39:00
It keeps running in my mind the last couple of days, but I read some articles about how to make your PHP sessions more secure. Almost all of these articles say that you need to save the useragent in the session WITH an additional salt. Something like this: $fingerprint = md5('SECRET-SALT'.$_SERVER['HTTP_USER_AGENT']); The salt would make it harder for an attacker to hijack or whatever the session. But WHY add a salt every time you would check it like this: md5('SECRET-SALT'.$_SERVER['HTTP_USER_AGENT']) == $_SESSION [ 'fingerprint' ] So WHY would a salt make it more secure, since the attacker

Ways to create a unique user fingerprint in PHP

会有一股神秘感。 提交于 2019-11-30 06:31:15
问题 What is the best way to generate a 'fingerprint' of user unique-ness in PHP? For example: I could use a user's IP address as the 'fingerprint', however, there could be multiple other users on the same IP I could use the user's IP + user agent as the 'fingerprint', however, a single user could simply swap from safari to firefox and again be seen as being unique Ideally, the fingerprint so label the 'machine' rather than browser or 'ip' but I can't think of how this is achievable. Open to ideas

What is the user agent string for facebook app from android

五迷三道 提交于 2019-11-30 05:38:18
问题 What is the user-agent string added when we open facebook app from an android mobile. I want to detect facebook app from android OS using user-agent string, is that achievable. Are there unique user-agent strings for different devices for facebook app 回答1: Obligatory disclaimer: user-agent strings are usually the wrong answer. They change, they're inconsistent, it's a brittle way to detect anything. That said, testing on a Samsung Galaxy S5, with a freshly installed FB app as of today, I got:

Scrapy using pool of random proxies to avoid being banned

此生再无相见时 提交于 2019-11-30 05:31:51
I am quite new to scrapy (and my background is not informatics). I have a website that I cant visit with my local ip, since I am banned, I can visit it using a VPN service on browser. To my spider be able to crawl it I set up a pool of proxies that I have found here http://proxylist.hidemyass.com/ . And with that my spider is able to crawl and scrape items but my doubt is if I have to change the proxy pool list everyday?? Sorry if my question is a dumb one... here my settings.py: BOT_NAME = 'reviews' SPIDER_MODULES = ['reviews.spiders'] NEWSPIDER_MODULE = 'reviews.spiders' DOWNLOAD_DELAY = 1

What UserAgent is reported by the WebBrowser control?

醉酒当歌 提交于 2019-11-30 05:26:19
Just wondering what browser type the VB.NET reads as when it visits a webpage. For instance on my website it shows a break down of all the different browsers that accessed my site. You don't provide much context to your question, but I assume that you're talking about the User Agent string that's sent when you use the WebBrowser control built into the .NET Framework. Because that control just uses Internet Explorer to render the page, you'll see a User Agent string very similar to what you'd find if you visited the page using IE on the same computer. The IE string generically reports itself as

How to detect user agent in WCF web service

落爺英雄遲暮 提交于 2019-11-30 05:03:07
问题 How can I detect the user agent in a web service? My web service is implemented using a WCF webservice with basicHTTPBinding. It will be a post from some SOAP clients. I wish to know the user-agent from the clients. I shall like to see some sample code for this. I am using a WCF based web service and in the svc.cs, I tried to catch this.Context.Request.UserAgent . But it gives the following error: this.Context.Request.UserAgent 'MySoapService.MyService' does not contain a definition for

Is server-side user agent detection/sniffing bad?

我的未来我决定 提交于 2019-11-30 04:50:31
Client-side user agent detection is known to be bad and discouraged in favor of feature detection . However, is it also bad to react differently based on the incoming user agent field in a HTTP request ? An example would be sending smaller or larger images based on whether the incoming user agent is mobile or desktop. I think it depends what your motivation is. For example, in the mobile web sector what you are attempting to do is provide the user with something that looks sensible on their platform. Why be concerned about what user-agent the user is reporting, when it is purely for their own

HTTP request header: UserAgent variable

夙愿已清 提交于 2019-11-29 23:03:47
When sending a HTTP request, IE sends the User-Agent variable to the server. A possible value (as seen by the network debugger): User-Agent: Mozilla /5.0 (Compatible MSIE 9.0;Windows NT 6.1;WOW64; Trident/5.0) My question: How does IE (or any other browser) find out this variable? I'm asking this because when visiting some websites, this variable is different than others and I'd like to trace where the change is coming from. 'Compatibility settings' is one option, but I think there is more to it. Can anyone explain the process of this variable? The User-Agent appears in an HTTP Request Header,