2011-05-16, 22:22
#25
NEj du!!! Vet du vad jag har glmt? Trycka p "logga in" knappen
Hr ngon stans s ska det st ngot istllet fr 'XXX' som du kan se dr uppe.
Men vad?
Kod:
import urllib, urllib2, cookielib
username = 'user'
password = 'pass'
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
login_data = urllib.urlencode({'vb_login_username' : username,
'vb_login_password' : password,
'XXX'})
opener.open('https://www.flashback.org/index.php', login_data)
resp = opener.open('https://www.flashback.org/index.php')
resp.read()
Hr ngon stans s ska det st ngot istllet fr 'XXX' som du kan se dr uppe.
Kod:
<div id="user-login-box">
<form action="/login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<script type="text/javascript" src="https://static.flashback.org/js/vbulletin_md5.js"></script>
<table class="nborder p2">
<tr>
<td class="smallfont">Användarnamn </td>
<td><input type="text" class="bginput" style="font-size: 11px;width:100px" name="vb_login_username" id="navbar_username" accesskey="u" tabindex="101" value="" onfocus="if (this.value == 'Användarnamn') this.value = '';" /></td>
<td class="smallfont" style="padding-left:2px" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />Kom ihåg mig?</label></td>
</tr>
<tr>
<td class="smallfont">Lösenord</td>
<td><input type="password" class="bginput" style="font-size: 11px;width:100px" name="vb_login_password" accesskey="p" tabindex="102" /></td>
<td style="padding-left:4px"><input type="submit" class="button" value="Logga in" tabindex="104" title="Skriv in ditt användarnamn och lösenord för att logga in." accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
</div>
Men vad?