user-agent

Apache 500 Error due to User Agent?

偶尔善良 提交于 2019-12-24 20:26:52
问题 I am currently getting 500 errors from Apache using a alarming probe shell script that has been provided to myself. Unfortunately I have not been able to get to the bottom of why the script generates a 500 error when attempting to access content locally on the server but using other methods like wget and telnet works fine. The following are the Apache access log entries for each of the attempts: Using Wget 127.0.0.1 - "" [19/Mar/2013:14:31:44 +1100] "GET /index.html HTTP/1.1" 200 1635 "-"

How to set user agent for new ACTION_VIEW intent

走远了吗. 提交于 2019-12-24 19:05:42
问题 In my application I am launching a new Intent with url (browser) using the following code: Intent myIntent = new Intent(Intent.ACTION_VIEW,Uri.parse(url)); try { context.startActivity(myIntent); } catch (ActivityNotFoundException e) { Log.e(TAG, "cannot initiate Browser", e); } Is there a way tolet the new activity to send user agent thanks -Z 回答1: One can not programmatically set (from within an app) user's browser to display a custom user-agent string. However, users can do this by hand via

Mobile browser detection with .htaccess fails with Opera Mini

爱⌒轻易说出口 提交于 2019-12-24 17:39:05
问题 I'm having trouble figuring this one out. I'm trying to direct mobile traffic to the mobile version of a website via HTACCESS User-Agent sniffing, like so: RewriteCond %{HTTP_USER_AGENT} (android|blackberry|ipad|iphone|ipod|iemobile|mini|mobi|palmos|webos|googlebot\-mobile) [NC] RewriteCond %{HTTP_HOST} ^mobile\.mywebsite\.com$ RewriteRule ^([aA0-zZ9\-\/]*)/([^/]*)$ /index.php?page=$1&q=$2&q2=$3&setview=mobile [L,QSA] The string mini|mobi is where the Opera Mini browser should be detected.

How to pass Chrome options in webdriver-user-agent gem for watir

本秂侑毒 提交于 2019-12-24 11:20:37
问题 I am trying to pass cookies option for Chrome Drive using Watir gem From Watir documentation i can do Watir::Browser.new :chrome, opts So for cookies I can do: browser = Watir::Browser.new :chrome, options: {args: ['--user-data-dir=/cookies']} When using the webdriver-user-agent gem for mobile testing, their documentation tells me to start the browser like this: driver = Webdriver::UserAgent.driver(browser: :chrome, agent: :iphone) browser = Watir::Browser.new driver But now I don't know how

Specifying string with semicolons in UrlScan.ini

て烟熏妆下的殇ゞ 提交于 2019-12-24 10:56:28
问题 I want to block user-agents with UrlScan on IIS 6. However I am not able to specify a user-agent with a semicolon in the string. I think this is a very common scenario, but I can't find any answer on how to escape a semicolon in UrlScan.ini (where semicolon are used for commenting). This is the rule: RuleList=DenyUserAgent [DenyUserAgent] DenyDataSection=AgentStrings ScanHeaders=User-Agent [AgentStrings] Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/10.0.2 I tested it and it

Pandas parse user agent column into multiple columns

孤街浪徒 提交于 2019-12-24 10:49:00
问题 I have a dataframe of http request logs. The only relevant column is the userAgent column which I'm trying to parse. I'm using ua_parser. This turns each userAgent into a nested dictionary like so: >>> from ua_parser import user_agent_parser >>> user_agent_parser.Parse('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36') { 'device': {'brand': None, 'model': None, 'family': 'Other'}, 'os': {'major': '10', 'patch_minor':

httpURLConnection with user-agent gets 403 Forbidden but not web browser

只谈情不闲聊 提交于 2019-12-24 10:35:55
问题 I'm running a program that sends requests to the public facebook graph API. Its multithreaded,and user-agent is set ("Mozilla/5.0..."). After 1000-10000 requests it starts getting exception: "java.io.IOException: Server returned HTTP response code: 403 for URL = https://graph.facebook.com/etc..." for all threads trying to get a response. If i stop the process, and restart it, after lets say 10 minutes, it will work, but it will get the exceptions after less requests. While program is running,

Is there any way to detect a user's Mac hardware model from the browser?

一个人想着一个人 提交于 2019-12-24 09:16:45
问题 I wanted to see if anyone knows if it's possible to detect what Mac computer model a user is has, straight from the browser. Aka "MacBook Pro (Mid/Late 2007)" or "MacBook Air (Late 2008 or newer)." This is probably a long shot, but since Mac browsers provide the OS via userAgent (http://www.quirksmode.org/js/detect.html), I thought there could be a chance. 回答1: Nope. The User-Agent header provides some information, but not much: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536

Prevent users from being able to access a webpage via web browser?

时光毁灭记忆、已成空白 提交于 2019-12-24 08:51:11
问题 My friend and I are working on a program. This program is going to submit GET data to our webpage. However, we don't want users accessing the webpage any other way than the program. We can prevent users from sharing the program using HWID authentication, but nothing prevents them from using a packet scanner to get the URL of the webpage. We thought about user-agent authentication, which we will implement, but user-agents can easily be spoofed. So my question is, how can we prevent users from

Request desktop site WKWebview not working in Swift 4

喜欢而已 提交于 2019-12-24 08:33:12
问题 I tried almost everything one stackoverflow and other site to request desktop version of site in WKWebview, but none of solution is working for me. my tried links as below https://stackoverflow.com/a/38228810/3145189 https://stackoverflow.com/a/38228810/3145189 https://stackoverflow.com/a/49646773/3145189 https://stackoverflow.com/a/48155481/3145189 i tried on above threads to get answers by commenting on answers, but got no reply so here i go with my question, i hope you won't mark it