Thread Login klappt nicht mit LWP, Cookies, 302 redirect (8 answers)
Opened by Franz at 2007-05-31 11:22

Gast Gast
 2007-10-12 11:54
#100741 #100741
Naja ich habs nicht so mit modulen deswegen funzt bei mir sowas in dem stil :P
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
# Login Request zusammensetzen
$request = HTTP::Request->new(POST => 'https://tst.com/Login.jsp?a=setLanguage&language=DE');
$request->push_header('Content-Type' => 'application/x-www-form-urlencoded');
$request->content("callTest=set&hotelKey=123&passwd=GEHEIM&weeksToShow=other&Login.y=7");

# Session id auslesen
$response->header('Set-Cookie') =~ /JSESSIONID=(.*?);/;
$sid = $1;

# Request Header
$request = HTTP::Request->new(POST => 'https://tst.com/daten.jsp');
$request->push_header('Cookie' => 'JSESSIONID='.$sid);
....


Und es gibts ja noch wireshark um zu schauen obs geklappt hat :P

MFG

View full thread Login klappt nicht mit LWP, Cookies, 302 redirect