4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<form method="post" action="https://login.uni-mainz.de/cgi-bin/login-cgi"
enctype="application/x-www-form-urlencoded" name="login">
<tr>
<td align="left"> Username </td>
<td align="left"> <input type="text" name="user" size="20" maxlength="8"> </td>
</tr>
<tr>
<td align="left"> Password </td>
<td align="right"> <input type="password" name="pass" size="20" maxlength="20"> </td>
</tr>
<tr>
<td colspan=2 align="left"> <input type="submit" value=" Login "> </td>
<input type="hidden" name="forward" value=>
</tr>
</form>
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
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request;
use Crypt::SSLeay;
my $server = "https://login.uni-mainz.de/cgi-bin/login-cgi";
my $user = "meintollerusername";
my $passwd = "qwert";
my $forward ="www.irgwndwas.de";
my $request = HTTP::Request->new("POST", $server);
$request->header(user => $user, pass => $passwd, forward => $forward );
my $agent = LWP::UserAgent->new();
$agent->timeout(5);
my $response = $agent->request($request);
print( %$response );
if ($response->is_success) { print "Anmeldung erfolgreich\n";}
else { print "Anmeldung fehlgeschlagen\n"; exit(1);}
4 Einträge, 1 Seite |