Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8424213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:55:39+00:00 2026-06-10T03:55:39+00:00

I made some code for access particular site instead user. It’s very similar to

  • 0

I made some code for access particular site instead user.
It’s very similar to auto login program.
My program receive userid and password from user and try access url with data and login, return login result.

Here’s code.

from urllib import urlencode
from urllib2 import Request
from ClientCookie import urlopen, install_opener, build_opener

httpheaders = {'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;)'}
y_url1 = 'http://www.xxx.kr/papp.jsp'
y_url2 = 'https://im.xxx.kr/sso/auth'

def check_valid_user(user_id, user_pw):
    values = {'ssousername': user_id, 'password': user_pw}
    data = urlencode(values)
    req = Request(y_url1, data, httpheaders)
    response = urlopen(req)
    the_page = response.read()
    token = the_page.split('"site2pstoretoken"')[1].split('"')[1]
    values = {'ssousername': user_id, 'password': user_pw, 'site2pstoretoken' : token}
    data = urlencode(values)
    req = Request(y_url2, data, httpheaders)
    response = urlopen(req)
    the_page = response.read()
    install_opener(build_opener())
    if the_page.find('Cyber') == -1:
        return False
    else:
        return True

When I run this program on my windows desktop, it works well.

But when I run this program on my ubuntu apache server, it’s not working.
(ubuntu 11.04, python 2.7.1)

I open django python shell and try to debug line by line
python manage.py shell

response = urlopen(req)

At this point, error raises.

>>>response = urlopen(req)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/ClientCookie/_urllib2_support.py", line 824, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.7/urllib2.py", line 397, in open
response = meth(req, response)
  File "/usr/lib/python2.7/dist-packages/ClientCookie/_urllib2_support.py", line 626, in http_response
"http", request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 429, in error
result = self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 369, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/dist-packages/ClientCookie/_urllib2_support.py", line 154, in http_error_302
return self.parent.open(new)
  File "/usr/lib/python2.7/urllib2.py", line 391, in open
response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _open
'_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 369, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/dist-packages/ClientCookie/_urllib2_support.py", line 724, in https_open
return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/dist-packages/ClientCookie/_urllib2_support.py", line 694, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 1] _ssl.c:499: error:14077417:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert illegal parameter>

What’s the problem? Please help me…..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:55:41+00:00Added an answer on June 10, 2026 at 3:55 am

    check out this bug report urllib bug

    seems something like the below might fix it.

     import ssl
     https_sslv3_handler = urllib.request.HTTPSHandler(context=ssl.SSLContext(ssl.PROTOCOL_SSLv3))
     opener = urllib.request.build_opener(https_sslv3_handler)
     urllib.request.install_opener(opener)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made some image validation. The user has to enter the code from the
I made some code to produce boxes every time my code encounters a white
I made some code, for understanding the concept/basic of pointer: int a=1; int *b=&a;
I've made some experimental code that I would like to save in the repository,
I have recently made changes in some code that makes a char name field
I've got some code which takes a drawing made on in SVG with Raphael
I've made some function that generates an email template. Code it generates is pure
Greetings, SO. I have some code which I've made attempts at compiling using gcc,
I have to run some student-made code that they made as homework, I'm running
I've made some code to insert data from an excel table in to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.