Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
python function for login to puya.birjandut.ir
# 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 : http://dpm.ir/
# 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()
passw=str(password)
user =str(username)
md5.update(passw)
head={'UserID': user ,'UserPassword':md5.hexdigest() , 'pswdStatus': 'strong', 'DummyVar': ''}
url = 'http://puya.birjandut.ir/gateway/UserInterim.php'
page = requests.post(url, data=head)
soup = soup = bs4.BeautifulSoup(page.text,'html.parser')
if soup.title.string == 'browser error':
return False
else:
return True
@benyaminsalimi

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.