Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
python function for login to
# this function can be use for loging to every old sadaf university portal ! also can use for evil thing :)
# there is no captcha and childern can do EVIL thing with this portal :-D
# sadaf portal developed by this company :
# sadaf portal used for Birjand university of techonology and Ferdowsi university of Mashhad
# usage as you know : check('9313344449','123456')
import requests
import hashlib
import bs4
def check(username, password):
md5 = hashlib.md5()
user =str(username)
head={'UserID': user ,'UserPassword':md5.hexdigest() , 'pswdStatus': 'strong', 'DummyVar': ''}
url = ''
page =, data=head)
soup = soup = bs4.BeautifulSoup(page.text,'html.parser')
if soup.title.string == 'browser error':
return False
return True

This comment has been minimized.

Copy link
Owner Author

benyaminsalimi commented Oct 3, 2016

you can also read my full blog post here it so intersting 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.