473,382 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

basic web auth and verification

Trying to figure out how to add login verfication. I believe it is
logging me in, but theres no way to really tell..any ideas? or
tutorials out there that can exaplain this to me?

Thanks

import urllib,urllib2,cookielib

passlst = open(passfile, 'r').readlines()
url="http://somesite"
cj = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(c j))
urllib2.install_opener(opener)
TheForm = urllib.urlencode({"username":"myid","password":"my pas"})
request = urllib2.Request(url, TheForm)
result = urllib2.urlopen(request)
html=result.read()
result.close()

Oct 23 '07 #1
0 765

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dan Stromberg | last post by:
If I wanted to write a python script that performs basic auth, gets a cookie, and then does an http POST using the cookie for authentication, what would be the best python API to write to? Does...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
0
by: _jpg_ | last post by:
Hi, I am currently having a problem where I require a client to cache a response (web form), using cache-control: public, but ASP.NET is always writing in a cache-control: private header. I...
4
by: Barry | last post by:
The MS fix for IE broke how users access our site (if they patch their browsers), so I need a solution to get users logged onto our site transparently. Basically we used to log on to the site...
13
by: Pete | last post by:
I'm cross posting from mscom.webservices.general as I have received no answer there: There has been a number of recent posts requesting how to satisfactorily enable BASIC authorization at the...
3
by: Old Man | last post by:
using c# in a windows application. I am developing a webservice to run on our extranet SSL server. The company policy is that this server log everybody in. I am going to use the WSE security,...
6
by: Alejandro Dubrovsky | last post by:
I see from googling around that this is a popular topic, but I haven't seen anyone saying "ah, yes, that works", so here it goes. How does one connect through a proxy which requires basic...
6
by: lb_mike | last post by:
greetings - I am very much new the PHP world and have what I believe to be a simple question.. I am using one of the Dreamweaver User Auth scripts with a mySQL database. I have the ...
1
by: Ottavio | last post by:
Hello, I'm having some problems with the authentication during a web service call I know I have to add the "Authorization: Basic xxxxxxxx" in the http header (not soap header) but I can't find a...
8
by: =?Utf-8?B?TFc=?= | last post by:
Hello! I am just learning about forms authentication so please excuse this basic question. I am using .NET 1.1 and C#. I have created my web.config file and my login.aspx and the associated cs...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.