1
2
3
4
5
6
7
8
9
<DIV class=lineThW></DIV>
<DIV class=titel><DIV class=colVoll>Gerätepasswort Eingabe</DIV></DIV>
<form name="tF" method="post" action="/cgi-bin/login.cgi" onSubmit="return evaltF();">
<DIV class=rowHalb></DIV>
<DIV class=rowStd>
<DIV class=colLast><input type="password" class="stylepwd" name="pws" size="12" maxlength="12" onkeypress="return stEnter(event,this);" autocomplete="off"></DIV>
</DIV>
</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
29
30
31
32
33
34
#!/usr/bin/perl -w
use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request::Common qw{ POST };
use CGI;
use HTTP::Cookies;
use Crypt::SSLeay;
$ENV{HTTPS_CA_DIR} = "/opt/certs";
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
my $md5 = '0000';
my $url = 'https://speedport.ip/cgi-bin/login.cgi';
my $ua = LWP::UserAgent->new();
$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051111 Firefox/1.5");
$ua->cookie_jar(
HTTP::Cookies->new(
file => 'mycookies.txt',
autosave => 1
)
);
my $request = POST( $url, [ 'pws' => $md5 ] );
my $content = $ua->request($request)->as_string();
my $cgi = CGI->new();
print $cgi->header(), $content;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Content-Type: text/html; charset=ISO-8859-1
HTTP/1.1 403 Forbidden
Cache-Control: max-age=0, must-revalidate
Connection: close
Pragma: no-cache
Server: Apache
Content-Type: text/html
Client-Date: Tue, 11 Dec 2012 14:14:44 GMT
Client-Peer: 192.168.0.1:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
Client-SSL-Cert-Subject: /C=DE/ST=Hessen/L=Darmstadt/O=Deutsche Telekom AG/OU=P&I PSO/DCS/CN=speedport.ip
Client-SSL-Cipher: AES256-SHA
Title: 403 Forbidden
<HEAD><TITLE>403 Forbidden</TITLE></HEAD>
<BODY><H1>403 Forbidden</H1>
Your client does not have permission to get this page.(code=41193) from this server.<P>
</BODY>
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
----------------------------------------------------------
https://speedport.ip/cgi-bin/login.cgi
POST /cgi-bin/login.cgi HTTP/1.1
Host: speedport.ip
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: https://speedport.ip/hcti_start_passwort.stm
Cookie: aDuPtHh_DTW504VA=deleted
Content-Type: application/x-www-form-urlencoded
Content-Length: 12
pws=0000
HTTP/1.1 302 Found
Server: Apache
Pragma: no-cache
Cache-Control: max-age=0, must-revalidate
Set-Cookie: aDuPtHh_DTW504VA=XRQjOQ2U2Gs8oiEZhWS1RPTYBjvEBIc31Z29jOnDB2Uz5LzP; Path=/; Secure;
Connection: close
Location: https://speedport.ip/wait_login.stm
Content-Type: text/html
----------------------------------------------------------