• 2
  • 3
2011-05-16, 22:22
  #25
Bannlyst
NEj du!!! Vet du vad jag har glmt? Trycka p "logga in" knappen

Kod:
import urlliburllib2cookielib  

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&auml;ndarnamn&nbsp;</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&auml;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&aring;g mig?</label></td> 
                </tr> 
                <tr> 
                    <td class="smallfont">L&ouml;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&auml;ndarnamn och l&ouml;senord f&ouml;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?
Citera
2011-05-17, 18:09
  #26
Medlem
Chevrons avatar
Skicka inte PM, citera istllet. Hade du dessutom skrivit ut det frn brjan, hade du besparat dig massa huvudbry.

Kod:
POST /login.php HTTP/1.1
Host: www.flashback.org
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://www.flashback.org/index.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 165

vb_login_username=***&vb_login_password=&do=login&vb_login_md5password=***&vb_login_md5password_utf=***

response
Kod:
HTTP/1.1 301 Moved Permanently
Date: Tue, 17 May 2011 16:10:50 GMT
Server: Apache
Set-Cookie: vbscanlastvisit=1305648650; expires=Wed, 16-May-2012 16:10:50 GMT; path=/; domain=.flashback.org; secure
Set-Cookie: vbscanlastactivity=0; expires=Wed, 16-May-2012 16:10:50 GMT; path=/; domain=.flashback.org; secure
Cache-Control: private
Pragma: private
Set-Cookie: vbscansessionhash=***; path=/; domain=.flashback.org; secure
Location: https://www.flashback.org/index.php?s=***&
Content-Length: 0
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=ISO-8859-1
__________________
Senast redigerad av Chevron 2011-05-17 kl. 18:22.
Citera
  • 2
  • 3

Skapa ett konto eller logga in för att kommentera

Du måste vara medlem för att kunna kommentera

Skapa ett konto

Det är enkelt att registrera ett nytt konto

Bli medlem

Logga in

Har du redan ett konto? Logga in här

Logga in