0

hello ALL

im making some simple python post script but it not working well.

there is 2 part to have to login.

first login is using 'http://mybuddy.buddybuddy.co.kr/userinfo/UserInfo.asp' this one.

and second login is using 'http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp'

i can login first login page, but i couldn't login second page website.

and return some error 'illegal access' such like .

if anyone can help me much appreciated!! Thanks!

import re,sys,os,mechanize,urllib,time
import datetime,socket


params = urllib.urlencode({'ID':'ph896011', 'PWD':'pk1089' })
rq = mechanize.Request("http://mybuddy.buddybuddy.co.kr/userinfo/UserInfo.asp", params)
rs = mechanize.urlopen(rq)
data = rs.read() 

logged_fail = r';history.back();</script>'  in data                                             
if not logged_fail:
 print 'login success'
 try:
  params = urllib.urlencode({'PASSWORD':'pk1089'})
  rq = mechanize.Request("http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp", params )
  rs = mechanize.urlopen(rq)
  data = rs.read()
  print data
 except:
  print 'error'
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Tech B
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.