Can anyone help me write a script tp determine the web browser from a user agent. A user agent is stored in a file and consists of hundreds of lines e.g.
Code:
37050 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
29404 Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
26072 Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
20606 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
20368 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
19264 Mozilla/5.0 (iPad; CPU OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4
16998 Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53
14636 Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
13223 Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
12640 Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
12042 Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4
11327 Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
10691 Mozilla/5.0 (iPad; CPU OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4
9202 Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
9159 Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; rv:11.0) like Gecko
8475 Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
Auditing and Monitoring is the most important activitiy of system administrator. In order to improve the servers administered per administrator, can anyone suggest some low cost ( preferably free ) tools/agents. (1 Reply)
Hi,
I've installed on my Solaris 9 (sparc) the Solstice Enterprise Agents and I'm trying to register my application with the master agent of the Solaris, so when the master agent recieves an SNMP message with my O.I.D range, it forwards it to my application.
My application listen on port... (2 Replies)
Hello,
I currently use Solaris, and typically I use the
svcs -a | grep PROCESS
to see if it's online or Offline.
My questions is SVCS is in solaris but if I want to find out if a daemon or process is offline what other methods can I use?
ps -ef | grep PROCESS "what do I look for"
or... (1 Reply)
I am new to scripting
I keep getting the error var2= is not an identifier when I run this script as another user. BUT when I run it as myself, the script completes without error. Any idea why? I assume it is because the new user has a different environment . How do I make the variables active... (5 Replies)
Update:
Last two days the number of users on the site has peaked (normally around 10AM US Eastern Time) between 4,300 and 4,500.
This is the highest number of consistent concurrent users in at least 3 years.
... and the traffic continues to rise week-over-week. (5 Replies)
Discussion started by: Neo
5 Replies
LEARN ABOUT MOJAVE
lwp::protocol::https
LWP::Protocol::https(3) User Contributed Perl Documentation LWP::Protocol::https(3)NAME
LWP::Protocol::https - Provide https support for LWP::UserAgent
SYNOPSIS
use LWP::UserAgent;
$ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 1 });
$res = $ua->get("https://www.example.com");
DESCRIPTION
The LWP::Protocol::https module provides support for using https schemed URLs with LWP. This module is a plug-in to the LWP protocol
handling, so you don't use it directly. Once the module is installed LWP is able to access sites using HTTP over SSL/TLS.
If hostname verification is requested by LWP::UserAgent's "ssl_opts", and neither "SSL_ca_file" nor "SSL_ca_path" is set, then
"SSL_ca_file" is implied to be the one provided by Mozilla::CA. If the Mozilla::CA module isn't available SSL requests will fail. Either
install this module, set up an alternative "SSL_ca_file" or disable hostname verification.
This module used to be bundled with the libwww-perl, but it was unbundled in v6.02 in order to be able to declare its dependencies properly
for the CPAN tool-chain. Applications that need https support can just declare their dependency on LWP::Protocol::https and will no longer
need to know what underlying modules to install.
SEE ALSO
IO::Socket::SSL, Crypt::SSLeay, Mozilla::CA
COPYRIGHT
Copyright 1997-2011 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2013-04-29 LWP::Protocol::https(3)