|< 1 2 3 >| | 25 Einträge, 3 Seiten |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
#!/usr/bin/perl # # Script zur abfrage auf neue Patches bei IBM # # Author: Florian L - 13.03.08 # # Usage: ./checkupdate.pl # ############################################## use strict; use warnings; use LWP::UserAgent; my $proxy = 'http://***:***@svproxsg01.****.de:8080/'; my $browser = LWP::UserAgent->new; $browser->timeout(10); $browser->proxy(['http','ftp'], $proxy) if defined $proxy; $browser->cookie_jar({}); sub checkhmc() { print ("Trying http://www14.software.ibm.com/webapp/set2/sas/f/hmc/home.html\n"); my $request = HTTP::Request->new('GET',"http://www14.software.ibm.com/webapp/set2/sas/f/hmc/home.html"); my $response = $browser->request($request); if ($response -> is_success()) { my @site = $response->content; foreach (@site) { my $line = $_; if ($line =~ m/HMC V7 (.+)<\/a>/g) { print("Aktuelle HMC Version: HMC V7 $1\n"); } } } else { print "ERROR ".$response->message; } } sub checkfixpack() { print ("Trying http://www-912.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53\n"); my $request = HTTP::Request->new('GET',"http://www-912.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53"); my $response = $browser->request($request); if ($response -> is_success()) { my @site = $response->content; foreach (@site) { my $line = $_; if ($line =~ m/pseriesfixpackinformation\/(.+)\"/g) { print("Fixpack: $1\n"); } } } else { print "ERROR ".$response->message; } } sub checkvios() { print ("Trying http://www14.software.ibm.com/webapp/set2/sas/f/vios/download/home.html\n"); my $request = HTTP::Request->new('GET',"http://www14.software.ibm.com/webapp/set2/sas/f/vios/download/home.html"); my $response = $browser->request($request); if ($response -> is_success()) { my @site = $response->content; foreach (@site) { my $line = $_; if ($line =~ m/Fix Pack (.+)<\/b>/g) { print("Vios Fixpack: $1\n"); } elsif ($line =~ m/IOSLEVEL: (.+)<\/b>/g) { print("IOS-Level: $1\n"); } } } else { print "ERROR ".$response->message; } } checkhmc(); checkfixpack(); checkvios();
1
2
3
4
<div class='ibm-container-body'>
<p><b>PACKAGE: Fix Pack 10.1</b></p>
<p><b>IOSLEVEL: 1.5.1.1</b></p>
</div>
1 2 3 4 5
if ($line =~ m/Fix Pack (.+)<\/b>/g) { print("Vios Fixpack: $1\n"); } elsif ($line =~ m/IOSLEVEL: (.+)<\/b>/g) { print("IOS-Level: $1\n"); }
FlorianL+2008-03-13 15:09:39--Ich würde auch gern tools wie mechanize oder ähnliche nutzen, aber das nachinstallieren von 'externen' modulen ist auf der prod umgebung nicht gestattet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
sub checkfixpack() { my $request = POST 'http://www-912.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53', [ tl => 'all' ]; my $response = $browser->request($request); if ($response -> is_success()) { my @site = $response->content; foreach (@site) { my $line = $_; if ($line =~ m/pseriesfixpackinformation\/(.+)\"/g) { print("Fixpack: $1\n"); } } } else { print "ERROR ".$response->message . "\n"; } }
1
2
3
4
5
6
7
8
9
10
11
<select class="iform" name="tl" id="tl">
<option value="">Select one</option>
<option value="all">All 5.3</option>
<option value="5300-07-00-0747">TL 5300-07-00-0747</option>
<option value="5300-06">TL 5300-06</option>
<option value="5300-05">TL 5300-05</option>
<option value="5300-04">TL 5300-04</option>
<option value="5300-03">ML 5300-03</option>
<option value="5300-02">ML 5300-02</option>
<option value="5300-01">ML 5300-01</option>
</select>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<form name="tlFilter" action="/eserver/support/fixes/fixcentral/pfixpacks/53" method="POST" >
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<label for="tl">
<strong>Select a Technology Level</strong>
</label>
</td>
</tr>
<tr>
<td>
<select class="iform" name="tl" id="tl">
<option value="">Select one</option>
<option value="all" selected="selected">All 5.3</option>
<option value="5300-07-00-0747">TL 5300-07-00-0747</option>
<option value="5300-06">TL 5300-06</option>
<option value="5300-05">TL 5300-05</option>
<option value="5300-04">TL 5300-04</option>
<option value="5300-03">ML 5300-03</option>
<option value="5300-02">ML 5300-02</option>
<option value="5300-01">ML 5300-01</option>
</select>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
sub checkfixpack() { my $request = POST 'http://www-912.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53', [ 'tlFilter' => 'all' ]; my $response = $browser->request($request); if ($response -> is_success()) { my @site = $response->content; foreach (@site) { my $line = $_; if ($line =~ m/pseriesfixpackinformation\/(.+)\"/g) { print("Fixpack: $1\n"); } } } else { print "ERROR ".$response->message . "\n"; } }
FlorianL+2008-03-14 09:20:17--Moin, is renee im Urlaub? *fg*
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use HTTP::Request; my $req = HTTP::Request->new( POST => "http://www-912.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53", [ tl => 'all', ], ); my $ua = LWP::UserAgent->new; push @{ $ua->requests_redirectable }, 'POST'; my $response = $ua->request( $req ); print $response->status_line; print $response->content;
|< 1 2 3 >| | 25 Einträge, 3 Seiten |